A Python package that generates fake data for you
open sourceMITself-hostablefree
Faker is the standard Python library for generating fake data: names, addresses, emails, phone numbers, text, dates, companies, credit card numbers, profiles and much more, through providers you call as methods (fake.name(), fake.address()). It's localized for many locales, can mix several locales, generates unique values on request and gives reproducible output when seeded. You can write your own providers, use its pytest plugin's faker fixture in tests, or generate data from the faker command line. Use it to seed databases, build test fixtures, stress-test storage or anonymize production data. Inspired by PHP, Perl and Ruby Faker, MIT licensed.
Problems it solves
- generate realistic fake names, addresses and emails for Python tests
- seed a development database with fake data in Python
- anonymize production data by replacing personal fields with fake values
- generate localized fake data for different countries and languages
- get the same fake data on every test run by seeding the generator
- generate fake data from the command line
Features
- providers for names, addresses, internet, phone numbers, text, dates, companies, credit cards, profiles and more
- many locales, and several locales at once
- unique values
- seeding for reproducible output
- custom providers
- pytest plugin with a faker fixture
- faker command line
Capabilities
| Has a command line tool | plan not known |
|---|---|
| Takes plugins | plan not known |
Alternatives
The same job
These do what Faker (Python) does.
- Faker Generate (almost) realistic fake data for testing, demos, and populating your database during development
