Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages.

Overview

Mimesis - Fake Data Generator


https://raw.githubusercontent.com/lk-geimfari/mimesis/master/media/readme-logo.png

Description

Github Actions Test Documentation Status Code Coverage CodeFactor PyPi Version Python version

Mimesis is a high-performance fake data generator for Python, which provides data for a variety of purposes in a variety of languages. The fake data could be used to populate a testing database, create fake API endpoints, create JSON and XML files of arbitrary structure, anonymize data taken from production and etc.

The key features are:

  • Performance: The fastest data generator available for Python.
  • Extensibility: You can create your own data providers and use them with Mimesis.
  • Generic data provider: The simplified access to all the providers from a single object.
  • Multilingual: Supports data for a lot of languages.
  • Data variety: Supports a lot of data providers for a variety of purposes.
  • Schema-based generators: Provides an easy mechanism to generate data by the schema of any complexity.
  • Country-specific data providers: Provides data specific only for some countries.

Installation

To install mimesis, simply use pip:

[venv] ~ ⟩ pip install mimesis

Usage

This library is really easy to use and everything you need is just import an object which represents a type of data you need (we call such object Provider).

In example below we import provider Person, which represents data related to personal information, such as name, surname, email and etc:

>>> from mimesis import Person
>>> person = Person('en')

>>> person.full_name()
'Brande Sears'

>>> person.email(domains=['mimesis.name'])
'[email protected]'

>>> person.email(domains=['mimesis.name'], unique=True)
'[email protected]'

>>> person.telephone(mask='1-4##-8##-5##3')
'1-436-896-5213'

More about the other providers you can read in our documentation.

Locales

Mimesis currently includes support for 34 different 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.

Let's take a look how it works:

>>> from mimesis import Person
>>> from mimesis.enums import Gender

>>> de = Person('de')
>>> en = Person('en')

>>> de.full_name(gender=Gender.FEMALE)
'Sabrina Gutermuth'

>>> en.full_name(gender=Gender.MALE)
'Layne Gallagher'

Providers

Mimesis support over twenty different data providers available, which can produce data related to people, food, computer hardware, transportation, addresses, internet and more.

See API Reference for more info.

The data providers are heavy objects since each instance of provider keeps in memory all the data from the provider's JSON file so you should not construct too many providers.

Generating structured data

You can generate dictionaries which can be easily converted to any the format you want (JSON/XML/YAML etc.) with any structure you want.

Let's build dummy API endpoint, using Flask to illustrate the idea:

from flask import Flask, jsonify, request
from mimesis.schema import Field, Schema
from mimesis.enums import Gender

app = Flask(__name__)


@app.route('/apps', methods=('GET',))
def apps_view():
    locale = request.args.get('locale', default='en', type=str)
    count = request.args.get('count', default=1, type=int)

    _ = Field(locale)

    schema = Schema(schema=lambda: {
        'id': _('uuid'),
        'name': _('text.word'),
        'version': _('version', pre_release=True),
        'timestamp': _('timestamp', posix=False),
        'owner': {
            'email': _('person.email', domains=['test.com'], key=str.lower),
            'token': _('token_hex'),
            'creator': _('full_name', gender=Gender.FEMALE)},
    })
    data = schema.create(iterations=count)
    return jsonify(data)

Below, on the screenshot, you can see a response from this fake API (/apps):

Schema and Fields

See Schema and Fields for more info.

Documentation

You 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.

How to Contribute

  1. Take a look at contributing guidelines.
  2. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
  3. Fork the repository on GitHub to start making your changes to the your_branch branch.
  4. Add yourself to the list of contributors.
  5. Send a pull request and bug the maintainer until it gets merged and published.

Thanks

Supported by JetBrains.

Disclaimer

The authors of Mimesis do not assume any responsibility for how you use it or how you use data generated with it. This library was designed with good intentions to make testing easier. Do not use the data generated with Mimesis for illegal purposes.

License

Mimesis is licensed under the MIT License. See LICENSE for more information.

Comments
  • Need support of other locales.

    Need support of other locales.

    We need to add:

    • 🇷🇴 Roumanian
    • 🇱🇹 Lithuanian
    • 🇱🇻 Latvian

    Feel free to send us request for another language which not in list.

    You should use: locale_template

    help wanted 
    opened by lk-geimfari 68
  • Full refactoring (restarting)  of the project

    Full refactoring (restarting) of the project

    We need to refactor this project. Completely.

    Goals:

    • [x] Remove useless providers/methods.
    • [x] Change the structure of the project.
    • [x] Bring the code in compliance with the requirements of PEP8.
    • [x] Add/Update documentation.
    • [x] Add auto deploy on PyPi on tag.
    • [x] Add mechanism for uglify json files (this will reduce the file size) only when deploy on PyPi, otherwise we can't normally edit json files when will update provider's data.
    • [ ] Find and fix bottlenecks in Generic(). Just run this script and you'll understand what i talking about.
    enhancement 
    opened by lk-geimfari 42
  • Second, third and fourth level domains

    Second, third and fourth level domains

    We can possible enhance internet provider to be able to generate fake domains like:

    • test.wemake.services
    • mail.google.com
    • app.test.example.com
    • example.co.uk And others.

    Link: https://en.wikipedia.org/wiki/Domain_name#Second-level_and_lower_level_domains

    enhancement help wanted hacktoberfest 
    opened by sobolevn 36
  • Check correctness of all data for all locales.

    Check correctness of all data for all locales.

    We have the support of 33 languages and it would be great if native-speakers of one's will check the correctness of data for his own language.

    For example. I'm Russian and I'm sure of the correctness of the data for this language. But we also want to be sure of the correctness of German (de, de-ch), Italian (it) and other languages.

    Checked locales:

    • [ ] cs
    • [ ] el
    • [ ] es-mx
    • [ ] es
    • [ ] et
    • [ ] fa
    • [ ] fi
    • [ ] hu
    • [ ] is
    • [ ] ja
    • [ ] kk
    • [ ] ko
    • [ ] nl-be
    • [ ] nl
    • [ ] no
    • [ ] sv
    • [ ] zh
    help wanted stale 
    opened by lk-geimfari 36
  • Seed does not work for some providers

    Seed does not work for some providers

    Description: Seems like @duckyou have found a bug in our code and seed is really does not work sometime and we should fix it.

    Reason: It's happening because we use custom_code which use another random object.

    Decision: We should move utils which use random to helpers.Random

    bug enhancement discussion 
    opened by lk-geimfari 30
  • Mimesis Simple HTTP Server

    Mimesis Simple HTTP Server

    Implement very simple http server like in module http.server, which returns generated data by mimesis.

    The idea is to pass template in header, and ignore body and query arguments, for future integration with another server.

    For example:

    Template:

    {
      "id": ":uuid",
      "version": "0.1.2",
      "owner.full_name": ":name :personal.surname",
      "owner.email": {"_type": "str", "_field": ":email", "_key": "lower"},
      "owner.phones": {"_type": "list", "_count": 5, "_field": [":telephone", "other1", "other2"]}
    }
    

    Output:

    {
      "id": "dfcfd2f3-0799-b519-1a94-326c978b10c6",
      "version": "0.1.2",
      "owner": {
        "full_name": "Charley Parker",
        "email": "[email protected]",
        "phones": ["776.907.0588", "717.592.4382", "168.028.7210", "other1", "other2"]
      }
    }
    

    Or we can implement something like jinja2 templating system for open customize output

    Some header examples:

    • Mimesis-Template - Template for response
    • Mimesis-Count - Count of outputs. Default: 0
      • 0 - Response contain object.
      • 1-99 - Response contain array of objects.
    • Mimesis-Locale - Response locale. Default: en

    It's may be helpful for prototyping some RESTful/GRAPHql api.

    question discussion 
    opened by duckyou 23
  • Support `choice` provider

    Support `choice` provider

    I want to be able to select any value from a given sequence.

    Like:

    mimesis('multiple_choice', items=['a', 'b', 'c'], number=2)
    # => ['b', 'a']
    
    mimesis('multiple_choice', items=['a', 'b', 'c'])
    # => ['b']
    
    mimesis('choice', items=['a', 'b', 'c'])
    # => 'a'
    

    It seems to be imposible right now.

    enhancement help wanted 
    opened by sobolevn 20
  • pypy support

    pypy support

    pypy has python3.5 support. http://doc.pypy.org/en/latest/release-v5.10.1.html

    So, maybe we can try to support that? It may give our users some performance increase.

    Checklist:

    • [ ] will it work
    • [ ] does it require any changes
    • [ ] add new travis/appveyor testing targets
    • [ ] add setup.py classifier
    • [ ] update docs
    opened by sobolevn 20
  • Greek locale (el)

    Greek locale (el)

    I created some data for the Greek locale and I added it to the necessary .py and .json files. Perhaps we can merge this data with the data from #185 .

    opened by TsimpDim 20
  • Proposal - store generated object field value to generate depended fields

    Proposal - store generated object field value to generate depended fields

    This is a proposal.

    Right now I type

    from elizabeth import Personal
    p = Personal('en')
    print( p.age() )
    print( p.age() )
    

    And got output

    25
    40
    

    Because age is generated by request and doesn't store in object p. What if I want to add the field child_count or work experience, depend on previously generated age value?

    enhancement 
    opened by yn-coder 20
  • Type hinting

    Type hinting

    I have started to use mypy. Aaaand it is not so good right now.

    Libraries lack typing support. And I know that mimesis support only python3. Do you consider adding type hints?

    There are some advantages:

    • stricter API
    • static analysis support to improve quality

    There are some disadvantages:

    • type hinting was introduced in python3.5, so any version prior to that will have to use special comments or other hacks
    • a lot of manual work
    • possible API changes
    enhancement 
    opened by sobolevn 19
  • Bump setuptools from 65.3.0 to 65.5.1

    Bump setuptools from 65.3.0 to 65.5.1

    Bumps setuptools from 65.3.0 to 65.5.1.

    Changelog

    Sourced from setuptools's changelog.

    v65.5.1

    Misc ^^^^

    • #3638: Drop a test dependency on the mock package, always use :external+python:py:mod:unittest.mock -- by :user:hroncok
    • #3659: Fixed REDoS vector in package_index.

    v65.5.0

    Changes ^^^^^^^

    • #3624: Fixed editable install for multi-module/no-package src-layout projects.
    • #3626: Minor refactorings to support distutils using stdlib logging module.

    Documentation changes ^^^^^^^^^^^^^^^^^^^^^

    • #3419: Updated the example version numbers to be compliant with PEP-440 on the "Specifying Your Project’s Version" page of the user guide.

    Misc ^^^^

    • #3569: Improved information about conflicting entries in the current working directory and editable install (in documentation and as an informational warning).
    • #3576: Updated version of validate_pyproject.

    v65.4.1

    Misc ^^^^

    • #3613: Fixed encoding errors in expand.StaticModule when system default encoding doesn't match expectations for source files.
    • #3617: Merge with pypa/distutils@6852b20 including fix for pypa/distutils#181.

    v65.4.0

    Changes ^^^^^^^

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 1
  • fix: hardware manufacturers

    fix: hardware manufacturers

    Fix hardware manufacturer

    tweak AUTO_MANUFACTURERS to MANUFACTURERS

    Checklist

    • [x] I have read contributing guidelines
    • [x] I'm sure that I did not unrelated changes in this pull request
    • [ ] I have created at least one test case for the changes I have made
    provider-changes 
    opened by hack-wrench 0
  • Bump types-pytz from 2022.4.0.0 to 2022.7.0.0

    Bump types-pytz from 2022.4.0.0 to 2022.7.0.0

    Bumps types-pytz from 2022.4.0.0 to 2022.7.0.0.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump pytz from 2022.5 to 2022.7

    Bump pytz from 2022.5 to 2022.7

    Bumps pytz from 2022.5 to 2022.7.

    Commits
    • 309a457 Update i18n section of README
    • 67b32d0 Separete legacy tests to run in legacy container
    • ce19dbe Bump version numbers to 2022.7/2022g
    • 7285e70 IANA 2022g
    • 3a52798 Squashed 'tz/' changes from d3dc2a9d6..9baf0d34d
    • 8656870 Let _all_timezones_unchecked be garbage collected when no longer needed
    • bd3e51f Rename all_timezones_unchecked to strongly indicate it is not public
    • 01592a9 Merge pull request #90 from eendebakpt/import_time_lazy_list
    • 5e9f112 lazy timezone
    • 4ebc28d Bump version numbers to 2022.6 / 2022f
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump certifi from 2022.6.15 to 2022.12.7

    Bump certifi from 2022.6.15 to 2022.12.7

    Bumps certifi from 2022.6.15 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 1
  • Bump check-manifest from 0.48 to 0.49

    Bump check-manifest from 0.48 to 0.49

    Bumps check-manifest from 0.48 to 0.49.

    Changelog

    Sourced from check-manifest's changelog.

    0.49 (2022-12-05)

    • Add Python 3.11 support.

    • Drop Python 3.6 support.

    • Exclude more common dev/test files.

    Commits
    • 00a3953 Preparing release 0.49
    • fd932df Use type annotations on class attributes
    • 45c925f isort insists on this blank line, wtf?
    • 80549f4 Fix tests on OpenIndiana where /usr/bin/false exits with 255
    • 6982e1a Merge pull request #160 from mgedmin/py311
    • 2e59b5d Support Python 3.11
    • 7b8c279 Merge pull request #159 from mgedmin/fix-git-submodule-tests-using-file-protocol
    • 1ce75c4 Try a different workaround
    • 3fc1989 git config doesn't work, try git -c
    • 227fb10 Spell the name of the file: protocol correctly
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
Releases(v7.0.0)
  • v7.0.0(Dec 17, 2022)

  • v6.1.1(Oct 2, 2022)

  • v6.1.0(Oct 1, 2022)

  • v6.0.0(Aug 8, 2022)

  • v5.6.1(Aug 6, 2022)

  • v5.6.0(Aug 6, 2022)

  • v5.5.0(Jun 22, 2022)

  • v5.4.0(May 22, 2022)

    Fixed:

    • Fixed TypeError: 'Datetime' object is not callable error on using Field (See#1139).

    Added:

    • Added items Algorithm.BLAKE2B and Algorithm.BLAKE2S.

    Removed:

    • Removed deprecated method image_placeholder() from Internet()
    Source code(tar.gz)
    Source code(zip)
  • v5.3.0(Jan 25, 2022)

    Added:

    Optimizations:

    • Significantly improved performance of shortcuts.romanize().
    • Use random.choices() to generate random strings instead of random.choice() for selecting individual characters. This can lead to a significant speedup, but will also change the reproducibility of values when upgrading to this version as the two methods use different algorithms.
    • Optimized Address.latitude(), Address.longitude(), and Address.coordinates() when passing dms=True.
    • Optimized Development.version().

    Fixed:

    • Fix duplication of parameter name on using Internet.query_parameter() (See #1177).
    • Fix reseeding of the random generator of Generic. This was a regression in v5.1.0. (See #1150).
    • Development.version() now supports use of both the calver and pre_release flags together.
    • Providers now have an isolated random instance when using a seed of None.
    Source code(tar.gz)
    Source code(zip)
    mimesis-5.3.0-py3-none-any.whl(4.15 MB)
    mimesis-5.3.0.tar.gz(4.12 MB)
  • v5.2.0(Dec 11, 2021)

  • v5.1.0(Nov 5, 2021)

  • v5.0.0(Jun 20, 2021)

    Version 5.0.0

    Note: This release is still under active development. Warning: This release contains some breaking changes in API.

    Renamed:

    • Rename enums.UnitName to enums.MeasureUnit
    • Rename enums.PrefixSign to enums.MetricPrefixSign
    • Rename Business() to Finance()

    Fixed:

    • Fix inheritance issues for Generic, now it inherits BaseProvider instead of BaseDataProvider
    • Fix locale-independent provider to make them accepts keyword-only arguments
    • Fix DenmarkSpecProvider CPR to generate valid CPR numbers.
    • Fix .cvv() to make it return string
    • Fix .cid() to make it return string
    • Fix .price() of Finance to make it return float.

    Added:

    • Added class Locale to mimesis.locales
    • Added measure_unit() and .metric_prefix() methods for Science
    • Added methods .iterator() and .loop() for schema.Schema
    • Added methods .slug() and ip_v4_with_port() for Internet()
    • Added incremental() method for Numbers()
    • Added methods .stock_ticker(), .stock_name() and .stock_exchange() for Finance()
    • Added BinaryFile data provider which provides binary data files, such as .mp3, .mp4, .png, etc.

    Removed:

    • Removed invalid names and surnames from person.json for ru locale
    • Removed data provider UnitSystem(), use instead Science()
    • Removed data provider Structure(), use instead schema.Schema
    • Removed GermanySpecProvider
    • Removed method copyright() of Finance()
    • Removed method network_protocol() of Internet()
    • Removed params with_port and port_range for .ip_v4() of Internet(). Use .ip_v4_with_port() instead
    • Removed method .sexual_orientation(), .social_media_profile() and .avatar() of Person()
    • Removed a bunch of useless custom exceptions and replaced them with FieldError
    • Removed completely useless chemical_element and atomic_number methods of Science data provider and made it locale-independent
    Source code(tar.gz)
    Source code(zip)
    mimesis-5.0.0-py3-none-any.whl(4.15 MB)
    mimesis-5.0.0.tar.gz(4.12 MB)
  • v4.1.3(Dec 21, 2020)

  • v4.1.2(Aug 29, 2020)

  • v4.1.1(Aug 16, 2020)

    Version 4.1.1

    Fix:

    • Fixed issue with non-unique uuid

    Version 4.1.0

    Added:

    • Added method manufacturer() for class Transport()
    • Added sk (Slovak) locale support
    • Added new parameter unique for method Person().email()
    • Added new parameter as_object for method Cryptographic().uuid()

    Updated:

    • Update parameter end for some methods of provider Datetime() (Fix #870)
    • Update .price() to make it supported locales (Fix #875)

    Rename:

    • Renamed decorators.romanized to decorators.romanize
    • Renamed Random.schoice to Random.generate_string
    • Renamed BaseDataProvider.pull to BaseDataProvider._pull

    Removed:

    • Removed the deprecated download_image() function from the shortcuts module, use your own custom downloader instead.
    • Removed parameter version for method Cryptographic().uuid()
    Source code(tar.gz)
    Source code(zip)
    mimesis-4.1.1.tar.gz(2.66 MB)
  • v4.0.0(Feb 10, 2020)

    This release (4.0.0) contains some insignificant but breaking changes in API, please be careful.

    Added:

    • Added an alias .first_name(*args, **kwargs) for the method Person().name()
    • Added an alias .sex(*args, **kwargs) for the method Person().gender()
    • Added method randstr() for class Random()
    • Added method complexes() for the provider Numbers()
    • Added method matrix for the provider Numbers()
    • Added method integer_number() for the provider Numbers()
    • Added method float_number() for the provider Numbers()
    • Added method complex_number() for the provider Numbers()
    • Added method decimal_number() for the provider Numbers()
    • Added method ip_v4_object() and ip_v6_object for the provider Internet(). Now you can generate IP objects, not just strings.
    • Added new parameter port_range for method ip_v4()
    • Added new parameter separator for method Cryptographic().mnemonic_phrase()

    Fixed:

    • Fixed issue with invalid email addresses on using custom domains without @ for Person().email()

    Updated:

    • Updated names and surnames for locale ru
    • The floats() function in the Numbers provider now accepts arguments about the range of the generated float numbers and the rounding used. By default, it generates a list of n float numbers insted of a list of 10^n elements.
    • The argument length of the function integers is renamed to n.

    Removed:

    • Removed the rating() method from the Numbers provider. It can be replaced with float_number().
    • Removed the primes() method from the Numbers provider.
    • Removed the digit() method from the Numbers provider. Use integer_number() instead.
    • Removed the between() method from the Numbers provider. Use integer_number() instead.
    • Removed the math_formula() method from the Science provider.
    • Removed the rounding argument from floats(). Now it's precision.
    Source code(tar.gz)
    Source code(zip)
    mimesis-4.0.0-py3-none-any.whl(2.67 MB)
    mimesis-4.0.0.tar.gz(2.59 MB)
  • v3.3.0(Jul 31, 2019)

    Fixed:

    • country() from the Address() provider now by default returns the country name of the current locale.
    • Separated Europe and Asia continents in Italian locale.

    Removed:

    • Removed duplicated names in the countries of et locale.
    Source code(tar.gz)
    Source code(zip)
  • v3.2.0(May 18, 2019)

    Added:

    • Added built-in provider DenmarkSpecProvider()
    • Added built-in provider ItalianSpecProvider()
    • Added meta classes for providers for internal usage (see #621)
    • Added support for custom templates in Person().username()

    Fixed:

    • Support of seed for custom providers
    • currency_iso_code from the Business() provider now by default returns the currency code of the current locale.

    Removed:

    • Removed multiple_choice() in the random module because it was unused and it could be replaced with random.choices.
    • Removed legacy method child_count() from provider Person()
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(May 18, 2019)

  • v3.0.0(Dec 15, 2018)

    Warning: This release (3.0.0) contains some breaking changes in API. Warning: In this release (3.0.0) we've reject support of Python 3.5.

    Added:

    • Added provider Choice()
    • Added method formatted_time() for Datetime() provider
    • Added method formatted_date() for Datetime() provider
    • Added method formatted_datetime() for Datetime() provider
    • Added support of timezones (optional) for Datetime().datetime()
    • Added method to bulk create datetime objects: Datetime().bulk_create_datetimes()
    • Added kpp for RussiaSpecProvider
    • Added PolandSpecProvider builtin data provider
    • Added context manager to temporarily overriding locale - BaseDataProvider.override_locale()
    • Added method token_urlsafe() for Cryptographic provider
    • Added 6k+ username words

    Updated:

    • Updated documentation
    • Updated data for pl and fr
    • Updated SNILS algorithm for RussiaSpecProvider
    • Updated method Datetime().time() to return only datetime.time object
    • Updated method Datetime().date() to return only datetime.date object
    • Completely annotated all functions
    • Locale independent providers inherit BaseProvider instead of BaseDataProvider (it's mean that locale independent providers does not support parameter locale anymore)
    • Now you can add to Generic only providers which are subclasses of BaseProvider to ensure a single instance of random.Random() for all providers

    Renamed:

    • Renamed provider ClothingSizes to Clothing, so now it can contain any data related to clothing, not sizes only
    • Renamed Science().dna() to Science().dna_sequence()
    • Renamed Science().rna() to Science().rna_sequence()
    • Renamed module helpers.py to random.py
    • Renamed module config.py to locales.py
    • Renamed module utils.py to shortcuts.py
    • Renamed Cryptographic().bytes() to Cryptographic.token_bytes()
    • Renamed Cryptographic().token() to Cryptographic.token_hex()

    Removed:

    • Removed deprecated argument fmt for Datetime().date(), use Datetime().formatted_date() instead
    • Removed deprecated argument fmt for Datetime().time(), use Datetime().formatted_time() instead
    • Removed deprecated argument humanize for Datetime().datetime(), use Datetime().formatted_datetime() instead
    • Removed deprecated method Science.scientific_article()
    • Removed deprecated providers Games
    • Removed deprecated method Structure().json(), use schema.Schema() and schema.Field instead
    • Removed deprecated and useless method: Development().backend()
    • Removed deprecated and useless method: Development().frontend()
    • Removed deprecated and useless method:Development().version_control_system()
    • Removed deprecated and useless method: Development().container()
    • Removed deprecated and useless method: Development().database()
    Source code(tar.gz)
    Source code(zip)
  • 2.1.0(Jun 17, 2018)

    Added:

    • Added a list of all supported locales as mimesis/locales.py

    Updated:

    • Changed how Internet provider works with stock_image
    • Changed how random module works, now exposing global Random instance
    • Updated dependencies

    Fixed:

    • Prevents ROMANIZED_DICT from mutating
    • Fixed appveyour builds
    • Fixed flake8-builtins checks
    • Fixed some mypy issues with strict mode
    Source code(tar.gz)
    Source code(zip)
  • v2.0.1(Apr 1, 2018)

  • v2.0.0(Feb 9, 2018)

    Version 2.0.0

    Added:

    • Added items IOC and FIFA for enum object CountryCode

    • Added support of custom providers for schema.Field

    • Added support of parameter dms for coordinates, longitude, latitude

    • Added method Text.rgb_color

    • Added support of parameter safe for method Text.hex_color

    • Added an alias zip_code for Address.postal_code

    Optimizations:

    • Significantly improved performance of schema.Field
    • Other minor improvements

    Updated/Renamed:

    • Updated method integers
    • Renamed provider Personal to Person
    • Renamed provider Structured to Structure
    • Renamed provider ClothingSizes to ClothingSize
    • Renamed json file personal.json to person.json for all locales
    • Renamed country_iso_code to country_code in Address data provider
    Source code(tar.gz)
    Source code(zip)
  • v1.0.5(Jan 19, 2018)

    Version 1.0.5

    Added:

    • Added method RussiaSpecProvider.inn

    Fixed:

    • Fixed issue with seed for providers.Cryptographic.bytes
    • Fixed issue #375

    Optimizations:

    • Optimized method Text.hex_color
    • Optimized method Address.coordinates
    • Optimized method Internet.ip_v6

    Tests:

    • Grouped tests in classes
    • Added tests for seeded data providers
    • Other minor optimizations and improvements
    Source code(tar.gz)
    Source code(zip)
  • v1.0.4(Jan 4, 2018)

  • v1.0.3(Dec 20, 2017)

    Fixed:

    • Fixed issue with seed #325

    Mover/Removed:

    • Moved custom_code to helpers.Random

    Optimizations:

    • Optimized custom_code and it works faster by ≈50%
    • Other minor optimizations in data providers
    Source code(tar.gz)
    Source code(zip)
  • v1.0.2(Dec 16, 2017)

    Added:

    • Added method ethereum_address for Payment
    • Added method get_current_locale for BaseProvider
    • Added method boolean for Development which returns random boolean value
    • Added method integers for Numbers
    • Added new built in specific provider UkraineSpecProvider
    • Added support of key functions for the object schema.Field
    • Added object schema.Schema which helps generate data by schema

    Fixed:

    • Fixed issue full_name when method return female surname for male name and vice versa
    • Fixed bug with improper handling of attributes that begin with an underscore for class schema.Field

    Updated:

    • Updated method version for supporting pre-releases and calendar versioning
    • Renamed methods international, european and custom to international_size, european_size and custom_size
    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Dec 4, 2017)

  • v1.0.0(Dec 3, 2017)

    Version 1.0.0

    This is a first major version of mimesis and here are breaking changes (including changes related to support for only the latest versions of Python, i.e Python 3.5 and Python 3.6), so there is no backwards compatibility with early versions of this library.

    Added:

    • Added Field for generating data by schema
    • Added new module typing.py for custom types
    • Added new module enums.py and support of enums in arguments of methods
    • Added category_of_website and port to Internet data provider
    • Added mnemonic_code for Cryptography data provider
    • Added price_in_btc and currency_symbol to Business data provider
    • Added dna, rna and atomic_number to Science data provider
    • Added vehicle_registration_code to Transport data provider
    • Added schoice method for Random
    • Added alias last_name for surname in Personal data provider
    • Added alias province, region, federal_subject for state in Address data provider
    • Added annotations for all methods and functions for supporting type hints
    • Added new data provider Payment
    • Added new methods to Payment: credit_card_network, bitcoin_addres (previously bitcoin), credit_card_owner

    Fixed:

    • Fixed issue with primes in Numbers data provider
    • Fixed issue with repeated output on using Code().custom code
    • Other minor fix and improvements

    Mover/Removed:

    • Moved credit_card, credit_card_expiration_date, cid, cvv, paypal and bitcoin to Payment from Personal
    • Moved custom_code to utils.py from providers.code.Code
    • Removed some useless methods
    • Removed module constants, in view of adding more convenient and useful module enums
    • Removed non informative custom exception WrongArgument and replaced one with KeyError and NonEnumerableError
    • Parameter category of method hashtags is deprecated and was removed
    • Removed all methods from UnitSystem and replaced ones with unit().

    Updated/Renamed:

    • Updated data for de-at, en, fr, pl, pt-br, pt, ru, uk
    • Other minor updates in other languages
    • Renamed country_iso to country_iso_code in Address data provider
    • Renamed currency_iso to currency_iso_code in Business data provider
    Source code(tar.gz)
    Source code(zip)
  • v0.0.10(Oct 5, 2017)

Owner
Isaak Uchakaev
Backend Engineer & Open Source Enthusiast.
Isaak Uchakaev
create custom test databases that are populated with fake data

About Generate fake but valid data filled databases for test purposes using most popular patterns(AFAIK). Current support is sqlite, mysql, postgresql

Emir Ozer 2.2k Jan 6, 2023
Meinheld is a high performance asynchronous WSGI Web Server (based on picoev)

What's this This is a high performance python wsgi web server. And Meinheld is a WSGI compliant web server. (PEP333 and PEP3333 supported) You can als

Yutaka Matsubara 1.4k Jan 1, 2023
Green is a clean, colorful, fast python test runner.

Green -- A clean, colorful, fast python test runner. Features Clean - Low redundancy in output. Result statistics for each test is vertically aligned.

Nathan Stocks 756 Dec 22, 2022
Scalable user load testing tool written in Python

Locust Locust is an easy to use, scriptable and scalable performance testing tool. You define the behaviour of your users in regular Python code, inst

Locust.io 20.4k Jan 8, 2023
A cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard.

PyAutoGUI PyAutoGUI is a cross-platform GUI automation Python module for human beings. Used to programmatically control the mouse & keyboard. pip inst

Al Sweigart 7.6k Jan 1, 2023
splinter - python test framework for web applications

splinter - python tool for testing web applications splinter is an open source tool for testing web applications using Python. It lets you automate br

Cobra Team 2.6k Dec 27, 2022
Let your Python tests travel through time

FreezeGun: Let your Python tests travel through time FreezeGun is a library that allows your Python tests to travel through time by mocking the dateti

Steve Pulec 3.5k Jan 9, 2023
HTTP client mocking tool for Python - inspired by Fakeweb for Ruby

HTTPretty 1.0.5 HTTP Client mocking tool for Python created by Gabriel Falcão . It provides a full fake TCP socket module. Inspired by FakeWeb Github

Gabriel Falcão 2k Jan 6, 2023
A utility for mocking out the Python Requests library.

Responses A utility library for mocking out the requests Python library. Note Responses requires Python 2.7 or newer, and requests >= 2.0 Installing p

Sentry 3.8k Jan 2, 2023
A test fixtures replacement for Python

factory_boy factory_boy is a fixtures replacement based on thoughtbot's factory_bot. As a fixtures replacement tool, it aims to replace static, hard t

FactoryBoy project 3k Jan 5, 2023
Mixer -- Is a fixtures replacement. Supported Django, Flask, SqlAlchemy and custom python objects.

The Mixer is a helper to generate instances of Django or SQLAlchemy models. It's useful for testing and fixture replacement. Fast and convenient test-

Kirill Klenov 871 Dec 25, 2022
Coroutine-based concurrency library for Python

gevent Read the documentation online at http://www.gevent.org. Post issues on the bug tracker, discuss and ask open ended questions on the mailing lis

gevent 5.9k Dec 28, 2022
Radically simplified static file serving for Python web apps

WhiteNoise Radically simplified static file serving for Python web apps With a couple of lines of config WhiteNoise allows your web app to serve its o

Dave Evans 2.1k Jan 8, 2023
livereload server in python (MAINTAINERS NEEDED)

LiveReload Reload webpages on changes, without hitting refresh in your browser. Installation python-livereload is for web developers who know Python,

Hsiaoming Yang 977 Dec 14, 2022
A screamingly fast Python 2/3 WSGI server written in C.

bjoern: Fast And Ultra-Lightweight HTTP/1.1 WSGI Server A screamingly fast, ultra-lightweight WSGI server for CPython 2 and CPython 3, written in C us

Jonas Haag 2.9k Dec 21, 2022
Waitress - A WSGI server for Python 2 and 3

Waitress Waitress is a production-quality pure-Python WSGI server with very acceptable performance. It has no dependencies except ones which live in t

Pylons Project 1.2k Dec 30, 2022
Python HTTP Server

Python HTTP Server Preview Languange and Code Editor: How to run? Download the zip first. Open the http.py and wait 1-2 seconds. You will see __pycach

SonLyte 16 Oct 21, 2021
PyQaver is a PHP like WebServer for Python.

PyQaver is a PHP like WebServer for Python.

Dev Bash 7 Apr 25, 2022
Robyn is an async Python backend server with a runtime written in Rust, btw.

Robyn is an async Python backend server with a runtime written in Rust, btw. Python server running on top of of Rust Async RunTime. Installation

Sanskar Jethi 1.8k Dec 30, 2022