Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
Auto add builtin provider to Generic based on passed locale #674
An idea is very simple:
generic = Generic('ru', auto_add_builtin=True) generic.russia_provider.inn()
Instead of this:
from mimesis import Generic from mimesis.builtins import RussiaSpecProvider generic = Generic('ru') generic.add_provider(RussiaSpecProvider) generic.russia_provider.inn()
Optionally we can make builtin's name customizable:
generic = Generic('ru', auto_add_builtin=True, builtin_custom_name='russia') generic.russia.inn()
@sobolevn I'm trying to make it easier to add country-specific data to Generic. For example, in common cases when you need to generate Personal info for locale
It's just an easier way to add builtin provider to
@lk-geimfari I think that is a good idea.
What do you think about adding the builtin provider by default? The generic provider generates all the data from a locale so I think that is reasonable to add the builtin too:
It's ok to add the parameter
I could work on this next week. Let me know!