Let's say I have this typed dict:
class User(TypedDict):
email: str
password: str
I would love to just pass this metadata to mimesis to get my random data without any code duplication. Example of API that I am thinking of:
mf = Field(locale=Locale.RU)
schema = Schema(iterations=1, typed_dict_provider=User, schema=lambda: {
# Customization is still fine:
'email': mf(
'person.email',
domains=settings.TRUSTED_DOMAINS,
),
})
So, this will:
- Generate
password as a text, with no modifications
- Generate
email with a given modification
Let's say I have this typed dict:
I would love to just pass this metadata to
mimesisto get my random data without any code duplication. Example of API that I am thinking of:So, this will:
passwordas a text, with no modificationsemailwith a given modification