Mimesis

Latest version: v18.0.0

Safety actively analyzes 688746 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 6 of 9

5.0.0

-------------

**Warning**: This release contains some breaking changes in API.

**Python compatibility**:

Mimesis 5.0 supports Python 3.8, 3.9, and 3.10.

The Mimesis 4.1.3 is the last to support Python 3.6 and 3.7.

**Reworked**:

- A method ``Person().username()``, now it accepts a parameters ``mask`` and ``drange``.

**Renamed**:

- Renamed ``enums.UnitName`` to ``enums.MeasureUnit``
- Renamed ``enums.PrefixSign`` to ``enums.MetricPrefixSign``
- Renamed ``Business()`` to ``Finance()``
- Renamed ``BaseDataProvider.pull`` to ``BaseDataProvider._load_datafile``
- Renamed ``mimesis.providers.numbers.Numbers`` to ``mimesis.providers.numeric.Numeric``
- Renamed ``fmt`` argument of ``Address().country_code()`` to ``code``

**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 method ``hostname()`` for ``Internet`` data provider
- Added support of ``**kwargs`` for a method ``add_provider`` of ``Generic()`` provider
- Added enum ``Locale`` to ``mimesis.enums`` and ``mimesis.locales``
- Added ``measure_unit`` and ``metric_prefix`` methods for the ``Science`` provider.
- Added ``.iterator()`` for ``schema.Schema``
- Added methods ``.slug()`` and ``ip_v4_with_port()`` for ``Internet()``
- Added ``increment()`` 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 module ``decorators``. Use ``shortcuts.romanize`` to romanize Cyrillic strings.
- Removed ``as_object`` parameter for ``.uuid()``. Now it returns string by default, if you need uuid4 object then use ``.uuid_object()``
- Removed invalid names and surnames from ``person.json`` for ``ru`` locale
- Removed data provider ``UnitSystem()``, use ``Science()`` instead
- Removed data provider ``Structure()``, use ``schema.Schema`` instead
- Removed builtin provider ``GermanySpecProvider``
- Removed data provider ``Clothing``, use ``Numbers`` instead
- 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 methods ``sexual_orientation``, ``social_media_profile`` and ``avatar`` of the ``Person()`` provider.
- 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.

4.1.3

-------------

**Added**:

- Added ``py.typed`` file to the package
- Added ``Python 3.9`` support

4.1.2

-------------

**Fix**:

- Fixed type hint issue for ``schema.Schema`` (`928 <https://github.com/lk-geimfari/mimesis/issues/928>`_)

4.1.1

-------------

**Fix**:

- Fixed issue with non-unique uuid

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**:

- Updated parameter ``end`` for some methods of provider ``Datetime()`` (Fix 870)
- Updated ``.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()``

4.0.0

-------------

.. warning:: 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 instead 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 ``rounding`` argument from ``floats()``. Now it's ``precision``.

Page 6 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.