Changelog¶
Version 18.0.0¶
Added support of Arabic for various arabic countries.
Version 17.1.0¶
Added the iata_code() method for the Address provider.
Added the icao_code() method for the Address provider.
Added the asn method for the Internet provider.
Added the special_ip_v4_object() and special_ip_v4() methods for the Internet provider, along with the IPv4Purpose enum for those methods.
Version 17.0.0¶
Added
mimesis.enums.DurationUnit
enum.Added
.duration()
method forDatetime
provider to generate random durations.
Version 16.0.0¶
Removed unsafe and inaproppriate words from datasets. See #1511
Fix file permissions in Windows.
Version 15.1.0¶
Minor fixes in
factory_boy
plugin.
Version 15.0.0¶
Integrated mimesis-factory into Mimesis itself. See mimesis-factory#246 and mimesis#1494 for more information.
Version 14.0.0¶
Fixed street suffixes for locale Locale.HR.
Made pytest-mimesis a part of Mimesis itself.
Version 13.1.0¶
Version 13.0.0¶
Added Croatian locale support (
Locale.HR
). Great appreciation to @CerealKiller0807 for this contribution.
Version 12.1.0¶
Methods
gender_code()
andgender_symbol()
have been added for thePerson
provider.The methods
gender()
andsex()
no longer accept arguments likeiso5218
andsymbol
. Please usegender_code()
andgender_symbol()
instead.Added a stub for
mimesis.providers.generic.py
, enabling type hints forGeneric
.
Version 12.0.0¶
Python 3.8 and 3.9 are no longer supported.
Added support for field aliases. See the docs for more information.
Added the method calver for Development.
Added the method stage for Development.
Added the method country_emoji_flag for Address.
Removed the method hashtags from the Internet provider. Use the words method from the Text provider instead.
Removed the providers parameter for Field and Fieldset. Use custom field handlers instead.
Removed the parameters pre_release and calver for Development.version. Use the stage and calver methods instead.
Moved the method emoji from the Internet provider to the Text provider.
Moved the method dsn from the Development provider to the Internet provider.
The Text().emoji() method now supports the category parameter and EmojiCategory enum. It also returns an emoji instead of an emoji shortcut string.
Added the decorator @handle for Field and Fieldset to register custom fields.
Renamed register_field to register_handler for Field and Fieldset.
Renamed register_fields to register_handlers for Field and Fieldset.
Renamed unregister_field to unregister_handler for Field and Fieldset.
Renamed unregister_fields to unregister_handlers for Field and Fieldset.
Renamed unregister_all_fields to unregister_all_handlers for Field and Fieldset.
Version 11.0.0¶
Added:
Added support for registering custom fields for
Schema
. This allows you to use your own fields in schemas. See docs for more information.
Version 10.2.0¶
Added:
Added a new method
system_quality_attribute()
(and its aliasility()
) forDevelopment
.
Version 10.1.0¶
Added:
Added a new enum
TimestampFormat
for thetimestamp()
method.
Updated:
The method
timestamp()
forDatetime()
now expects one of the following timestamp formats: TimestampFormat.POSIX, TimestampFormat.RFC_3339, or TimestampFormat.ISO_8601.The
datetime()
method now has default parameters start and end set to the current year.
Removed:
The method timestamp() no longer accepts the
posix
parameter.
Version 10.0.0¶
Updated:
romanize()
is a key function now. See docs for more information.
Removed:
Removed method
swear_word()
ofText()
. This method is inappropriate and lacks practical utility.
Version 9.0.0¶
Note
This release contains some breaking changes in Schema’s API.
Updated:
Key functions now may accept additional
random
as a parameter. See docs for more information.
Removed:
The
loop
method for theSchema
, which was considered deprecated and unsafe, has been removed.The
iterations
parameter for all methods ofSchema
has been removed. Instead, you now have to specify the number of iterations on instantiation ofSchema
passing theiterations
parameter.The
iterator
method forSchema
has been removed. Instead, you can now use an instance ofSchema
directly as an iterator.The multiplication is no longer supported for
Schema
. Instead, you can use theiterations
parameter on instantiation ofSchema
.
Added:
Add
weighted_choice()
method forRandom()
. See docs for more information.Add module
keys
for generating key functions.
Version 8.0.0¶
Added
Fieldset()
to generate a set of fields at once. See docs for more information.bank()
method forFinance()
.default_country
forAddress()
, which always returns the country associated with the current locale (i.eUnited States
foren
,Россия
forru
).
Removed:
Removed parameter
allow_random
forcountry()
. Now method returns random country by default.
Version 7.1.0¶
Added
pytest-randomly
integration, not by default it will set the global seed for every provider and all fields. This can still be reseeded as usual.http_request_headers()
andhttp_response_headers()
methods forInternet
provider. These methods return a dictionary of common headers.reseed()
method forField
.
Removed:
stock_image()
method which required an active HTTP connection. Usestock_image_url
instead.
Version 7.0.0¶
Updated:
Actualized data
Removed outdated data
Removed:
Removed parameter
model_mask
forairplane()
Removed method
truck()
ofTransport()
, usemenufacturer()
instead.Removed method
cpu_model()
ofHardware()
.
Version 6.1.1¶
Improve random sampling performance.
Version 6.1.0¶
Make field support different delimiters for
provider.method
.
Version 6.0.0¶
Fixed:
Fixed memory leak on using
Field
.
Optimizations:
Improved performance of
_load_data()
.
Version 5.6.1¶
Fixed:
Fixed
ValidationFailure
forInternet().uri()
.
Removed:
Removed support of
port
parameter inInternet().uri()
.
Version 5.6.0
Added:
Multiplication support for schemas. Now you can use * on the schema to specify the number of iterations. See docs for more information.
Method
dsn()
forDevelopment()
Method
public_dns()
forInternet()
Version 5.5.0¶
Fixed:
Fixed infinite loop on using
Datetime.bulk_create_datetimes()
.Fixed some typing issues
Version 5.4.0¶
Fixed:
Fixed TypeError: ‘Datetime’ object is not callable error on using
Field
(See #1139).
Added:
Added items
Algorithm.BLAKE2B
andAlgorithm.BLAKE2S
.
Removed:
Removed deprecated method
image_placeholder()
fromInternet()
Version 5.3.0¶
Added:
Added method
to_pickle()
,to_json()
andto_csv()
forschema.Schema
.
Optimizations:
Significantly improved performance of
shortcuts.romanize()
Use
random.choices()
to generate random strings instead ofrandom.choice()
for selecting individual characters. This can lead to a significant speed up, 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()
, andAddress.coordinates()
when passingdms=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 thecalver
andpre_release
flags together.Providers now have an isolated
random
instance when using a seed ofNone
.
Version 5.2.1¶
Removed:
Removed all params of
mnemonic_phrase()
Version 5.1.1¶
Added:
Added parameter
region
forDatetime().timezone()
and enum objectenums.TimezoneRegion
Version 5.1.0¶
Fixed:
Fix mechanism of reseeding of the internal providers of
Generic
(See #1115).
Removed:
Removed inappropriate words from
mimesis.data.int.USERNAMES
.
Version 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 parametersmask
anddrange
.
Renamed:
Renamed
enums.UnitName
toenums.MeasureUnit
Renamed
enums.PrefixSign
toenums.MetricPrefixSign
Renamed
Business()
toFinance()
Renamed
BaseDataProvider.pull
toBaseDataProvider._load_datafile
Renamed
mimesis.providers.numbers.Numbers
tomimesis.providers.numeric.Numeric
Renamed
fmt
argument ofAddress().country_code()
tocode
Fixed:
Fix inheritance issues for
Generic
, now it inheritsBaseProvider
instead ofBaseDataProvider
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 stringFix
.cid()
to make it return stringFix
.price()
ofFinance
to make it return float.
Added:
Added method
hostname()
forInternet
data providerAdded support of
**kwargs
for a methodadd_provider
ofGeneric()
providerAdded enum
Locale
tomimesis.enums
andmimesis.locales
Added
measure_unit
andmetric_prefix
methods for theScience
provider.Added
.iterator()
forschema.Schema
Added methods
.slug()
andip_v4_with_port()
forInternet()
Added
increment()
method forNumbers()
Added methods
.stock_ticker()
,.stock_name()
and.stock_exchange()
forFinance()
Added
BinaryFile
data provider which provides binary data files, such as.mp3
,.mp4
,.png
, etc.
Removed:
Removed module
decorators
. Useshortcuts.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
forru
localeRemoved data provider
UnitSystem()
, useScience()
insteadRemoved data provider
Structure()
, useschema.Schema
insteadRemoved builtin provider
GermanySpecProvider
Removed data provider
Clothing
, useNumbers
insteadRemoved method
copyright()
ofFinance()
Removed method
network_protocol()
ofInternet()
Removed params
with_port
andport_range
forip_v4()
ofInternet()
. Useip_v4_with_port()
instead.Removed methods
sexual_orientation
,social_media_profile
andavatar
of thePerson()
provider.Removed a bunch of useless custom exceptions and replaced them with
FieldError
.Removed completely useless
chemical_element
andatomic_number
methods ofScience
data provider and made it locale-independent.
Version 4.1.3¶
Added:
Added
py.typed
file to the packageAdded
Python 3.9
support
Version 4.1.2¶
Fix:
Fixed type hint issue for
schema.Schema
(#928)
Version 4.1.1¶
Fix:
Fixed issue with non-unique uuid
Version 4.1.0¶
Added:
Added method
manufacturer()
for classTransport()
Added
sk
(Slovak) locale supportAdded new parameter
unique
for methodPerson().email()
Added new parameter
as_object
for methodCryptographic().uuid()
Updated:
Updated parameter
end
for some methods of providerDatetime()
(Fix #870)Updated
.price()
to make it supported locales (Fix #875)
Rename:
Renamed
decorators.romanized
todecorators.romanize
Renamed
Random.schoice
toRandom.generate_string
Renamed
BaseDataProvider.pull
toBaseDataProvider._pull
Removed:
Removed the deprecated
download_image()
function from theshortcuts
module, use your own custom downloader instead.Removed parameter
version
for methodCryptographic().uuid()
Version 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 methodPerson().name()
Added an alias
sex(*args, **kwargs)
for the methodPerson().gender()
Added method
randstr()
for classRandom()
Added method
complexes()
for the providerNumbers()
Added method
matrix
for the providerNumbers()
Added method
integer_number()
for the providerNumbers()
Added method
float_number()
for the providerNumbers()
Added method
complex_number()
for the providerNumbers()
Added method
decimal_number()
for the providerNumbers()
Added method
ip_v4_object()
andip_v6_object
for the providerInternet()
. Now you can generate IP objects, not just strings.Added new parameter
port_range
for methodip_v4()
Added new parameter
separator
for methodCryptographic().mnemonic_phrase()
Fixed:
Fixed issue with invalid email addresses on using custom domains without
@
forPerson().email()
Updated:
Updated names and surnames for locale
ru
The
floats()
function in theNumbers
provider now accepts arguments about the range of the generated float numbers and the rounding used. By default, it generates a list ofn
float numbers instead of a list of 10^n elements.The argument
length
of the functionintegers
is renamed ton
.
Removed:
Removed the
rating()
method from theNumbers
provider. It can be replaced withfloat_number()
.Removed the
primes()
method from theNumbers
provider.Removed the
digit()
method from theNumbers
provider. Useinteger_number()
instead.Removed the
between()
method from theNumbers
provider. Useinteger_number()
instead.Removed the
math_formula()
method from theScience
provider.Removed
rounding
argument fromfloats()
. Now it’sprecision
.
Version 3.3.0¶
Fixed:
country()
from theAddress()
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.
Version 3.2.0¶
Added:
Added built-in provider DenmarkSpecProvider
Added meta classes for providers for internal usage (see #621.)
Added support for custom templates in
Person().username()
Added
ItalianSpecProvider()
Fixed:
Support of seed for custom providers
currency_iso_code
from theBusiness()
provider now by default returns the currency code of the current locale.
Removed:
Removed
multiple_choice()
in therandom
module because it was unused and it could be replaced withrandom.choices
.Removed legacy method
child_count()
from providerPerson()
Version 3.1.0¶
Fixed:
Fixed
UnsupportedField
on using fieldchoice
, #619
Version 3.0.0¶
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()
forDatetime()
providerAdded method
formatted_date()
forDatetime()
providerAdded method
formatted_datetime()
forDatetime()
providerAdded support of timezones (optional) for
Datetime().datetime()
Added method to bulk create datetime objects:
Datetime().bulk_create_datetimes()
Added
kpp
forRussiaSpecProvider
Added
PolandSpecProvider
builtin data providerAdded context manager to temporarily overriding locale -
BaseDataProvider.override_locale()
Added method
token_urlsafe()
forCryptographic
providerAdded 6k+ username words
Updated:
Updated documentation
Updated data for
pl
andfr
Updated SNILS algorithm for
RussiaSpecProvider
Updated method
Datetime().time()
to return onlydatetime.time
objectUpdated method
Datetime().date()
to return onlydatetime.date
objectCompletely annotated all functions
Locale independent providers inherit
BaseProvider
instead ofBaseDataProvider
(it’s mean that locale independent providers does not support parameterlocale
anymore)Now you can add to Generic only providers which are subclasses of
BaseProvider
to ensure a single instance ofrandom.Random()
for all providers
Renamed:
Renamed provider
ClothingSizes
toClothing
, so now it can contain any data related to clothing, not sizes onlyRenamed
Science().dna()
toScience().dna_sequence()
Renamed
Science().rna()
toScience().rna_sequence()
Renamed module
helpers.py
torandom.py
Renamed module
config.py
tolocales.py
Renamed module
utils.py
toshortcuts.py
Renamed
Cryptographic().bytes()
toCryptographic.token_bytes()
Renamed
Cryptographic().token()
toCryptographic.token_hex()
Removed:
Removed deprecated argument
fmt
forDatetime().date()
, useDatetime().formatted_date()
insteadRemoved deprecated argument
fmt
forDatetime().time()
, useDatetime().formatted_time()
insteadRemoved deprecated argument
humanize
forDatetime().datetime()
, useDatetime().formatted_datetime()
insteadRemoved deprecated method
Science.scientific_article()
Removed deprecated providers
Games
Removed deprecated method
Structure().json()
, useschema.Schema()
andschema.Field
insteadRemoved 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()
Removed deprecated method
Internet().category_of_website()
Removed duplicated method
Internet().image_by_keyword()
, useInternet().stock_image()
withkeywords
insteadRemoved deprecated JapanSpecProvider (it didn’t fit the definition of the data provider)
Removed deprecated method
Internet().subreddit()
Removed
Cryptographic().salt()
useCryptographic().token_hex()
orCryptographic().token_bytes()
insteadRemoved methods
Person.favorite_movie()
,Person.favorite_music_genre()
,Person.level_of_english()
because they did not related toPerson
provider
Fixed:
Fixed bug with seed
Fixed issue with names on downloading images
Fixed issue with
None
in username forPerson().username()
Other minor improvements and fix
Version 2.1.0¶
Added:
Added a list of all supported locales as
mimesis/locales.py
Updated:
Changed how
Internet
provider works withstock_image
Changed how
random
module works, now exposing globalRandom
instanceUpdated dependencies
Updated
choice
to make it a provider with more output types
Fixed:
Prevents
ROMANIZED_DICT
from mutatingFixed
appveyour
buildsFixed
flake8-builtins
checksFixed some
mypy
issues with strict modeFixed number of elements returned by
choice
withunique=True
Version 2.0.1¶
Removed:
Removed internal function
utils.locale_info
which duplicateutils.setup_locale
Version 2.0.0¶
Note
This release (2.0.0) contains some breaking changes and this means that you should update names of classes and methods in your code.
Added:
Added items
IOC
andFIFA
for enum objectCountryCode
Added support of custom providers for
schema.Field
Added support of parameter
dms
forcoordinates, longitude, latitude
Added method
Text.rgb_color
Added support of parameter
safe
for methodText.hex_color
Added an alias
zip_code
forAddress.postal_code
Optimizations:
Significantly improved performance of
schema.Field
Other minor improvements
Updated/Renamed:
Updated method
integers
Renamed provider
Personal
toPerson
Renamed provider
Structured
toStructure
Renamed provider
ClothingSizes
toClothing
Renamed json file
personal.json
toperson.json
for all localesRenamed
country_iso_code
tocountry_code
inAddress
data provider
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
Version 1.0.4¶
Added:
Added function for multiple choice
helpers.Random.multiple_choice
Fixed:
Fixed issue with
seed
#325
Optimizations:
Optimized method
username()
Version 1.0.3¶
Mover/Removed:
Moved
custom_code
tohelpers.Random
Optimizations:
Optimized function
custom_code
and it works faster by ≈ 50%Other minor optimizations in data providers
Version 1.0.2¶
Added:
Added method
ethereum_address
forPayment
Added method
get_current_locale
forBaseProvider
Added method
boolean
forDevelopment
which returns random boolean valueAdded method
integers
forNumbers
Added new built in specific provider
UkraineSpecProvider
Added support of
key functions
for the objectschema.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 versaFixed 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 versioningRenamed methods
international
,european
andcustom
tointernational_size
,european_size
andcustom_size
Version 1.0.1¶
Updated:
Fixed #304
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 schemaAdded new module
typing.py
for custom typesAdded new module
enums.py
and support of enums in arguments of methodsAdded
category_of_website
andport
toInternet
data providerAdded
mnemonic_phrase
forCryptography
data providerAdded
price_in_btc
andcurrency_symbol
toBusiness
data providerAdded
dna
,rna
andatomic_number
toScience
data providerAdded
vehicle_registration_code
toTransport
data providerAdded
generate_string
method forRandom
Added alias
last_name
forsurname
inPersonal
data providerAdded alias
province
,region
,federal_subject
forstate
inAddress
data providerAdded annotations for all methods and functions for supporting type hints
Added new data provider
Payment
Added new methods to
Payment
:credit_card_network
,credit_card_owner
Fixed:
Fixed issue with
primes
inNumbers
data providerFixed 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
andbitcoin
toPayment
fromPersonal
Moved
custom_code
toutils.py
fromproviders.code.Code
Removed some useless methods
Removed module
constants
, in view of adding more convenient and useful moduleenums
Removed non informative custom exception
WrongArgument
and replaced one withKeyError
andNonEnumerableError
Parameter
category
of methodhashtags
is deprecated and was removedRemoved all methods from
UnitSystem
and replaced ones withunit()
.
Updated/Renamed:
Updated data for
de-at
,en
,fr
,pl
,pt-br
,pt
,ru
,uk
Other minor updates in other languages
Renamed
currency_iso
tocurrency_iso_code
in Business
data provider