Mimesis: Fake Data Generator

19.1.0 · active · verified Sat Apr 11

Mimesis is a powerful and fast fake data generator for Python. It provides data for a variety of purposes, including populating databases, creating test data, and anonymizing existing datasets. As of version 19.1.0, it supports numerous locales and data types. The library maintains an active development pace, with regular minor and major releases introducing new features, locales, and performance improvements, often on a monthly or bi-monthly cadence.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize a `Generic` data generator with a specific locale and generate various types of fake data. It also shows direct initialization of a specific provider like `Person`.

from mimesis import Generic
from mimesis.enums import Locale

# Initialize with a specific locale
generator = Generic(locale=Locale.EN)

# Generate some fake data
name = generator.person.full_name()
email = generator.person.email()
address = generator.address.full_address()
company = generator.business.company()

print(f"Name: {name}")
print(f"Email: {email}")
print(f"Address: {address}")
print(f"Company: {company}")

# Example with a specific provider
person_provider = Person(Locale.RU)
print(f"Russian Phone: {person_provider.phone_number()}")

view raw JSON →