Repolode
joke2k

joke2k/faker

A Python package that generates fake data such as names, addresses, text and more, for seeding databases, testing and anonymizing data.

Stars
19,484
Forks
2,141
Open issues
50
Last commit
10 days ago

What is it?

Faker is a Python package for generating fake data. It is useful for bootstrapping a database, producing sample XML documents, filling a persistence layer to stress test it, or anonymizing data taken from a production service.

Calling a property such as name() or address() on a Faker instance returns a random value of that type. Faker is organized into providers, and it supports localized data through locale codes such as it_IT or ja_JP, with multiple locales able to be combined. Output can be made reproducible with seeding, and a unique property guarantees non-repeating values. A command-line interface is also included for generating data from a shell.

Faker ships with a pytest fixture and can be extended with custom or dynamic providers. It integrates with factory_boy, and it supports Python 3.8 and above in its current major release.

Key features

  • 01Generates names, addresses, text, and many other fake data types through a simple method call.
  • 02Supports localized data via locale codes and combining multiple locales.
  • 03Allows reproducible output through seeding.
  • 04Provides a unique property to avoid duplicate values.
  • 05Includes a command-line interface and a pytest fixture.
  • 06Lets you add custom or dynamic providers.

Use cases

  • Seeding a development or staging database with realistic sample records.
  • Stress testing an application's persistence layer with large volumes of data.
  • Anonymizing production data before sharing it with other teams.
  • Generating deterministic test fixtures in unit tests.

Quick start

  1. 1

    Install Faker with pip

    pip install Faker
  2. 2

    Create a generator and call a fake data method such as name()

In collections

Topics

FAQ

What is faker?
A Python package that generates fake data such as names, addresses, text and more, for seeding databases, testing and anonymizing data. Faker is a Python package for generating fake data. It is useful for bootstrapping a database, producing sample XML documents, filling a persistence layer to stress test it, or anonymizing data taken from a production service.
Is faker free to use? What license does it have?
faker is open source under the MIT license. Check the license terms before using it in commercial products.
Is faker still maintained?
Actively maintained. The last commit to faker was on Oct 28, 2026.
What can I use faker for?
Seeding a development or staging database with realistic sample records. Stress testing an application's persistence layer with large volumes of data. Anonymizing production data before sharing it with other teams. Generating deterministic test fixtures in unit tests.
How do I install faker?
Install Faker with pip: pip install Faker Create a generator and call a fake data method such as name()
Where can I get faker?
The source code and installation instructions are on GitHub: https://github.com/joke2k/faker

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects