Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I love faker! It pisses me off a bit that the library is named faker but the package is fake-factory. It trips me up all the time.

I use it with factory_boy (http://factoryboy.readthedocs.org/en/latest/) to generate test fixtures that seem to make logical sense. Usernames are real names, birthdays are real dates, etc.

I think it helps with experimentation when you're using the REPL and also makes bugs stand out a bit more easily. Very neat for demoing purposes too.

Perhaps my favourite is faker.bs() which always gets a giggle when doing live demos.



It's probably fake-factory to prevent confusion with the Ruby gem that's been around for more than 6 years http://www.rubyinside.com/faker-quick-fake-data-generation-i...

It's a standard gem in the community and it's used for generating various types of seed database data. Don't know if does the exact same things that the Python faker does.


I used fake-factory because faker was already busy on pipy. Initially I asked the author to leave the name, but the response was negative.


Nice, fake.bs() looks pretty useful as does fake.catchPhrase()


If I ever start a company, I'm going to run fake.company() and fake.companySuffix() until I find one that looks good.


I was just about to post why is the package called fake-factory.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: