Skip to main content

A forged data generator updated to reflect current state of the original Ruby forgery gem

Project description

Travis CI Code Climate

ForgeryPy3 is a fake data generator fully compatible with Python 2 and 3.

ForgeryPy3 solves the problem of generating simple, random, yet meaningful data for testing and development.

ForgeryPy3 is a fork of Tomek Wójcik’s ForgeryPy project, which is, in turn, based on the Ruby forgery gem.

ForgeryPy3 takes up where ForgeryPy left off, reflecting the current state of the original forgery package, carefully following its API.


Basic usage is easy and straightforward. Fire up your Python REPL and try:

>>> import forgery_py
>>> forgery_py.address.street_address()
'4358 Shopko Junction'
>>> forgery_py.basic.hex_color()
>>> forgery_py.credit_card.type()
>>> forgery_py.currency.description()
'Slovenia Tolars'
>>>, 7, 27)
>>> forgery_py.internet.ip_v4()
>>> forgery_py.lorem_ipsum.title()
'Pretium nam rhoncus ultrices!'
'Mary Peters'
>>> forgery_py.personal.language()
>>> forgery_py.russian_tax.person_inn()

You can find further information in the project’s documentation.

Full List of Methods

Method Example Output ‘Larkspur’
forgery_py.address.continent() ‘North America’ ‘Belgium’ ‘5-(721)114-0241’
forgery_py.address.state() ‘Kansas’
forgery_py.address.state_abbrev() ‘LA’
forgery_py.address.street_address() ‘4 Eastlawn Junction
forgery_py.address.street_name() ‘Dexter’
forgery_py.address.street_number() ‘1’
forgery_py.address.street_suffix() ‘Park’
forgery_py.address.zip_code() ‘65843-3832’
forgery_py.basic.hex_color() ‘6D1F5B’
forgery_py.basic.hex_color_short() ‘05C’
forgery_py.basic.text() ‘ncvgIY0pGKGHv’
forgery_py.basic.boolean() True
forgery_py.basic.color() ‘Red’
forgery_py.basic.encrypt() ‘fc0d835dd4e4df144a33a6a346298b0f23dcd14a’
forgery_py.basic.frequency() ‘Never’
forgery_py.basic.number() 5
forgery_py.basic.password() ‘KcLBHCv6’
forgery_py.credit_card.check_digit(num) 5
forgery_py.credit_card.number() 343682330855371
forgery_py.credit_card.type() ‘American Express’
forgery_py.currency.code() ‘CHF’
forgery_py.currency.description() ‘Canada Dollars’, 11, 8) datetime.datetime(2016, 11, 27, 22, 29, 31, 45877) 4 ‘Thursday’ ‘September’ 2021 ‘ ‘Lorem ipsum dolor sit amet, …’ ‘Lorem Ipsum Dolor Sit Amet…’
forgery_py.geo.latitude() -8.095096815540515
forgery_py.geo.latitude_degrees() -49
forgery_py.geo.latitude_direction() ‘N’
forgery_py.geo.latitude_minutes() 14
forgery_py.geo.latitude_seconds() 45
forgery_py.geo.longitude() -22.56746406884514
forgery_py.geo.longitude_degrees() 100
forgery_py.geo.longitude_direction() ‘W’
forgery_py.geo.longitude_minutes() 47
forgery_py.geo.longitude_seconds() 41
forgery_py.internet.cctld() ‘om’
forgery_py.internet.domain_name() ‘’
forgery_py.internet.email_address() ‘
forgery_py.internet.email_subject() ‘Lorem Ipsum Dolor Sit Amet…’
forgery_py.internet.ip_v4() ‘’
forgery_py.internet.top_level_domain() ‘gov’
forgery_py.internet.user_name() ‘earl’
forgery_py.lorem_ipsum.paragraph() ‘In hac habitasse platea dictumst…’
forgery_py.lorem_ipsum.paragraphs() ‘Nam nulla. Phasellus sit amet erat.’
forgery_py.lorem_ipsum.sentence() ‘Quisque porta volutpat erat.’
forgery_py.lorem_ipsum.sentences() ‘Duis consequat… Integer non velit…’
forgery_py.lorem_ipsum.title() ‘Vestibulum proin tristique lobortis!’
forgery_py.lorem_ipsum.word() ‘maecenas’
forgery_py.lorem_ipsum.words() ‘platea cubilia pede et ultrices congue’
forgery_py.lorem_ipsum.character() ‘l’
forgery_py.lorem_ipsum.characters() ‘lorem ipsu’
forgery_py.lorem_ipsum.lorem_ipsum_characters() ‘lorem ipsum dolor sit amet…’
forgery_py.lorem_ipsum.lorem_ipsum_words() [“lorem”, “ipsum”, “dolor”, …]
forgery_py.lorem_ipsum.text() ‘Lorem ipsum dolor sit amet…’
forgery_py.monetary.formatted_money() ‘$5.49’ ‘9.20’ ‘Dabtype’ ‘Katherine’ ‘Jose’ ‘James Williamson’ ‘Machine Tools & Accessories’ ‘Operator’ ‘I’ ‘Henry’ ‘Kwik-E-Mart’ ‘Cheryl’ ‘IV’ ‘Ms’
forgery_py.personal.abbreviated_gender() ‘F’
forgery_py.personal.gender() ‘Male’
forgery_py.personal.language() ‘Tsonga’
forgery_py.personal.race() ‘Sri Lankan’
forgery_py.personal.shirt_size() ‘XS’ ‘Amsterdam’
forgery_py.russian_tax.account_number() 56335652786612121479
forgery_py.russian_tax.bik() 046533860
forgery_py.russian_tax.inn() 7366543467
forgery_py.russian_tax.legal_inn() 7822838630
forgery_py.russian_tax.legal_ogrn() 3483465598635
forgery_py.russian_tax.ogrn() 666325227817763
forgery_py.russian_tax.person_inn() 451559765443
forgery_py.russian_tax.person_ogrn() 195478617554621


The project is based on ForgeryPy package by Tomek Wójcik.

ForgeryPy, in its turn, gets use of dictionaries from the original Ruby forgery gem.


The project is licensed under MIT License. For further information see LINCENSE.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ForgeryPy3-0.3.1.tar.gz (47.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page