Mimesis 是一个 Python 库,用于在多种语言和区域环境中生成虚假但逼真的数据。
Mimesis: The Fake Data Generator
Documentation: https://mimesis.name/
Mimesis (/mɪˈmiːsɪs) is a Python library for generating fake but realistic data in multiple languages and locales. It can generate names, addresses, dates, phone numbers, emails, financial data, and many other types of values.
It is commonly used to populate test databases, mock API responses, generate JSON or XML fixtures, create sample datasets, and anonymize production data. Mimesis provides a simple, consistent API that makes it easy to generate realistic data for development and testing.
The key features are:
To install Mimesis, use pip:
~ pip install mimesisYou can find the complete documentation on the Read the Docs.
It is divided into several sections:
You can improve it by sending pull requests to this repository.
Import a data provider that corresponds to the data type you need.
For example, the Person provider gives access to personal information, including name, surname, email, and other related fields:
from mimesis import Person
from mimesis.locales import Locale
person = Person(Locale.EN)
person.full_name()
# Output: 'Brande Sears'
person.email(domains=['example.com'])
# Output: '[email protected]'
person.email(domains=['mimesis.name'], unique=True)
# Output: '[email protected]'
person.telephone(mask='1-4##-8##-5##3')
# Output: '1-436-896-5213'Mimesis is licensed under the MIT License. See LICENSE for more information.
暂无开放 Issues,或尚未同步最近议题。