Closed kishvanchee closed 5 years ago
Actually it was just an example. You must implement it by yourself.
Ah okie. A couple more questions if you don't mind.
I feel it would be helpful if Actually it was just an example. You must implement it by yourself. this can be written in the docs itself.
Is it possible to create a fill_fake()
method for the base class? To word it better, basically incorporate the method such that it can be called by any class. I can try implementing this and create a PR if I get the time.
I think that it's pretty clear that it was just an example, but you can create PR with explanations in docs, if you disagree with me.
I am not sure, that I understood you, but if you mean something like BaseProvider.fill_fake()
then it have not sense.
I meant that even though it was an example shown, I did not expect that it would be an example which didn't have code implemented in the package. I'll give a PR for this when I get time then. Thanks. :)
Yes I meant like BaseProvider.fill_fake()
thus this could be useful for any of the other providers. (again, Please forgive me I am yet to go through the source code properly to understand how it is implemented.) I was hoping for a generic method, which can be used, say Address().address().fill_fake(count=100)
.
Oh, no. It's not good idea and we won't add such method to API, sorry.
If you need list of some kind of data, just use standard Python tools for it:
_ = [address.adaress() for i in range(100)]
It's not good idea and we won't add such method to API, sorry.
Can you please expand why this is not a good idea? I just want to understand it. :)
Because there is no need to add such a simple thing to API and make it complex. Mimesis solves the problem it must solve: generating data.
If you need such feature, just create mixin for it.
Ohk cool. Thank you very much. I'll close the issue.
User().fill_fake(count=2000, locale='de')
I am trying to do this, but I am not able to find the source code for this.