Note
This version is still under development.
Added:
- Added an alias
first_name()
forPerson().name()
- Added an alias
Person().sex(*args, **kwargs)
forPerson().gender()
- Added method
randstr()
for classRandom()
- Added method
complexes()
for providerNumbers()
- Added method
matrix
for providerNumbers()
- Added method
ip_v4_object()
andip_v6_object
for 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 insted of a list of 10^n elements. - The argument
length
of the functionintegers
is renamed ton
.
Removed:
- Removed the
rating()
function in theNumbers
provider. It can be replaced withfloats(end=5, n=0, rounding=1)[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.
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()
Fixed:
- Fixed
UnsupportedField
on using fieldchoice
, #619
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()
provider - Added method
formatted_date()
forDatetime()
provider - Added method
formatted_datetime()
forDatetime()
provider - Added 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 provider - Added context manager to temporarily overriding locale -
BaseDataProvider.override_locale()
- Added method
token_urlsafe()
forCryptographic
provider - Added 6k+ username words
Updated:
- Updated documentation
- Updated data for
pl
andfr
- Updated SNILS algorithm for
RussiaSpecProvider
- Updated method
Datetime().time()
to return onlydatetime.time
object - Updated method
Datetime().date()
to return onlydatetime.date
object - Completely 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 only - Renamed
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()
instead - Removed deprecated argument
fmt
forDatetime().time()
, useDatetime().formatted_time()
instead - Removed deprecated argument
humanize
forDatetime().datetime()
, useDatetime().formatted_datetime()
instead - Removed deprecated method
Science.scientific_article()
- Removed deprecated providers
Games
- Removed deprecated method
Structure().json()
, useschema.Schema()
andschema.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()
- Removed deprecated method
Internet().category_of_website()
- Removed duplicated method
Internet().image_by_keyword()
, useInternet().stock_image()
withkeywords
instead - Removed 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()
instead - Removed 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
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
instance - Updated dependencies
- Updated
choice
to make it a provider with more output types
Fixed:
- Prevents
ROMANIZED_DICT
from mutating - Fixed
appveyour
builds - Fixed
flake8-builtins
checks - Fixed some
mypy
issues with strict mode - Fixed number of elements returned by
choice
withunique=True
Removed:
- Removed internal function
utils.locale_info
which duplicateutils.setup_locale
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 locales - Renamed
country_iso_code
tocountry_code
inAddress
data provider
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
Added:
- Added function for multiple choice
helpers.Random.multiple_choice
Fixed:
- Fixed issue with
seed
#325
Optimizations:
- Optimized method
username()
Mover/Removed:
- Moved
custom_code
tohelpers.Random
Optimizations:
- Optimized function
custom_code
and it works faster by ≈ 50% - Other minor optimizations in data providers
Added:
- Added method
ethereum_address
forPayment
- Added method
get_current_locale
forBaseProvider
- Added method
boolean
forDevelopment
which returns random boolean value - Added 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 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
andcustom
tointernational_size
,european_size
andcustom_size
Updated:
- Fixed #304
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
andport
toInternet
data provider - Added
mnemonic_phrase
forCryptography
data provider - Added
price_in_btc
andcurrency_symbol
toBusiness
data provider - Added
dna
,rna
andatomic_number
toScience
data provider - Added
vehicle_registration_code
toTransport
data provider - Added
schoice
method forRandom
- Added alias
last_name
forsurname
inPersonal
data provider - Added alias
province
,region
,federal_subject
forstate
inAddress
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
,credit_card_owner
Fixed:
- Fixed issue with
primes
inNumbers
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
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 removed - Removed 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