Mimesis: mock data for developers.
Project description
Mimesis
Mimesis is a fast and easy to use the library for Python programming language, which helps generate mock data for a variety of purposes in a variety of languages. This data can be particularly useful during software development and testing. For example, it could be used to populate a testing database for a web application with user information such as email addresses, usernames, first names, last names, etc.
Documentation
Mimesis is very simple to use, and the below examples should help you get started. Complete documentation for Mimesis is available on Read the Docs.
Installation
To install mimesis, simply use pip (or pipenv):
➜ ~ pip install mimesis
Also, you can install it manually:
(env) ➜ python3 setup.py install
# or
(env) ➜ make install
Getting started
As we said above, this library is really easy to use. A simple usage example is given below:
>>> from mimesis import Personal
>>> from mimesis.enums import Gender
>>> person = Personal('en')
>>> person.full_name(gender=Gender.FEMALE)
'Antonetta Garrison'
>>> person.occupation()
'Backend Developer'
>>> for template in ('U_d', 'U-d', 'l_d', 'l-d'):
... person.username(template=template)
'Adders_1893'
'Abdel-1888'
'constructor_1884'
'chegre-2051'
Locales
You can specify a locale when creating providers and they will return data that is appropriate for the language or country associated with that locale. Mimesis currently includes support for 33 different locales.
Data Providers
List of supported data providers available here
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.