Changelog¶
Version 19.1.0¶
Added support for E.164 phone number formatting to the
Personprovider’sphone_number()method.Added
secondary_address()method to theAddressprovider.Add SHA-3 family hash algorithms (
SHA3_224,SHA3_256,SHA3_384,SHA3_512,SHAKE128,SHAKE256) to theAlgorithmenum.
Version 19.0.0¶
Added many key functions for various transformations.
Removed the
pytestplugin from the package. Use project-specific fixtures and theFieldclass instead.Removed the
builtinsmodule from the package. Use custom field handlers.The
Cryptographicprovider now uses a seedable random number generator instead of thesecretsmodule. See (#1656).Add
jwt,api_keyandcertificate_fingerprintmethods for theCryptographicprovider.Add
SchemaBuilderfor generating relational data.Add
ip_v4_cidr(),ip_v6_cidr()andcloud_region()methods for theInternetprovider.
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.DurationUnitenum.Added
.duration()method forDatetimeprovider 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_boyplugin.
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 thePersonprovider.The methods
gender()andsex()no longer accept arguments likeiso5218andsymbol. 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
TimestampFormatfor 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
posixparameter.
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
randomas a parameter. See docs for more information.
Removed:
The
loopmethod for theSchema, which was considered deprecated and unsafe, has been removed.The
iterationsparameter for all methods ofSchemahas been removed. Instead, you now have to specify the number of iterations on instantiation ofSchemapassing theiterationsparameter.The
iteratormethod forSchemahas been removed. Instead, you can now use an instance ofSchemadirectly as an iterator.The multiplication is no longer supported for
Schema. Instead, you can use theiterationsparameter on instantiation ofSchema.
Added:
Add
weighted_choice()method forRandom(). See docs for more information.Add module
keysfor 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_countryforAddress(), which always returns the country associated with the current locale (i.eUnited Statesforen,Россияforru).
Removed:
Removed parameter
allow_randomforcountry(). Now method returns random country by default.
Version 7.1.0¶
Added
pytest-randomlyintegration, 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 forInternetprovider. These methods return a dictionary of common headers.reseed()method forField.
Removed:
stock_image()method which required an active HTTP connection. Usestock_image_urlinstead.
Version 7.0.0¶
Updated:
Actualized data
Removed outdated data
Removed:
Removed parameter
model_maskforairplane()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
ValidationFailureforInternet().uri().
Removed:
Removed support of
portparameter 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.BLAKE2BandAlgorithm.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 thecalverandpre_releaseflags together.Providers now have an isolated
randominstance when using a seed ofNone.
Version 5.2.1¶
Removed:
Removed all params of
mnemonic_phrase()
Version 5.1.1¶
Added:
Added parameter
regionforDatetime().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 parametersmaskanddrange.
Renamed:
Renamed
enums.UnitNametoenums.MeasureUnitRenamed
enums.PrefixSigntoenums.MetricPrefixSignRenamed
Business()toFinance()Renamed
BaseDataProvider.pulltoBaseDataProvider._load_datafileRenamed
mimesis.providers.numbers.Numberstomimesis.providers.numeric.NumericRenamed
fmtargument ofAddress().country_code()tocode
Fixed:
Fix inheritance issues for
Generic, now it inheritsBaseProviderinstead ofBaseDataProviderFix 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()ofFinanceto make it return float.
Added:
Added method
hostname()forInternetdata providerAdded support of
**kwargsfor a methodadd_providerofGeneric()providerAdded enum
Localetomimesis.enumsandmimesis.localesAdded
measure_unitandmetric_prefixmethods for theScienceprovider.Added
.iterator()forschema.SchemaAdded methods
.slug()andip_v4_with_port()forInternet()Added
increment()method forNumbers()Added methods
.stock_ticker(),.stock_name()and.stock_exchange()forFinance()Added
BinaryFiledata provider which provides binary data files, such as.mp3,.mp4,.png, etc.
Removed:
Removed module
decorators. Useshortcuts.romanizeto romanize Cyrillic strings.Removed
as_objectparameter for.uuid(). Now it returns string by default, if you need uuid4 object then use.uuid_object()Removed invalid names and surnames from
person.jsonforrulocaleRemoved data provider
UnitSystem(), useScience()insteadRemoved data provider
Structure(), useschema.SchemainsteadRemoved builtin provider
GermanySpecProviderRemoved data provider
Clothing, useNumbersinsteadRemoved method
copyright()ofFinance()Removed method
network_protocol()ofInternet()Removed params
with_portandport_rangeforip_v4()ofInternet(). Useip_v4_with_port()instead.Removed methods
sexual_orientation,social_media_profileandavatarof thePerson()provider.Removed a bunch of useless custom exceptions and replaced them with
FieldError.Removed completely useless
chemical_elementandatomic_numbermethods ofSciencedata provider and made it locale-independent.
Version 4.1.3¶
Added:
Added
py.typedfile to the packageAdded
Python 3.9support
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
uniquefor methodPerson().email()Added new parameter
as_objectfor methodCryptographic().uuid()
Updated:
Updated parameter
endfor some methods of providerDatetime()(Fix #870)Updated
.price()to make it supported locales (Fix #875)
Rename:
Renamed
decorators.romanizedtodecorators.romanizeRenamed
Random.schoicetoRandom.generate_stringRenamed
BaseDataProvider.pulltoBaseDataProvider._pull
Removed:
Removed the deprecated
download_image()function from theshortcutsmodule, use your own custom downloader instead.Removed parameter
versionfor 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
matrixfor 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_objectfor the providerInternet(). Now you can generate IP objects, not just strings.Added new parameter
port_rangefor methodip_v4()Added new parameter
separatorfor methodCryptographic().mnemonic_phrase()
Fixed:
Fixed issue with invalid email addresses on using custom domains without
@forPerson().email()
Updated:
Updated names and surnames for locale
ruThe
floats()function in theNumbersprovider now accepts arguments about the range of the generated float numbers and the rounding used. By default, it generates a list ofnfloat numbers instead of a list of 10^n elements.The argument
lengthof the functionintegersis renamed ton.
Removed:
Removed the
rating()method from theNumbersprovider. It can be replaced withfloat_number().Removed the
primes()method from theNumbersprovider.Removed the
digit()method from theNumbersprovider. Useinteger_number()instead.Removed the
between()method from theNumbersprovider. Useinteger_number()instead.Removed the
math_formula()method from theScienceprovider.Removed
roundingargument 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
etlocale.
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_codefrom theBusiness()provider now by default returns the currency code of the current locale.
Removed:
Removed
multiple_choice()in therandommodule because it was unused and it could be replaced withrandom.choices.Removed legacy method
child_count()from providerPerson()
Version 3.1.0¶
Fixed:
Fixed
UnsupportedFieldon 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
kppforRussiaSpecProviderAdded
PolandSpecProviderbuiltin data providerAdded context manager to temporarily overriding locale -
BaseDataProvider.override_locale()Added method
token_urlsafe()forCryptographicproviderAdded 6k+ username words
Updated:
Updated documentation
Updated data for
plandfrUpdated SNILS algorithm for
RussiaSpecProviderUpdated method
Datetime().time()to return onlydatetime.timeobjectUpdated method
Datetime().date()to return onlydatetime.dateobjectCompletely annotated all functions
Locale independent providers inherit
BaseProviderinstead ofBaseDataProvider(it’s mean that locale independent providers does not support parameterlocaleanymore)Now you can add to Generic only providers which are subclasses of
BaseProviderto ensure a single instance ofrandom.Random()for all providers
Renamed:
Renamed provider
ClothingSizestoClothing, 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.pytorandom.pyRenamed module
config.pytolocales.pyRenamed module
utils.pytoshortcuts.pyRenamed
Cryptographic().bytes()toCryptographic.token_bytes()Renamed
Cryptographic().token()toCryptographic.token_hex()
Removed:
Removed deprecated argument
fmtforDatetime().date(), useDatetime().formatted_date()insteadRemoved deprecated argument
fmtforDatetime().time(), useDatetime().formatted_time()insteadRemoved deprecated argument
humanizeforDatetime().datetime(), useDatetime().formatted_datetime()insteadRemoved deprecated method
Science.scientific_article()Removed deprecated providers
GamesRemoved deprecated method
Structure().json(), useschema.Schema()andschema.FieldinsteadRemoved 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()withkeywordsinsteadRemoved 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 toPersonprovider
Fixed:
Fixed bug with seed
Fixed issue with names on downloading images
Fixed issue with
Nonein 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
Internetprovider works withstock_imageChanged how
randommodule works, now exposing globalRandominstanceUpdated dependencies
Updated
choiceto make it a provider with more output types
Fixed:
Prevents
ROMANIZED_DICTfrom mutatingFixed
appveyourbuildsFixed
flake8-builtinschecksFixed some
mypyissues with strict modeFixed number of elements returned by
choicewithunique=True
Version 2.0.1¶
Removed:
Removed internal function
utils.locale_infowhich 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
IOCandFIFAfor enum objectCountryCodeAdded support of custom providers for
schema.FieldAdded support of parameter
dmsforcoordinates, longitude, latitudeAdded method
Text.rgb_colorAdded support of parameter
safefor methodText.hex_colorAdded an alias
zip_codeforAddress.postal_code
Optimizations:
Significantly improved performance of
schema.FieldOther minor improvements
Updated/Renamed:
Updated method
integersRenamed provider
PersonaltoPersonRenamed provider
StructuredtoStructureRenamed provider
ClothingSizestoClothingRenamed json file
personal.jsontoperson.jsonfor all localesRenamed
country_iso_codetocountry_codeinAddressdata provider
Version 1.0.5¶
Added:
Added method
RussiaSpecProvider.inn
Fixed:
Fixed issue with seed for
providers.Cryptographic.bytesFixed issue #375
Optimizations:
Optimized method
Text.hex_colorOptimized method
Address.coordinatesOptimized 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_codetohelpers.Random
Optimizations:
Optimized function
custom_codeand it works faster by ≈ 50%Other minor optimizations in data providers
Version 1.0.2¶
Added:
Added method
ethereum_addressforPaymentAdded method
get_current_localeforBaseProviderAdded method
booleanforDevelopmentwhich returns random boolean valueAdded method
integersforNumbersAdded new built in specific provider
UkraineSpecProviderAdded support of
key functionsfor the objectschema.FieldAdded object
schema.Schemawhich helps generate data by schema
Fixed:
Fixed issue
full_namewhen 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
versionfor supporting pre-releases and calendar versioningRenamed methods
international,europeanandcustomtointernational_size,european_sizeandcustom_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
Fieldfor generating data by schemaAdded new module
typing.pyfor custom typesAdded new module
enums.pyand support of enums in arguments of methodsAdded
category_of_websiteandporttoInternetdata providerAdded
mnemonic_phraseforCryptographydata providerAdded
price_in_btcandcurrency_symboltoBusinessdata providerAdded
dna,rnaandatomic_numbertoSciencedata providerAdded
vehicle_registration_codetoTransportdata providerAdded
generate_stringmethod forRandomAdded alias
last_nameforsurnameinPersonaldata providerAdded alias
province,region,federal_subjectforstateinAddressdata providerAdded annotations for all methods and functions for supporting type hints
Added new data provider
PaymentAdded new methods to
Payment:credit_card_network,credit_card_owner
Fixed:
Fixed issue with
primesinNumbersdata providerFixed issue with repeated output on using
Code().custom codeOther minor fix and improvements
Mover/Removed:
Moved
credit_card,credit_card_expiration_date,cid,cvv,paypalandbitcointoPaymentfromPersonalMoved
custom_codetoutils.pyfromproviders.code.CodeRemoved some useless methods
Removed module
constants, in view of adding more convenient and useful moduleenumsRemoved non informative custom exception
WrongArgumentand replaced one withKeyErrorandNonEnumerableErrorParameter
categoryof methodhashtagsis deprecated and was removedRemoved all methods from
UnitSystemand replaced ones withunit().
Updated/Renamed:
Updated data for
de-at,en,fr,pl,pt-br,pt,ru,ukOther minor updates in other languages
Renamed
currency_isotocurrency_iso_codein Businessdata provider