lk-geimfari

mimesis: Generate Realistic Fake Data in Python

Mimesis generates realistic synthetic data across languages and locales for Python development and testing. Use it to create test records, API fixtures, sample datasets, or structured and relational data.

Stars
4.8k
Forks
364
Stars, last 7 days
+5

Our take

Health score

49/100

How it is scored
Activity
55
Community
65
Issues
34
Pull requests
43

+5 stars in the last 7 days

  • More contributors than 77% of the projects we track
  • Slower to close issues than 89% of the projects we track

Overview

Mimesis is a Python library for generating realistic synthetic data, from personal details and contact information to dates and financial values. It helps developers create representative data without manually crafting records or relying on real personal information.

It is a good fit for test databases, mocked responses, fixtures, and sample datasets. Its providers and schema-oriented tools support both individual values and more structured or related data. See the repository README and documentation for details.

Key Features

  • Generates varied data such as names, addresses, dates, phone numbers, email addresses, and financial values.
  • Supports 47 locales for generating data in different languages and regional contexts.
  • Provides data providers with a consistent Python API.
  • Supports custom providers and field handlers for project-specific data.
  • Generates structured data from schemas, including nested structures.
  • Supports relational datasets with foreign keys.
  • Includes typed APIs for editor autocompletion.

Use Cases

  • Application developers can seed development or test databases with varied records instead of entering data manually.
  • API developers and testers can create realistic mock responses and JSON or XML fixtures.
  • Data scientists can build sample datasets for development and demonstrations without using production records.
  • Teams handling sensitive data can generate synthetic replacements when anonymizing production data is useful.
  • Test authors can use locale-specific values to exercise forms and workflows across regional settings.

Getting Started

Install with pip:

pip install mimesis

See the README for usage examples and the documentation for providers, schemas, and API details.

Alternatives

  • faker: Faker also generates localized synthetic data for Python tests, with a broad provider ecosystem; Mimesis offers its own generators and locale coverage.
  • fake2db: fake2db focuses on generating and inserting fake records into supported databases, while Mimesis is a general-purpose data-generation library.
ProjectLanguageLicenseStarsStatus
mimesisPythonMIT4.8kNot checked yet
fakerPythonMIT19.4kActive
fake2dbPythonGPL-2.02.3kInactive

Considerations

  • Mimesis generates synthetic data, so its output is suitable for development and testing but should not be treated as verified real-world information.
  • Locale-specific generation is available, but the appropriate locale and generated fields depend on the scenario being tested.
  • The README lists Python 3.10 through 3.14 and PyPy among supported runtimes. Check the documentation for current installation and compatibility details.

Found this useful?

Share it with someone who would like mimesis.

Comparisons