Module preprocessor.data_generator

Classes

class DataGenerator

Static methods

def fake_data(faker_type: str, params: Dict = None, count: int = 1)
def fake_data_for_col(col_name: str, params: Dict = None, count: int = 1) -> Optional[Dict]
def gen_random_bools(size) -> List
def gen_random_float64s(low, high, size, decimals) -> List
def gen_random_int64s(low, high, size) -> List
def gen_random_str_data(low, high, mode, min_length, max_length, size) -> List
def get_fakes(provider: str, params: Dict = None, count: int = 1) -> List
def init()
class MockType (value, names=None, *, module=None, qualname=None, type=None, start=1)

Enumeration of data generator types.

Ancestors

  • enum.Enum

Class variables

var aba

American Bankers Association (ABA) routing transit number

var address

Street address.

var age

An integer between 0 and 120

var ascii_company_email

Email address in the style of an official company, e.g. '[email protected]'

var ascii_email

Common email address, e.g. '[email protected]'

var ascii_free_email

Common email address from free email providers, e.g. '[email protected]'

var ascii_safe_email

Safe (guaranteed not real) email address, e.g. '[email protected]'

var bank_country

Bank providers ISO 3166-1 two character country code

var bban

Basic Bank Account Number (BBAN)

var city

A city name, e.g. 'Hullport'

var company_email

Domain name for a company, e.g. 'nichols-phillips.com'

var country

A country name, e.g. 'Hungary'

var country_calling_code

A country telephone calling code, e.g. '+880'

var country_code

A country code, e.g. 'MV'

var credit_card_expire

Credit card expiration date, e.g. '03/23'

var credit_card_full

Credit card details separated by a \n character. Includes card name, holder name, number, expiration and CVC

var credit_card_number

Credit card number

var credit_card_provider

Credit card provider name, e.g. 'Discover'

var credit_card_security_code

Credit card security code (aka CVC)

var date

A random date after Jan 1, 1970. Optional params: {"pattern": "%Y-%m-%d"}

var email

Common email address from free email providers, e.g. '[email protected]'. Allows unicode characters. Optional params: {"domain": "gmail.com"}

var first_name

A first name, e.g. 'Robert' or 'Megan'

var free_email

Common email address from free email providers, e.g. '[email protected]'. Allows unicode characters.

var free_email_domain

Free email providers, e.g. 'hotmail.com'. Allows unicode characters.

var iban

International Bank Account Number (IBAN)

var ipv4

An internet IPv4 address, e.g. '171.174.170.81'

var ipv4_private

An internet IPv4 address, within the private blocks (10, 172 and 192)

var ipv4_public

An internet IPv4 address, excluding the private blocks (10, 172 and 192)

var ipv6

An internet IPv6 address, e.g. 'f728:b4fa:4248:5e3a:a5d:2f35:6baa:9455

var job
var last_name

A last name, e.g. 'Chang' or 'Dixon'

var license_plate

A six character 'SAM 123' style license plate

var msisdn

A MSISDN international mobile phone number, e.g. '5659387784080'

var name_female

A typical female name, e.g. 'Sharon'

var name_male

A typical male name, e.g. 'Neil'

var name_nonbinary

A full name, including non-binary titles, e.g. 'Mx. Philip Levine'

var phone_number

A typical US phone number, e.g. '(194)892-4115' or '815.659.3877x8408'

var postcode

A post or ZIP code, e.g. '50995'

var random

Type-specific random value. Numbers will be in the range of the data, strings are gibberish of similar length.

var sex

Combination of Sex Identifiers - e.g. 0, M, Female, 1, F

var sex_abbr

Abbreviated Sex identifier - e.g. M or F

var sex_binary

Binary Sex identifier - e.g. 0 or 1

var sex_verbose

Sex identifier - e.g. Male or Female

var ssn

A social security number, e.g. '498-52-4970'

var swift

A mixture of 8 and 11 digit Society for Worldwide Interbank Financial Telecommunications bank (SWIFT) codes. Optional params: {"primary": False}, 11 digit codes will end with 'XXX', denoting primary branches.

var swift16

A 11 digit Society for Worldwide Interbank Financial Telecommunications bank (SWIFT) codes

var swift8

A 8 digit Society for Worldwide Interbank Financial Telecommunications bank (SWIFT) codes

var tripleblind_date

A formatted date between 1970 and today unless given params

var tripleblind_date_time

A random timestamp between 1970 and today unless given params

var tripleblind_iso8601

Get a timestamp in ISO 8601 format (or one of its profiles)

var tripleblind_unix_time

Returns a unix time stamp between two dates