Locale es_ES¶
faker.providers.address¶
- class faker.providers.address.es_ES.Provider(generator: Any)¶
Bases:
Provider- address() str¶
- Example:
‘791 Crist Parks, Sashabury, IL 86039-9874’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.address() ... 'Callejón Ariadna Torre 84 Piso 9 \nMálaga, 10127' 'Callejón Virginia Collado 21\nLugo, 37687' 'Alameda de Emiliana Fuente 977 Piso 0 \nÁvila, 48166' 'Alameda de Jose Francisco Morell 4\nCiudad, 10338' 'Alameda Sara Verdejo 51\nTeruel, 09179'
- administrative_unit() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.administrative_unit() ... 'Jaén' 'Valladolid' 'La Rioja' 'Alicante' 'Córdoba'
- autonomous_community() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.autonomous_community() ... 'Comunidad de Madrid' 'Región de Murcia' 'Aragón' 'Cataluña' 'La Rioja'
- building_number() str¶
- Example:
‘791’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.building_number() ... '16' '88' '84' '49' '324'
- city() str¶
- Example:
‘Sashabury’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.city() ... 'Valladolid' 'Alicante' 'Málaga' 'La Coruña' 'Lugo'
- city_suffix() str¶
- Example:
‘town’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.city_suffix() ... 'Ville' 'Ville' 'Ville' 'Ville' 'Ville'
- country() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.country() ... 'Líbano' 'Maldivas' 'Australia' 'Georgia' 'Palau'
- country_code(representation: str = 'alpha-2') str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.country_code() ... 'MV' 'PS' 'NL' 'BB' 'IL'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.country_code(representation='alpha-2') ... 'MV' 'PS' 'NL' 'BB' 'IL'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.country_code(representation='alpha-3') ... 'MDV' 'PSE' 'NLD' 'BRB' 'ISR'
- current_country() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.current_country() ... 'Spain' 'Spain' 'Spain' 'Spain' 'Spain'
- current_country_code() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.current_country_code() ... 'ES' 'ES' 'ES' 'ES' 'ES'
- postcode() str¶
- Example:
86039-9874
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.postcode() ... '26247' '50673' '28562' '03653' '17968'
- region() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.region() ... 'Comunidad de Madrid' 'Región de Murcia' 'Aragón' 'Cataluña' 'La Rioja'
- secondary_address() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.secondary_address() ... 'Piso 6' 'Apt. 48' 'Piso 6' 'Piso 7' 'Piso 9'
- state() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.state() ... 'Jaén' 'Valladolid' 'La Rioja' 'Alicante' 'Córdoba'
- state_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.state_name() ... 'Jaén' 'Valladolid' 'La Rioja' 'Alicante' 'Córdoba'
- street_address() str¶
- Example:
‘791 Crist Parks’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.street_address() ... 'Calle de Juan Antonio Vidal 56 Piso 5 ' 'Cañada Enrique Bustamante 348' 'Avenida Trini Murillo 28 Piso 6 ' 'Paseo Albina Salas 940 Apt. 16 ' 'Alameda de Jose Francisco Morell 4'
- street_name() str¶
- Example:
‘Crist Parks’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.street_name() ... 'Ronda de Apolinar Jove' 'C. de Zaida Mateos' 'Acceso de Dalila Gil' 'Cañada Enrique Bustamante' 'Paseo de Julieta Collado'
faker.providers.automotive¶
- class faker.providers.automotive.es_ES.Provider(generator: Any)¶
Bases:
ProviderImplement automotive provider for
es_ESlocale.Sources:
- license_plate() str¶
Generate a license plate.
This method randomly chooses (50/50) between
license_plate_unified()orlicense_plate_by_province()to generate the result.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.license_plate() ... '8764 SCL' '8242 PYJ' 'PO 9241 IT' 'ZA 7815 XK' '8778 NZJ'
- license_plate_by_province(province_prefix: str | None = None) str¶
Generate a provincial license plate.
If a value for
province_prefixis provided, the value will be used as the prefix regardless of validity. IfNone, then a valid prefix will be selected at random.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.license_plate_by_province() ... 'ZA 0487 MN' 'J 5938 JP' 'C 1948 JE' 'SS 4115 VE' 'M 5659 TD'
faker.providers.bank¶
- class faker.providers.bank.es_ES.Provider(generator: Any)¶
Bases:
ProviderImplement bank provider for
es_ESlocale.- aba() str¶
Generate an ABA routing transit number.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.aba() ... '076048766' '057593829' '052194896' '034115783' '025659384'
- bank_country() str¶
Generate the bank provider’s ISO 3166-1 alpha-2 country code.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.bank_country() ... 'ES' 'ES' 'ES' 'ES' 'ES'
- bban() str¶
Generate a Basic Bank Account Number (BBAN).
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.bban() ... '66048764759382421948' '92411578156593877840' '80160975351393328711' '58714841858398947196' '59342320947112201868'
- iban() str¶
Generate an International Bank Account Number (IBAN).
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.iban() ... 'ES1266048764759382421948' 'ES0392411578156593877840' 'ES9680160975351393328711' 'ES2658714841858398947196' 'ES6659342320947112201868'
- swift(length: int | None = None, primary: bool = False, use_dataset: bool = False) str¶
Generate a SWIFT code.
SWIFT codes, reading from left to right, are composed of a 4 alphabet character bank code, a 2 alphabet character country code, a 2 alphanumeric location code, and an optional 3 alphanumeric branch code. This means SWIFT codes can only have 8 or 11 characters, so the value of
lengthcan only beNoneor the integers8or11. If the value isNone, then a value of8or11will randomly be assigned.Because all 8-digit SWIFT codes already refer to the primary branch or office, the
primaryargument only has an effect if the value oflengthis11. IfprimaryisTrueandlengthis11, the 11-digit SWIFT codes generated will always end in'XXX'to denote that they belong to primary branches/offices.For extra authenticity, localized providers may opt to include SWIFT bank codes, location codes, and branch codes used in their respective locales. If
use_datasetisTrue, this method will generate SWIFT codes based on those locale-specific codes if included. If those codes were not included, then it will behave as ifuse_datasetwereFalse, and in that mode, all those codes will just be randomly generated as per the specification.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift() ... 'YNBIES65ZT4' 'SGQEESSIGQ8' 'JDXCESV4' 'LNKTESN9' 'OQIBES9AFZA'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=8) ... 'MYNBESQ6' 'PMZJES4W' 'SGQEESSI' 'YDTZESQ8' 'WZTEESTG'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=8, use_dataset=True) ... 'MYNBESQ6' 'PMZJES4W' 'SGQEESSI' 'YDTZESQ8' 'WZTEESTG'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=11) ... 'MYNBESQ65ZT' 'PLSGES6ISIG' 'TZIRESJTGEV' 'PRDLES1UN94' 'OQIBES9AFZA'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=11, primary=True) ... 'MYNBESQ6XXX' 'PMZJES4WXXX' 'SGQEESSIXXX' 'YDTZESQ8XXX' 'WZTEESTGXXX'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=11, use_dataset=True) ... 'MYNBESQ65ZT' 'PLSGES6ISIG' 'TZIRESJTGEV' 'PRDLES1UN94' 'OQIBES9AFZA'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift(length=11, primary=True, use_dataset=True) ... 'MYNBESQ6XXX' 'PMZJES4WXXX' 'SGQEESSIXXX' 'YDTZESQ8XXX' 'WZTEESTGXXX'
- swift11(primary: bool = False, use_dataset: bool = False) str¶
Generate an 11-digit SWIFT code.
This method uses
swift()under the hood with thelengthargument set to11. Ifprimaryis set toTrue, the SWIFT code will always end with'XXX'. All 11-digit SWIFT codes use this convention to refer to the primary branch/office.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift11() ... 'MYNBESQ65ZT' 'PLSGES6ISIG' 'TZIRESJTGEV' 'PRDLES1UN94' 'OQIBES9AFZA'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift11(use_dataset=True) ... 'MYNBESQ65ZT' 'PLSGES6ISIG' 'TZIRESJTGEV' 'PRDLES1UN94' 'OQIBES9AFZA'
- swift8(use_dataset: bool = False) str¶
Generate an 8-digit SWIFT code.
This method uses
swift()under the hood with thelengthargument set to8and with theprimaryargument omitted. All 8-digit SWIFT codes already refer to the primary branch/office.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift8() ... 'MYNBESQ6' 'PMZJES4W' 'SGQEESSI' 'YDTZESQ8' 'WZTEESTG'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.swift8(use_dataset=True) ... 'MYNBESQ6' 'PMZJES4W' 'SGQEESSI' 'YDTZESQ8' 'WZTEESTG'
faker.providers.barcode¶
- class faker.providers.barcode.es_ES.Provider(generator: Any)¶
Bases:
ProviderImplement barcode provider for
es_ESlocale.Sources:
- ean(length: int = 13, prefixes: Tuple[int | str | Tuple[int | str, ...], ...] = ()) str¶
Generate an EAN barcode of the specified
length.The value of
lengthcan only be8or13(default) which will create an EAN-8 or an EAN-13 barcode respectively.If a value for
prefixesis specified, the result will begin with one of the sequences inprefixes.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean(length=13) ... '6604876475937' '8242194892418' '1578156593879' '7840801609759' '3513933287112'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean(length=8) ... '66048763' '47593824' '42194897' '24115780' '15659385'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean(prefixes=('00', )) ... '0004876475931' '0019489241156' '0056593877840' '0016097535134' '0087115871480'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean(prefixes=('45', '49')) ... '4504876475932' '4919489241155' '4556593877841' '4516097535135' '4987115871489'
- ean13(prefixes: Tuple[int | str | Tuple[int | str, ...], ...] = ()) str¶
Generate an EAN-13 barcode.
This method uses
ean()under the hood with thelengthargument explicitly set to13.If a value for
prefixesis specified, the result will begin with one of the sequences inprefixes.Note
Codes starting with a leading zero are treated specially in some barcode readers. For more information on compatibility with UPC-A codes, see
EnUsBarcodeProvider.ean13().- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean13() ... '6604876475937' '8242194892418' '1578156593879' '7840801609759' '3513933287112'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean13(prefixes=('00', )) ... '0004876475931' '0019489241156' '0056593877840' '0016097535134' '0087115871480'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean13(prefixes=('45', '49')) ... '4504876475932' '4919489241155' '4556593877841' '4516097535135' '4987115871489'
- ean8(prefixes: Tuple[int | str | Tuple[int | str, ...], ...] = ()) str¶
Generate an EAN-8 barcode.
This method uses
ean()under the hood with thelengthargument explicitly set to8.If a value for
prefixesis specified, the result will begin with one of the sequences inprefixes.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean8() ... '66048763' '47593824' '42194897' '24115780' '15659385'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean8(prefixes=('00', )) ... '00048767' '00938242' '00489249' '00781565' '00877848'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ean8(prefixes=('45', '49')) ... '49048766' '45938245' '45489242' '49781564' '45877841'
- localized_ean(length: int = 13) str¶
Generate a localized EAN barcode of the specified
length.The value of
lengthcan only be8or13(default) which will create an EAN-8 or an EAN-13 barcode respectively.This method uses the standard barcode provider’s
ean()under the hood with theprefixesargument explicitly set tolocal_prefixesof a localized barcode provider implementation.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.localized_ean() ... '8404876475931' '8419489241156' '8456593877840' '8416097535134' '8487115871480'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.localized_ean(length=13) ... '8404876475931' '8419489241156' '8456593877840' '8416097535134' '8487115871480'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.localized_ean(length=8) ... '84048769' '84938244' '84489241' '84781567' '84877840'
- localized_ean13() str¶
Generate a localized EAN-13 barcode.
This method uses
localized_ean()under the hood with thelengthargument explicitly set to13.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.localized_ean13() ... '8404876475931' '8419489241156' '8456593877840' '8416097535134' '8487115871480'
- localized_ean8() str¶
Generate a localized EAN-8 barcode.
This method uses
localized_ean()under the hood with thelengthargument explicitly set to8.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.localized_ean8() ... '84048769' '84938244' '84489241' '84781567' '84877840'
faker.providers.color¶
- class faker.providers.color.es_ES.Provider(generator: Any)¶
Bases:
Provider- color(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None, color_format: str = 'hex') str¶
Generate a color in a human-friendly way.
Under the hood, this method first creates a color represented in the HSV color model and then converts it to the desired
color_format. The argumenthuecontrols the H value according to the following rules:If the value is a number from
0to360, it will serve as the H value of the generated color.If the value is a tuple/list of 2 numbers from 0 to 360, the color’s H value will be randomly selected from that range.
If the value is a valid string, the color’s H value will be randomly selected from the H range corresponding to the supplied string. Valid values are
'monochrome','red','orange','yellow','green','blue','purple', and'pink'.
The argument
luminosityinfluences both S and V values and is partially affected byhueas well. The finer details of this relationship are somewhat involved, so please refer to the source code instead if you wish to dig deeper. To keep the interface simple, this argument either can be omitted or can accept the following string values:'bright','dark','light', or'random'.The argument
color_formatcontrols in which color model the color is represented. Valid values are'hsv','hsl','rgb', or'hex'(default).- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(hue='red') ... '#af2f33' '#e02141' '#ef6466' '#a80a14' '#ed9e95'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(luminosity='light') ... '#79c3e0' '#89ffa1' '#96cbf7' '#aafaff' '#e3f495'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(hue=(100, 200), color_format='rgb') ... 'rgb(26, 155, 88)' 'rgb(9, 193, 49)' 'rgb(73, 229, 154)' 'rgb(107, 249, 166)' 'rgb(76, 204, 69)'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(hue='orange', luminosity='bright') ... '#efc332' '#edae65' '#d1861d' '#ffcc42' '#e09533'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(hue=135, luminosity='dark', color_format='hsv') ... 'hsv(135, 96, 45)' 'hsv(135, 98, 57)' 'hsv(135, 94, 61)' 'hsv(135, 99, 47)' 'hsv(135, 94, 50)'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color(hue=(300, 20), luminosity='random', color_format='hsl') ... 'hsl(217, 94, 27)' 'hsl(40, 23, 54)' 'hsl(268, 100, 74)' 'hsl(175, 43, 31)' 'hsl(131, 47, 11)'
- color_hsl(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[int, int, int]¶
Generate a HSL color tuple.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsl() ... (197, 57, 32) (132, 90, 39) (207, 76, 65) (183, 88, 33) (258, 62, 73)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsl(hue='red', luminosity='dark') ... (358, 92, 27) (350, 96, 33) (359, 88, 36) (356, 98, 28) (6, 85, 34)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsl(hue=(100, 200), luminosity='random') ... (149, 94, 27) (105, 23, 54) (162, 100, 74) (138, 43, 31) (174, 19, 55)
- color_hsv(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[int, int, int]¶
Generate a HSV color tuple.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsv() ... (197, 73, 51) (132, 95, 76) (207, 58, 92) (183, 94, 64) (258, 37, 90)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsv(hue='red', luminosity='dark') ... (358, 96, 53) (350, 98, 66) (359, 94, 68) (356, 99, 56) (6, 92, 63)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_hsv(hue=(100, 200), luminosity='random') ... (149, 97, 53) (105, 33, 65) (162, 51, 100) (138, 61, 45) (174, 27, 64)
- color_name() str¶
Generate a color name.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_name() ... 'Rojo' 'Rosa brumoso' 'Amarillo verde' 'Gris gainsboro (Estaño)' 'Verde prado'
- color_rgb(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[int, int, int]¶
Generate a RGB color tuple of integers.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb() ... (35, 103, 130) (9, 193, 46) (98, 173, 234) (9, 155, 163) (170, 144, 229)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb(hue='red', luminosity='dark') ... (135, 5, 9) (168, 3, 30) (173, 10, 13) (142, 1, 10) (160, 27, 12)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb(hue=(100, 200), luminosity='random') ... (4, 135, 67) (124, 165, 111) (124, 255, 215) (44, 114, 65) (119, 163, 158)
- color_rgb_float(hue: str | float | int | Sequence[int] | None = None, luminosity: str | None = None) Tuple[float, float, float]¶
Generate a RGB color tuple of floats.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb_float() ... (0.13770000000000002, 0.4045149999999999, 0.51) (0.038000000000000034, 0.76, 0.18239999999999984) (0.3864000000000001, 0.6798800000000002, 0.92) (0.03840000000000004, 0.6099200000000001, 0.64) (0.6668999999999999, 0.5670000000000001, 0.9)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb_float(hue='red', luminosity='dark') ... (0.53, 0.02120000000000002, 0.03815999999999998) (0.66, 0.013200000000000012, 0.12100000000000023) (0.68, 0.04080000000000004, 0.05145333333333333) (0.56, 0.005600000000000005, 0.042559999999999855) (0.63, 0.10835999999999996, 0.05039999999999997)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.color_rgb_float(hue=(100, 200), luminosity='random') ... (0.015900000000000015, 0.53, 0.2643816666666667) (0.489125, 0.65, 0.43549999999999994) (0.49, 1.0, 0.8470000000000001) (0.17550000000000002, 0.45, 0.2578500000000001) (0.4672, 0.64, 0.62272)
- hex_color() str¶
Generate a color formatted as a hex triplet.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.hex_color() ... '#d82c08' '#629f70' '#c2094d' '#e3e707' '#6baa95'
- rgb_color() str¶
Generate a color formatted as a comma-separated RGB value.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.rgb_color() ... '197,215,20' '132,248,207' '155,244,183' '111,71,144' '71,48,128'
- rgb_css_color() str¶
Generate a color formatted as a CSS rgb() function.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.rgb_css_color() ... 'rgb(197,215,20)' 'rgb(132,248,207)' 'rgb(155,244,183)' 'rgb(111,71,144)' 'rgb(71,48,128)'
faker.providers.company¶
- class faker.providers.company.es_ES.Provider(generator: Any)¶
Bases:
ProviderProvider for company names for es_ES locale
Company naming scheme and probabilities are inspired by and/or based on existing companies in Spain.
Sources: - https://en.wikipedia.org/wiki/List_of_legal_entity_types_by_country - https://ranking-empresas.eleconomista.es/ranking_empresas_nacional.html
- bs() str¶
- Example:
‘integrate extensible convergence’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.bs() ... 'iterate integrated e-markets' 'integrate back-end mindshare' 'synthesize wireless content' 'syndicate synergistic applications' 'productize killer mindshare'
- catch_phrase() str¶
- Example:
‘Robust full-range hub’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.catch_phrase() ... 'Networked well-modulated instruction set' 'Balanced empowering migration' 'Pre-emptive impactful toolset' 'Innovative mission-critical help-desk' 'Reduced didactic middleware'
- company() str¶
- Example:
‘Acme Ltd’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.company() ... 'Rivero y Arjona S.C.P' 'Sandalio Mateos Tapia S.Com.' 'Desarrollo Inteligentes S.A.' 'Infraestructuras ZQUQ S.L.' 'Suarez & Asociados S.Com.'
- company_prefix() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.company_prefix() ... 'Hnos' 'Hnos' 'Familia' 'Hermanos' 'Hnos'
- company_suffix() str¶
- Example:
‘Ltd’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.company_suffix() ... 'S.L.L.' 'S.L.' 'S.Com.' 'S.C.P' 'S.Coop.'
- company_type() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.company_type() ... 'Restauración' 'Soluciones' 'Banco' 'Infraestructuras' 'Transportes'
- random_company_acronym() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.random_company_acronym() ... 'NVN' 'ZVRY' 'EVA' 'HEP' 'ZQUQ'
faker.providers.currency¶
- class faker.providers.currency.es_ES.Provider(generator: Any)¶
Bases:
Provider- cryptocurrency() Tuple[str, str]¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.cryptocurrency() ... ('XRP', 'Ripple') ('STC', 'SwiftCoin') ('BC', 'BlackCoin') ('NXT', 'Nxt') ('IOTA', 'IOTA')
- cryptocurrency_code() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.cryptocurrency_code() ... 'XRP' 'STC' 'BC' 'NXT' 'IOTA'
- cryptocurrency_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.cryptocurrency_name() ... 'Ripple' 'SwiftCoin' 'BlackCoin' 'Nxt' 'IOTA'
- currency() Tuple[str, str]¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.currency() ... ('MWK', 'Kwacha malauí') ('NZD', 'Dólar neozelandés') ('BAM', 'Marco bosnioherzegovino') ('IRR', 'Rial iraní') ('SPL', 'Luigino')
- currency_code() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.currency_code() ... 'MWK' 'NZD' 'BAM' 'IRR' 'SPL'
- currency_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.currency_name() ... 'Kwacha malauí' 'Dólar neozelandés' 'Marco bosnioherzegovino' 'Rial iraní' 'Luigino'
faker.providers.date_time¶
- class faker.providers.date_time.es_ES.Provider(generator: Any)¶
Bases:
Provider- am_pm() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.am_pm() ... 'PM' 'PM' 'AM' 'AM' 'AM'
- century() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.century() ... 'XIII' 'XIV' 'II' 'IX' 'XVII'
- date(pattern: str = '%Y-%m-%d', end_datetime: date | datetime | timedelta | str | int | None = None) str¶
Get a date string between January 1, 1970 and now.
- Parameters:
pattern – Format of the date (year-month-day by default)
end_datetime – A
DateParseType. Defaults to the current date and time
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date() ... '2017-04-09' '2012-06-06' '1993-07-18' '1984-06-30' '1998-08-16'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date(pattern='%m/%d/%Y') ... '04/09/2017' '06/06/2012' '07/18/1993' '06/30/1984' '08/16/1998'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date(end_datetime='+1w') ... '2017-04-15' '2012-06-12' '1993-07-21' '1984-07-01' '1998-08-19'
- date_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'today') date¶
Get a Date object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().
- Parameters:
start_date – A
DateParseType. Defaults to 30 years agoend_date – A
DateParseType. Defaults to"today"
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_between() ... datetime.date(2021, 4, 25) datetime.date(2018, 9, 20) datetime.date(2008, 8, 6) datetime.date(2003, 10, 1) datetime.date(2011, 4, 27)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_between(start_date='-1w') ... datetime.date(2025, 12, 23) datetime.date(2025, 12, 23) datetime.date(2025, 12, 20) datetime.date(2025, 12, 19) datetime.date(2025, 12, 21)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_between(start_date="-1y", end_date="+1w") ... datetime.date(2025, 11, 3) datetime.date(2025, 10, 2) datetime.date(2025, 5, 29) datetime.date(2025, 3, 30) datetime.date(2025, 7, 2)
- date_between_dates(date_start: date | datetime | timedelta | str | int | None = None, date_end: date | datetime | timedelta | str | int | None = None) date¶
Get a random date between the two given dates.
- Parameters:
date_start – A
DateParseType. Defaults to the UNIX epochdate_end – A
DateParseType. Defaults to the current date and time
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_between_dates() ... datetime.date(2025, 12, 25) datetime.date(2025, 12, 25) datetime.date(2025, 12, 25) datetime.date(2025, 12, 25) datetime.date(2025, 12, 25)
- date_object(end_datetime: datetime | None = None) date¶
Get a date object between January 1, 1970 and now
- Parameters:
end_datetime – A
DateParseType. Defaults to the current date and time- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_object() ... datetime.date(2017, 4, 9) datetime.date(2012, 6, 6) datetime.date(1993, 7, 18) datetime.date(1984, 6, 30) datetime.date(1998, 8, 16)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_object(end_datetime='+1w') ... datetime.date(2017, 4, 15) datetime.date(2012, 6, 12) datetime.date(1993, 7, 21) datetime.date(1984, 7, 1) datetime.date(1998, 8, 19)
- date_of_birth(tzinfo: tzinfo | None = None, minimum_age: int = 0, maximum_age: int = 115) date¶
Generate a random date of birth represented as a Date object, constrained by optional miminimum_age and maximum_age parameters.
- Parameters:
tzinfo – Defaults to None.
minimum_age – Defaults to
0.maximum_age – Defaults to
115.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_of_birth() ... datetime.date(2007, 12, 8) datetime.date(1997, 11, 26) datetime.date(1958, 10, 8) datetime.date(1940, 1, 7) datetime.date(1969, 4, 16)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_of_birth(minimum_age=30, maximum_age=50) ... datetime.date(1992, 9, 17) datetime.date(1990, 11, 24) datetime.date(1983, 10, 24) datetime.date(1980, 6, 1) datetime.date(1985, 9, 19)
- date_this_century(before_today: bool = True, after_today: bool = False) date¶
Gets a Date object for the current century.
- Parameters:
before_today – include days in current century before today. Defaults to True
after_today – include days in current century after today. Defaults to False
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_century() ... datetime.date(2021, 12, 9) datetime.date(2019, 9, 10) datetime.date(2010, 12, 5) datetime.date(2006, 9, 23) datetime.date(2013, 4, 13)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_century(before_today=False, after_today=True) ... datetime.date(2088, 6, 25) datetime.date(2082, 1, 31) datetime.date(2057, 2, 10) datetime.date(2045, 2, 22) datetime.date(2063, 10, 29)
- date_this_decade(before_today: bool = True, after_today: bool = False) date¶
Gets a Date object for the decade year.
- Parameters:
before_today – include days in current decade before today. Defaults to True
after_today – include days in current decade after today. Defaults to False
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_decade() ... datetime.date(2025, 1, 19) datetime.date(2024, 7, 14) datetime.date(2022, 7, 7) datetime.date(2021, 7, 19) datetime.date(2023, 1, 22)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_decade(before_today=False, after_today=True) ... datetime.date(2029, 5, 17) datetime.date(2029, 1, 10) datetime.date(2027, 9, 3) datetime.date(2027, 1, 9) datetime.date(2028, 1, 14)
- date_this_month(before_today: bool = True, after_today: bool = False) date¶
Gets a Date object for the current month.
- Parameters:
before_today – include days in current month before today. Defaults to True
after_today – include days in current month after today. Defaults to False
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_month() ... datetime.date(2025, 12, 21) datetime.date(2025, 12, 19) datetime.date(2025, 12, 11) datetime.date(2025, 12, 7) datetime.date(2025, 12, 13)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_month(before_today=False, after_today=True) ... datetime.date(2025, 12, 30) datetime.date(2025, 12, 30) datetime.date(2025, 12, 27) datetime.date(2025, 12, 26) datetime.date(2025, 12, 28)
- date_this_year(before_today: bool = True, after_today: bool = False) date¶
Gets a Date object for the current year.
- Parameters:
before_today – include days in current year before today. Defaults to True
after_today – include days in current year after today. Defaults to False
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_year() ... datetime.date(2025, 10, 30) datetime.date(2025, 9, 29) datetime.date(2025, 5, 31) datetime.date(2025, 4, 3) datetime.date(2025, 7, 3)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_this_year(before_today=False, after_today=True) ... datetime.date(2025, 12, 30) datetime.date(2025, 12, 30) datetime.date(2025, 12, 27) datetime.date(2025, 12, 26) datetime.date(2025, 12, 28)
- date_time(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None) datetime¶
Get a datetime object for a date between January 1, 1970 and a specified end_datetime
- Parameters:
tzinfo – timezone, instance of datetime.tzinfo subclass
end_datetime – A
DateParseType. Defaults to the current date and time
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time() ... datetime.datetime(2017, 4, 9, 21, 50, 55, 62137) datetime.datetime(2012, 6, 6, 21, 48, 33, 577721) datetime.datetime(1993, 7, 18, 10, 27, 3, 864913) datetime.datetime(1984, 6, 30, 1, 49, 20, 578182) datetime.datetime(1998, 8, 16, 1, 3, 54, 120135)
- date_time_ad(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) datetime¶
Get a datetime object for a date between January 1, 0001 and now
- Parameters:
tzinfo – timezone, instance of datetime.tzinfo subclass
end_datetime – A
DateParseType. Defaults to the current date and timestart_datetime – A
DateParseType. Defaults to UNIX timestamp-62135596800,
equivalent to 0001-01-01 00:00:00 UTC
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_ad() ... datetime.datetime(1710, 12, 10, 0, 25, 50, 531990) datetime.datetime(1535, 11, 5, 21, 54, 47, 461090) datetime.datetime(852, 8, 25, 12, 49, 55, 908905) datetime.datetime(525, 4, 21, 3, 56, 1, 548035) datetime.datetime(1036, 4, 28, 9, 29, 35, 112339)
- date_time_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'now', tzinfo: tzinfo | None = None) datetime¶
Get a datetime object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().
- Parameters:
start_date – A
DateParseType. Defaults to 30 years agoend_date – A
DateParseType. Defaults to"now"tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_between() ... datetime.datetime(2021, 4, 25, 7, 39, 18, 236214) datetime.datetime(2018, 9, 20, 21, 4, 4, 808743) datetime.datetime(2008, 8, 7, 2, 33, 45, 361449) datetime.datetime(2003, 10, 1, 19, 44, 21, 49189) datetime.datetime(2011, 4, 27, 23, 1, 17, 171082)
- date_time_between_dates(datetime_start: date | datetime | timedelta | str | int | None = None, datetime_end: date | datetime | timedelta | str | int | None = None, tzinfo: tzinfo | None = None) datetime¶
Get a random datetime between the two given datetimes.
- Parameters:
datetime_start – A
DateParseType. Defaults to the UNIX epochdatetime_end – A
DateParseType. Defaults to the current date and timetzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_between_dates() ... datetime.datetime(2025, 12, 25, 0, 28, 35) datetime.datetime(2025, 12, 25, 0, 28, 35) datetime.datetime(2025, 12, 25, 0, 28, 35) datetime.datetime(2025, 12, 25, 0, 28, 35) datetime.datetime(2025, 12, 25, 0, 28, 35)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_between_dates(datetime_start='-30y', datetime_end='now') ... datetime.datetime(2021, 4, 25, 7, 39, 18, 236214) datetime.datetime(2018, 9, 20, 21, 4, 4, 808743) datetime.datetime(2008, 8, 7, 2, 33, 45, 361449) datetime.datetime(2003, 10, 1, 19, 44, 21, 49189) datetime.datetime(2011, 4, 27, 23, 1, 17, 171082)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_between_dates(datetime_start='now', datetime_end='+1y') ... datetime.datetime(2026, 10, 29, 10, 28, 32, 441207) datetime.datetime(2026, 9, 27, 20, 31, 21, 993625) datetime.datetime(2026, 5, 27, 15, 6, 21, 345382) datetime.datetime(2026, 3, 29, 14, 4, 42, 534973) datetime.datetime(2026, 6, 29, 18, 11, 16, 405703)
- date_time_this_century(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime¶
Gets a datetime object for the current century.
- Parameters:
before_now – include days in current century before today. Defaults to True
after_now – include days in current century after today. Defaults to False
tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_century() ... datetime.datetime(2021, 12, 9, 13, 55, 23, 435517) datetime.datetime(2019, 9, 11, 0, 3, 21, 221061) datetime.datetime(2010, 12, 5, 5, 35, 0, 980381) datetime.datetime(2006, 9, 23, 3, 0, 8, 610438) datetime.datetime(2013, 4, 14, 0, 10, 26, 776238)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_century(before_now=False, after_now=True) ... datetime.datetime(2088, 6, 25, 22, 44, 53, 733169) datetime.datetime(2082, 1, 31, 7, 15, 0, 401828) datetime.datetime(2057, 2, 10, 3, 56, 25, 942367) datetime.datetime(2045, 2, 22, 19, 53, 50, 294084) datetime.datetime(2063, 10, 29, 7, 43, 22, 929961)
- date_time_this_decade(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime¶
Gets a datetime object for the decade year.
- Parameters:
before_now – include days in current decade before today. Defaults to True
after_now – include days in current decade after today. Defaults to False
tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_decade() ... datetime.datetime(2025, 1, 19, 1, 53, 3, 1780) datetime.datetime(2024, 7, 14, 3, 29, 23, 896483) datetime.datetime(2022, 7, 7, 22, 58, 26, 595831) datetime.datetime(2021, 7, 19, 17, 43, 3, 829534) datetime.datetime(2023, 1, 22, 3, 29, 23, 834999)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_decade(before_now=False, after_now=True) ... datetime.datetime(2029, 5, 17, 14, 44, 41, 239074) datetime.datetime(2029, 1, 10, 16, 21, 53, 396013) datetime.datetime(2027, 9, 3, 9, 51, 14, 288735) datetime.datetime(2027, 1, 9, 2, 30, 28, 764531) datetime.datetime(2028, 1, 14, 13, 27, 49, 703585)
- date_time_this_month(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime¶
Gets a datetime object for the current month.
- Parameters:
before_now – include days in current month before today. Defaults to True
after_now – include days in current month after today. Defaults to False
tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_month() ... datetime.datetime(2025, 12, 21, 6, 47, 21, 334798) datetime.datetime(2025, 12, 19, 4, 56, 34, 141738) datetime.datetime(2025, 12, 11, 2, 26, 58, 510272) datetime.datetime(2025, 12, 7, 5, 15, 33, 815634) datetime.datetime(2025, 12, 13, 6, 44, 16, 98377)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_month(before_now=False, after_now=True) ... datetime.datetime(2025, 12, 30, 21, 56, 13, 152327) datetime.datetime(2025, 12, 30, 7, 27, 5, 931097) datetime.datetime(2025, 12, 27, 22, 55, 55, 411825) datetime.datetime(2025, 12, 26, 19, 51, 3, 808350) datetime.datetime(2025, 12, 28, 14, 7, 37, 115337)
- date_time_this_year(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime¶
Gets a datetime object for the current year.
- Parameters:
before_now – include days in current year before today. Defaults to True
after_now – include days in current year after today. Defaults to False
tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_year() ... datetime.datetime(2025, 10, 30, 7, 40, 29, 357367) datetime.datetime(2025, 9, 29, 8, 42, 19, 120028) datetime.datetime(2025, 5, 31, 13, 45, 4, 961256) datetime.datetime(2025, 4, 3, 16, 44, 9, 828888) datetime.datetime(2025, 7, 3, 1, 6, 57, 497744)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.date_time_this_year(before_now=False, after_now=True) ... datetime.datetime(2025, 12, 30, 21, 56, 13, 152327) datetime.datetime(2025, 12, 30, 7, 27, 5, 931097) datetime.datetime(2025, 12, 27, 22, 55, 55, 411825) datetime.datetime(2025, 12, 26, 19, 51, 3, 808350) datetime.datetime(2025, 12, 28, 14, 7, 37, 115337)
- day_of_month() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.day_of_month() ... '09' '06' '18' '30' '16'
- day_of_week()¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.day_of_week() ... 'domingo' 'miércoles' 'domingo' 'sábado' 'domingo'
- future_date(end_date: date | datetime | timedelta | str | int = '+30d') date¶
Get a Date object based on a random date between 1 day from now and a given date.
- Parameters:
end_date – A
DateParseType. Defaults to"+30d"tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.future_date() ... datetime.date(2026, 1, 19) datetime.date(2026, 1, 16) datetime.date(2026, 1, 7) datetime.date(2026, 1, 2) datetime.date(2026, 1, 9)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.future_date(end_date='+1y') ... datetime.date(2026, 10, 29) datetime.date(2026, 9, 27) datetime.date(2026, 5, 28) datetime.date(2026, 3, 30) datetime.date(2026, 6, 30)
- future_datetime(end_date: date | datetime | timedelta | str | int = '+30d', tzinfo: tzinfo | None = None) datetime¶
Get a datetime object based on a random date between 1 second form now and a given date.
- Parameters:
end_date – A
DateParseType. Defaults to"+30d"tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.future_datetime() ... datetime.datetime(2026, 1, 19, 8, 27, 36, 594731) datetime.datetime(2026, 1, 16, 18, 12, 13, 54467) datetime.datetime(2026, 1, 6, 15, 17, 17, 116942) datetime.datetime(2026, 1, 1, 18, 53, 47, 957843) datetime.datetime(2026, 1, 9, 8, 35, 39, 566513)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.future_datetime(end_date='+1y') ... datetime.datetime(2026, 10, 29, 10, 28, 32, 596785) datetime.datetime(2026, 9, 27, 20, 31, 22, 235670) datetime.datetime(2026, 5, 27, 15, 6, 21, 924810) datetime.datetime(2026, 3, 29, 14, 4, 43, 276056) datetime.datetime(2026, 6, 29, 18, 11, 16, 894428)
- iso8601(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, sep: str = 'T', timespec: str = 'auto') str¶
Get an ISO 8601 string for a datetime between the UNIX epoch and now.
- Parameters:
tzinfo – timezone, instance of datetime.tzinfo subclass
end_datetime – A
DateParseType. Defaults to the current date and timesep – separator between date and time, defaults to ‘T’
timespec – format specifier for the time part, defaults to ‘auto’ - see datetime.isoformat() documentation
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.iso8601() ... '2017-04-09T21:50:55.062137' '2012-06-06T21:48:33.577721' '1993-07-18T10:27:03.864913' '1984-06-30T01:49:20.578182' '1998-08-16T01:03:54.120135'
- month() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.month() ... '04' '06' '07' '06' '08'
- month_name()¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.month_name() ... 'abril' 'junio' 'julio' 'junio' 'agosto'
- past_date(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) date¶
Get a Date object based on a random date between a given date and 1 day ago.
- Parameters:
start_date – A
DateParseType. Defaults to"-30d"tzinfo – timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.past_date() ... datetime.date(2025, 12, 19) datetime.date(2025, 12, 16) datetime.date(2025, 12, 7) datetime.date(2025, 12, 2) datetime.date(2025, 12, 9)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.past_date(start_date='-1y') ... datetime.date(2025, 10, 28) datetime.date(2025, 9, 26) datetime.date(2025, 5, 26) datetime.date(2025, 3, 28) datetime.date(2025, 6, 28)
- past_datetime(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) datetime¶
Get a datetime object based on a random date between a given date and 1 second ago.
- Parameters:
start_date – A
DateParseType. Defaults to"-30d"tzinfo – timezone, instance of datetime.tzinfo subclass
- Example:
datetime(‘1999-02-02 11:42:52’)
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.past_datetime() ... datetime.datetime(2025, 12, 20, 8, 27, 35, 594731) datetime.datetime(2025, 12, 17, 18, 12, 12, 54467) datetime.datetime(2025, 12, 7, 15, 17, 16, 116942) datetime.datetime(2025, 12, 2, 18, 53, 46, 957843) datetime.datetime(2025, 12, 10, 8, 35, 38, 566513)
- pytimezone(*args: Any, **kwargs: Any) tzinfo | None¶
Generate a random timezone (see
faker.timezonefor any args) and return a Python object usable as atzinfofordatetimeor other fakers.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.pytimezone() ... zoneinfo.ZoneInfo(key='Indian/Maldives') zoneinfo.ZoneInfo(key='America/Barbados') zoneinfo.ZoneInfo(key='Europe/Stockholm') zoneinfo.ZoneInfo(key='Africa/Windhoek') zoneinfo.ZoneInfo(key='Asia/Qatar')
- time(pattern: str = '%H:%M:%S', end_datetime: date | datetime | timedelta | str | int | None = None) str¶
Get a time string (24h format by default)
- Parameters:
pattern – format
end_datetime – A
DateParseType. Defaults to the current date and time
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time() ... '21:50:55' '21:48:33' '10:27:03' '01:49:20' '01:03:54'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time(pattern='%I:%M %p') ... '09:50 PM' '09:48 PM' '10:27 AM' '01:49 AM' '01:03 AM'
- time_delta(end_datetime: date | datetime | timedelta | str | int | None = None) timedelta¶
Get a random timedelta object of duration between the current date and time and end_datetime
- Parameters:
end_datetime – A
DateParseType. Defaults to the current date and time- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time_delta() ... datetime.timedelta(0) datetime.timedelta(0) datetime.timedelta(0) datetime.timedelta(0) datetime.timedelta(0)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time_delta(end_datetime='+30h') ... datetime.timedelta(days=1, seconds=4797, microseconds=559965) datetime.timedelta(seconds=81859, microseconds=75518) datetime.timedelta(seconds=45421, microseconds=730730) datetime.timedelta(seconds=27963, microseconds=9032) datetime.timedelta(seconds=55217, microseconds=669908)
- time_object(end_datetime: date | datetime | timedelta | str | int | None = None) time¶
Get a time object
- Parameters:
end_datetime – A
DateParseType. Defaults to the current date and time- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time_object() ... datetime.time(21, 50, 55, 62137) datetime.time(21, 48, 33, 577721) datetime.time(10, 27, 3, 864913) datetime.time(1, 49, 20, 578182) datetime.time(1, 3, 54, 120135)
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time_object(end_datetime='+1h') ... datetime.time(22, 41, 34, 980803) datetime.time(22, 34, 2, 213571) datetime.time(10, 52, 17, 922604) datetime.time(2, 4, 52, 678483) datetime.time(1, 34, 34, 709132)
- time_series(start_date: date | datetime | timedelta | str | int = '-30d', end_date: date | datetime | timedelta | str | int = 'now', precision: float | None = None, distrib: Callable[[datetime], float] | None = None, tzinfo: tzinfo | None = None) Iterator[Tuple[datetime, Any]]¶
Returns a generator yielding tuples of
(<datetime>, <value>).The data points will start at
start_date, and be at every time interval specified byprecision.- Parameters:
start_date – A
DateParseType. Defaults to"-30d"end_date – A
DateParseType. Defaults to"now"precision – A float representing the time interval between data points.
Defaults to 1/30th of the time :param distrib: A callable that accepts a datetime object and returns a value. Defaults to a uniform distribution :param tzinfo: timezone, instance of datetime.tzinfo subclass
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.time_series() ... <generator object Provider.time_series at 0x7fa12fcf96c0> <generator object Provider.time_series at 0x7fa12fcf96c0> <generator object Provider.time_series at 0x7fa12fcf96c0> <generator object Provider.time_series at 0x7fa12fcf96c0> <generator object Provider.time_series at 0x7fa12fcf96c0>
- timezone() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.timezone() ... 'Indian/Maldives' 'America/Barbados' 'Europe/Stockholm' 'Africa/Windhoek' 'Asia/Qatar'
- unix_time(end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) float¶
Get a timestamp between January 1, 1970 and now, unless passed explicit
start_datetimeor end_datetime values.On Windows, the decimal part is always 0.
- Parameters:
end_datetime – A
DateParseType. Defaults to the UNIX epochstart_datetime – A
DateParseType. Defaults to the current date and time
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.unix_time() ... 1491774655.0621371 1339019313.5777206 742991223.8649132 457408160.5781819 903229434.1201354
faker.providers.internet¶
- class faker.providers.internet.es_ES.Provider(generator: Any)¶
Bases:
Provider- ascii_company_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ascii_company_email() ... 'crivero@transportes.es' 'annachaparro@desarrollo.com' 'conrado15@charo.net' 'hsalas@comercial.es' 'uriartepastora@hervas.com'
- ascii_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ascii_email() ... 'qarjona@hotmail.com' 'emateos@yahoo.com' 'lopechaves@infraestructuras.es' 'oterotono@yahoo.com' 'hsalas@comercial.es'
- ascii_free_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ascii_free_email() ... 'crivero@yahoo.com' 'yquiros@yahoo.com' 'lpalma@gmail.com' 'lopechaves@gmail.com' 'virginia89@gmail.com'
- ascii_safe_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ascii_safe_email() ... 'crivero@example.com' 'yquiros@example.com' 'lpalma@example.org' 'lopechaves@example.org' 'virginia89@example.org'
- company_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.company_email() ... 'crivero@transportes.es' 'annachaparro@desarrollo.com' 'conrado15@charo.net' 'hsalas@comercial.es' 'uriartepastora@hervas.com'
- dga(year: int | None = None, month: int | None = None, day: int | None = None, tld: str | None = None, length: int | None = None) str¶
Generates a domain name by given date https://en.wikipedia.org/wiki/Domain_generation_algorithm
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.dga() ... 'hxqvaffcmfsccynscisxeajjagjahtnfcmfsccynscisxeajjagjahtnfcmfscc.org' 'meydkrgdcvulautulqvjofrrnbjkfmvrewtpfttqcjafdhxckmyfamohcpnldug.org' 'iiulfpgbvqcdaehnqkbxmaqgkykorlxnwy.net' 'cpyhexmtvewxpwiiaxtgdfajuhbsyaaykvgkgreki.com' 'uqniukqjckmjabijnuqho.com'
- domain_name(levels: int = 1) str¶
Produce an Internet domain name with the specified number of subdomain levels.
>>> domain_name() nichols-phillips.com >>> domain_name(2) williamson-hopkins.jackson.com
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.domain_name() ... 'rivero.es' 'mateos.net' 'instalaciones.org' 'inversiones.es' 'charo.net'
- domain_word() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.domain_word() ... 'rivero' 'sandalio' 'desarrollo' 'infraestructuras' 'suarez'
- email(safe: bool = True, domain: str | None = None) str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.email() ... 'crivero@example.com' 'yquiros@example.com' 'lpalma@example.org' 'lopechaves@example.org' 'virginia89@example.org'
- free_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.free_email() ... 'crivero@yahoo.com' 'yquiros@yahoo.com' 'lpalma@gmail.com' 'lopechaves@gmail.com' 'virginia89@gmail.com'
- free_email_domain() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.free_email_domain() ... 'yahoo.com' 'yahoo.com' 'gmail.com' 'yahoo.com' 'hotmail.com'
- hostname(levels: int = 1) str¶
Produce a hostname with specified number of subdomain levels.
>>> hostname() db-01.nichols-phillips.com >>> hostname(0) laptop-56 >>> hostname(2) web-12.williamson-hopkins.jackson.com
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.hostname() ... 'web-66.hermanos.org' 'laptop-59.desarrollo.com' 'lt-48.inversiones.es' 'laptop-81.rovira.net' 'lt-77.comercial.es'
- http_method() str¶
Returns random HTTP method https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.http_method() ... 'OPTIONS' 'OPTIONS' 'GET' 'DELETE' 'PATCH'
- http_status_code(include_unassigned: bool = True) int¶
Returns random HTTP status code https://www.rfc-editor.org/rfc/rfc9110#name-status-codes :param include_unassigned: Whether to include status codes which have
not yet been assigned or are unused
- Returns:
a random three digit status code
- Return type:
- Example:
404
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.http_status_code() ... 532 297 488 555 315
- iana_id() str¶
Returns IANA Registrar ID https://www.iana.org/assignments/registrar-ids/registrar-ids.xhtml
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.iana_id() ... '6463344' '7056021' '679216' '4343903' '8577767'
- image_url(width: int | None = None, height: int | None = None, placeholder_url: str | None = None) str¶
Returns URL to placeholder image Example: http://placehold.it/640x480
- Parameters:
width – Optional image width
height – Optional image height
placeholder_url – Optional template string of image URLs from custom placeholder service. String must contain
{width}and{height}placeholders, eg:https:/example.com/{width}/{height}.
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.image_url() ... 'https://picsum.photos/788/861' 'https://dummyimage.com/530x995' 'https://dummyimage.com/621x976' 'https://dummyimage.com/447x285' 'https://placekitten.com/286/194'
- ipv4(network: bool = False, address_class: str | None = None, private: str | None = None) str¶
Returns a random IPv4 address or network with a valid CIDR.
- Parameters:
network – Network address
address_class – IPv4 address class (a, b, or c)
private – Public or private
- Returns:
IPv4
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ipv4() ... '171.174.170.81' '95.25.112.121' '51.105.121.194' '195.110.164.126' '141.250.247.54'
- ipv4_network_class() str¶
Returns a IPv4 network class ‘a’, ‘b’ or ‘c’.
- Returns:
IPv4 network class
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ipv4_network_class() ... 'b' 'b' 'a' 'b' 'c'
- ipv4_private(network: bool = False, address_class: str | None = None) str¶
Returns a private IPv4.
- Parameters:
network – Network address
address_class – IPv4 address class (a, b, or c)
- Returns:
Private IPv4
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ipv4_private() ... '172.29.117.82' '10.248.203.131' '172.25.180.188' '172.22.253.123' '192.168.71.140'
- ipv4_public(network: bool = False, address_class: str | None = None) str¶
Returns a public IPv4 excluding private blocks.
- Parameters:
network – Network address
address_class – IPv4 address class (a, b, or c)
- Returns:
Public IPv4
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ipv4_public() ... '166.186.169.69' '111.198.92.30' '168.155.75.206' '141.250.247.54' '212.120.204.37'
- ipv6(network: bool = False) str¶
Produce a random IPv6 address or network with a valid CIDR
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ipv6() ... 'e3e7:682:c209:4cac:629f:6fbf:d82c:7cd' 'f728:b4fa:4248:5e3a:a5d:2f35:6baa:9455' 'eb11:67b3:67a9:c378:7c65:c1e6:82e2:e662' 'f7c1:bd87:4da5:e709:d471:3d61:c8a7:639' 'e443:df78:9558:867f:5ba9:1fb0:7a02:4204'
- mac_address(multicast: bool = False) str¶
Returns a random MAC address.
- Parameters:
multicast – Multicast address
- Returns:
MAC Address
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.mac_address() ... '66:c5:d7:14:84:f8' '48:9b:f4:b7:6f:47' '18:47:30:80:4b:9e' '6e:25:a9:f1:33:b5' '0e:a1:68:f4:e2:85'
- nic_handle(suffix: str = 'FAKE') str¶
Returns NIC Handle ID https://www.apnic.net/manage-ip/using-whois/guide/person/
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nic_handle() ... 'ZYT1598-FAKE' 'SIW493-FAKE' 'UE59352-FAKE' 'WBUN892-FAKE' 'CHQD98-FAKE'
- nic_handles(count: int = 1, suffix: str = '????') List[str]¶
Returns NIC Handle ID list
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nic_handles() ... ['ZYT1598-EWLN'] ['WGNZ53-QITZ'] ['UERV52-EJGW'] ['CHQ498-DZJA'] ['UU1864-TEMK']
- port_number(is_system: bool = False, is_user: bool = False, is_dynamic: bool = False) int¶
Returns a network port number https://tools.ietf.org/html/rfc6335
- Parameters:
is_system – System or well-known ports
is_user – User or registered ports
is_dynamic – Dynamic / private / ephemeral ports
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.port_number() ... 50494 55125 5306 33936 63691
- ripe_id() str¶
Returns RIPE Organization ID https://www.ripe.net/manage-ips-and-asns/db/support/organisation-object-in-the-ripe-database
- Return type:
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ripe_id() ... 'ORG-ZYT1598-RIPE' 'ORG-SIW493-RIPE' 'ORG-UE59352-RIPE' 'ORG-WBUN892-RIPE' 'ORG-CHQD98-RIPE'
- safe_domain_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.safe_domain_name() ... 'example.com' 'example.com' 'example.org' 'example.com' 'example.net'
- safe_email() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.safe_email() ... 'crivero@example.com' 'yquiros@example.com' 'lpalma@example.org' 'lopechaves@example.org' 'virginia89@example.org'
- slug(value: str | None = None) str¶
Django algorithm
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.slug() ... 'three-image-son' 'kitchen-amount' 'much-mention' 'why-step-themselves' 'me-help-past-wait'
- tld() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.tld() ... 'es' 'es' 'com' 'org' 'es'
- uri(schemes: List[str] | None = None, deep: int | None = None) str¶
- Parameters:
schemes – a list of strings to use as schemes, one will chosen randomly. If None, it will generate http and https uris. Passing an empty list will result in schemeless uri generation like “://domain.com/index.html”.
deep – an integer specifying how many path components the URI should have..
- Returns:
a random url string.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.uri() ... 'https://mateos.net/categorylogin.jsp' 'http://inversiones.es/mainfaq.htm' 'https://www.venceslas.com/tag/tagsmain.asp' 'http://logistica.net/posts/blog/appregister.php' 'http://www.inversiones.org/tag/app/searchlogin.jsp'
- uri_extension() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.uri_extension() ... '.php' '.php' '.html' '.htm' '.asp'
- uri_page() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.uri_page() ... 'author' 'category' 'privacy' 'category' 'index'
- uri_path(deep: int | None = None) str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.uri_path() ... 'posts/tag' 'explore/tag' 'explore/category' 'blog' 'category'
- url(schemes: List[str] | None = None) str¶
- Parameters:
schemes – a list of strings to use as schemes, one will chosen randomly. If None, it will generate http and https urls. Passing an empty list will result in schemeless url generation like “://domain.com”.
- Returns:
a random url string.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.url() ... 'https://hermanos.org/' 'https://desarrollo.com/' 'https://www.construccion.com/' 'https://fuente.org/' 'http://www.servicios.net/'
faker.providers.isbn¶
faker.providers.job¶
- class faker.providers.job.es_ES.Provider(generator: Any)¶
Bases:
Provider- job() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.job() ... 'Técnico en asistencia al usuario de tecnología de la información y las comunicaciones' 'Geólogo' 'Recolector de basura y material reciclable' 'Trabajador comunitario de la salud' 'Ingeniero de minas'
faker.providers.lorem¶
- class faker.providers.lorem.es_ES.Provider(generator: Any)¶
Bases:
ProviderImplement lorem provider for
es_ESlocale.Sources:
- get_words_list(part_of_speech: str | None = None, ext_word_list: Sequence[str] | None = None) List[str]¶
Get list of words.
ext_word_listis a parameter that allows the user to provide a list of words to be used instead of the built-in word list. Ifext_word_listis provided, then the value ofpart_of_speechis ignored.part_of_speechis a parameter that defines to what part of speech the returned word belongs. Ifext_word_listis notNone, thenpart_of_speechis ignored. If the value ofpart_of_speechdoes not correspond to an existent part of speech according to the set locale, then an exception is raised.Warning
Depending on the length of a locale provider’s built-in word list or on the length of
ext_word_listif provided, a largenbcan exhaust said lists ifuniqueisTrue, raising an exception.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.get_words_list(part_of_speech="abc", ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.get_words_list(ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl'] ['abc', 'def', 'ghi', 'jkl']
- paragraph(nb_sentences: int = 3, variable_nb_sentences: bool = True, ext_word_list: Sequence[str] | None = None) str¶
Generate a paragraph.
The
nb_sentencesargument controls how many sentences the paragraph will contain, and settingvariable_nb_sentencestoFalsewill generate the exact amount, while setting it toTrue(default) will generate a random amount (+/-40%, minimum of 1) usingrandomize_nb_elements().Under the hood,
sentences()is used to generate the sentences, so the argumentext_word_listworks in the same way here as it would in that method.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraph(nb_sentences=5) ... 'Dos peor capacidad grado s arriba. B pequeña prensa da estuvo secretario. Rafael época ejército clase algunos. Marcha pp tiempos mes. Libro mal pensar noche.' 'Paz políticos ni grado profesional sí prueba. La central santiago unas voz comercio tener sol. Precio otras ministerio ella niveles. Somos valor manos cabeza hecho luz material. Pablo productos energía imagen especialmente. Trata número tras informe este máximo.' 'Tiempo permite momento días ser aunque ambiente. Hechos aumento crisis duda cambio ejemplo permite. Cine interés línea n asimismo cuadro. Voz mayor respuesta iba.' 'Su meses ejército amor partido. Cámara mundo algunos ve muy partidos. Clase cada hecho social s algo ella. Todo como rosa cosas.' 'Fuera felipe pone más ir año carlos. Ese casos cultura así niño. Mundo vuelve nuestro ellas régimen aumento grado embargo.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraph(nb_sentences=5, variable_nb_sentences=False) ... 'Acerca europa cinco diez producción programas. Arriba últimos socialista estados madrid. Estuvo secretario obra armas. Rodríguez propio marcha pp tiempos mes mundo principio. Pensar noche seguir paz políticos ni grado profesional.' 'Escuela última tales existencia. P técnica luz. Enfermedad ni asimismo países precio otras. Datos aunque respecto universidad hermano nada causa. Queda cuba televisión pablo.' 'Queda podría ella tenían trata número tras informe. Decía lucha nuestros. Permite momento días ser. Pp carne encuentra niños. Muchas local parís cama función martín cine.' 'Figura república i noviembre últimos voz mayor. Origen solución sociedad régimen unos nadie producto luz. Mundo algunos ve muy. Económico obstante clase cada hecho social s. Niños único conseguir todo.' 'Muchos blanca formación. Fuera felipe pone más ir año carlos. Ese casos cultura así niño. Mundo vuelve nuestro ellas régimen aumento grado embargo. Piel vez poner solución aquella.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraph(nb_sentences=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'Abc jkl def jkl jkl jkl. Ghi jkl ghi def jkl ghi. Jkl ghi ghi ghi abc. Ghi jkl ghi def. Def def ghi abc.' 'Def ghi abc jkl jkl abc jkl. Abc def jkl abc def jkl abc ghi. Jkl abc ghi abc jkl. Jkl def def def abc def jkl. Jkl ghi ghi def ghi. Def abc abc jkl abc jkl.' 'Abc ghi abc abc abc abc ghi. Ghi jkl ghi ghi abc abc ghi. Ghi def ghi jkl jkl jkl. Def abc ghi def.' 'Abc def ghi def abc. Jkl abc abc ghi abc ghi. Ghi abc abc abc jkl abc abc. Abc abc jkl abc.' 'Abc jkl jkl abc def abc def. Abc def def abc def. Abc jkl abc def ghi jkl jkl abc.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraph(nb_sentences=5, variable_nb_sentences=False, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'Jkl def def ghi def jkl. Jkl def jkl abc abc. Jkl ghi def jkl. Jkl def ghi jkl ghi def abc def. Ghi abc ghi def ghi abc jkl jkl.' 'Ghi def jkl ghi. Ghi jkl def. Ghi abc jkl abc jkl abc. Def abc def ghi jkl abc ghi. Ghi jkl ghi jkl.' 'Ghi def abc jkl def abc abc jkl. Ghi ghi def. Ghi abc abc abc. Jkl jkl ghi def. Def jkl jkl jkl ghi jkl ghi.' 'Def ghi ghi jkl def def abc. Ghi jkl abc ghi abc abc jkl def. Abc abc ghi abc. Ghi jkl ghi abc abc abc jkl. Def def jkl abc.' 'Abc jkl ghi. Abc jkl jkl abc def abc def. Abc def def abc def. Abc jkl abc def ghi jkl jkl abc. Jkl abc ghi jkl def.'
- paragraphs(nb: int = 3, ext_word_list: Sequence[str] | None = None) List[str]¶
Generate a list of paragraphs.
This method uses
paragraph()under the hood to generate paragraphs, and thenbargument controls exactly how many sentences the list will contain. Theext_word_listargument works in exactly the same way as well.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraphs(nb=5) ... ['Dos peor capacidad grado s arriba. B pequeña prensa da estuvo secretario. Rafael época ejército clase algunos.', 'Pp tiempos mes mundo. Mal pensar noche seguir paz políticos.', 'Profesional sí prueba seguro memoria hubo p. Unas voz comercio tener sol eran.', 'Datos aunque respecto universidad hermano nada causa. Queda cuba televisión pablo.', 'Energía imagen especialmente buen fuentes cabeza manera. Este máximo carlos tiempo. Junio carne pese pp. Hechos aumento crisis duda cambio ejemplo permite.'] ['Hora figura república i noviembre últimos voz mayor. Origen solución sociedad régimen unos nadie producto luz. Mundo algunos ve muy.', 'Clase cada hecho social s algo ella. Todo como rosa cosas. Posibilidad principales nos permite.', 'Quizá encontrar tiempo ese casos cultura. Estamos son mundo vuelve. Carlos lópez futuro rodríguez habría.', 'Expresión primer estas varias. Rey arte pueden mes.', 'Temas asimismo suelo razón lucha casi amigo. Construcción éste muy don estar jamás propia. Plaza función área adelante esto.'] ['Actitud título aunque podemos derecha medio. Oficial interior militares jóvenes idea.', 'Base pocos años imagen cinco pasado decisión. Pequeña españoles de ser paso democracia está. He premio lleva hace baja diversas.', 'Mal nuestra región que unidad decisión. Tener evitar dentro nivel. Mundo salida servicio esa.', 'Felipe mayor modo resulta vuelta siquiera presidente. Dar es dos argentina.', 'Sistemas diversos armas también deja habrá. Momentos rodríguez pensar policía pasar parece respuesta. Lugar mañana orden.'] ['Orden quizá también tenía. Junto comisión hacen cuanto estaban estar desde fueron. Fernando nivel g dicho nada importancia cerca.', 'Hecho mayor organización esta iba puedo. Has formas zona animales. Él otra dejó nos.', 'Dinero juego consejo valor.', 'Relaciones fuerza vuelve hombres fácil. Sistema presidente unidad adelante ha próximo. Les hijo parece fue siguientes. Natural contra edad tengo llamado.', 'J todas camino análisis marco comunidad asimismo real. Términos opinión temas ministerio reforma del ejército.'] ['Cuando todas modo programas pese b. Uno otra zonas son tarde dos una. Mercado va todas siete generales prensa abril.', 'Partidos viene puerto. Torno sean victoria aún presente favor tales resultados. Importantes mí entrar lo considera construcción.', 'Habría luz central información tales psoe campo. Ni república mientras unidos s yo.', 'Base siguiente oposición región plaza política diversas.', 'P saber años. Diferencia lo domingo esto sé i suelo. Campo riesgo aire razones actividades.']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.paragraphs(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['Abc jkl def jkl jkl jkl. Ghi jkl ghi def jkl ghi. Jkl ghi ghi ghi abc.', 'Jkl ghi def abc. Def ghi abc ghi def ghi.', 'Jkl abc jkl ghi jkl ghi ghi. Abc def jkl abc ghi abc.', 'Def abc def ghi jkl abc ghi. Ghi jkl ghi jkl.', 'Ghi def ghi def ghi def abc. Abc jkl def abc. Jkl jkl jkl jkl. Ghi jkl ghi ghi abc abc ghi.'] ['Def def ghi ghi jkl def def abc. Ghi jkl abc ghi abc abc jkl def. Abc abc ghi abc.', 'Ghi abc abc abc jkl abc abc. Abc abc jkl abc. Def ghi abc ghi.', 'Ghi jkl abc abc def def. Ghi abc abc jkl. Def jkl def jkl ghi.', 'Jkl abc abc ghi. Ghi def abc def.', 'Jkl jkl ghi def ghi abc ghi. Ghi def abc def abc jkl def. Ghi ghi jkl jkl abc.'] ['Ghi jkl abc ghi ghi abc. Ghi def jkl ghi def.', 'Def ghi abc def def abc ghi. Jkl ghi abc abc def jkl abc. Abc jkl ghi abc ghi jkl.', 'Def abc ghi abc jkl ghi. Abc ghi abc def. Abc jkl def abc.', 'Jkl abc def ghi jkl ghi abc. Def abc abc ghi.', 'Jkl jkl jkl abc ghi ghi. Ghi jkl ghi def ghi abc ghi. Abc def def.'] ['Def ghi abc abc. Def def ghi def def abc abc abc. Ghi def jkl def abc ghi def.', 'Abc abc def abc def ghi. Jkl ghi def jkl. Abc abc ghi abc.', 'Def ghi def def.', 'Def def jkl def jkl. Abc abc jkl jkl abc ghi. Abc def abc abc jkl. Ghi abc def def jkl.', 'Jkl abc def ghi jkl def jkl def. Jkl ghi jkl ghi jkl abc ghi.'] ['Abc abc def jkl jkl ghi. Abc abc jkl abc abc abc abc. Def abc abc ghi jkl ghi jkl.', 'Ghi ghi jkl. Jkl ghi jkl abc ghi ghi jkl def. Ghi abc jkl abc jkl ghi.', 'Ghi def def def jkl jkl def. Abc ghi abc def jkl abc.', 'Def def jkl ghi ghi abc jkl.', 'Ghi def abc. Jkl abc ghi abc def ghi ghi. Def jkl def jkl ghi.']
- sentence(nb_words: int = 6, variable_nb_words: bool = True, ext_word_list: Sequence[str] | None = None) str¶
Generate a sentence.
The
nb_wordsargument controls how many words the sentence will contain, and settingvariable_nb_wordstoFalsewill generate the exact amount, while setting it toTrue(default) will generate a random amount (+/-40%, minimum of 1) usingrandomize_nb_elements().Under the hood,
words()is used to generate the words, so the argumentext_word_listworks in the same way here as it would in that method.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentence(nb_words=10) ... 'Acerca europa cinco diez producción programas podía nuestros b pequeña.' 'Madrid madrid dijo atrás rafael época ejército clase algunos según cada capaz.' 'Mes mundo principio mesa humana piel nuestros señora hombres puerto.' 'Profesional sí prueba seguro memoria hubo p técnica luz marcha enfermedad ni asimismo.' 'Eran arriba precio datos aunque respecto universidad hermano.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentence(nb_words=10, variable_nb_words=False) ... 'Exterior acerca europa cinco diez producción programas podía nuestros b.' 'Pequeña prensa da estuvo secretario obra armas noviembre supuesto rodríguez.' 'Propio marcha pp tiempos mes mundo principio mesa humana piel.' 'Nuestros señora hombres puerto pasa no escuela última tales existencia.' 'La central santiago unas voz comercio tener sol eran arriba.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentence(nb_words=10, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'Jkl def def ghi def jkl def def ghi jkl.' 'Abc abc abc jkl jkl ghi ghi ghi abc abc abc jkl.' 'Def abc def ghi jkl jkl def jkl def jkl.' 'Jkl abc jkl ghi jkl ghi ghi jkl def ghi ghi abc jkl.' 'Abc jkl jkl def abc def ghi jkl.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentence(nb_words=10, variable_nb_words=True, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'Jkl def def ghi def jkl def def ghi jkl.' 'Abc abc abc jkl jkl ghi ghi ghi abc abc abc jkl.' 'Def abc def ghi jkl jkl def jkl def jkl.' 'Jkl abc jkl ghi jkl ghi ghi jkl def ghi ghi abc jkl.' 'Abc jkl jkl def abc def ghi jkl.'
- sentences(nb: int = 3, ext_word_list: Sequence[str] | None = None) List[str]¶
Generate a list of sentences.
This method uses
sentence()under the hood to generate sentences, and thenbargument controls exactly how many sentences the list will contain. Theext_word_listargument works in exactly the same way as well.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentences() ... ['Acerca europa cinco diez producción programas.', 'Arriba últimos socialista estados madrid.', 'Estuvo secretario obra armas.'] ['Rodríguez propio marcha pp tiempos mes mundo principio.', 'Pensar noche seguir paz políticos ni grado profesional.', 'Escuela última tales existencia.'] ['P técnica luz.', 'Enfermedad ni asimismo países precio otras.', 'Datos aunque respecto universidad hermano nada causa.'] ['Queda cuba televisión pablo.', 'Queda podría ella tenían trata número tras informe.', 'Decía lucha nuestros.'] ['Permite momento días ser.', 'Pp carne encuentra niños.', 'Muchas local parís cama función martín cine.']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentences(nb=5) ... ['Acerca europa cinco diez producción programas.', 'Arriba últimos socialista estados madrid.', 'Estuvo secretario obra armas.', 'Rodríguez propio marcha pp tiempos mes mundo principio.', 'Pensar noche seguir paz políticos ni grado profesional.'] ['Escuela última tales existencia.', 'P técnica luz.', 'Enfermedad ni asimismo países precio otras.', 'Datos aunque respecto universidad hermano nada causa.', 'Queda cuba televisión pablo.'] ['Queda podría ella tenían trata número tras informe.', 'Decía lucha nuestros.', 'Permite momento días ser.', 'Pp carne encuentra niños.', 'Muchas local parís cama función martín cine.'] ['Figura república i noviembre últimos voz mayor.', 'Origen solución sociedad régimen unos nadie producto luz.', 'Mundo algunos ve muy.', 'Económico obstante clase cada hecho social s.', 'Niños único conseguir todo.'] ['Muchos blanca formación.', 'Fuera felipe pone más ir año carlos.', 'Ese casos cultura así niño.', 'Mundo vuelve nuestro ellas régimen aumento grado embargo.', 'Piel vez poner solución aquella.']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.sentences(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['Jkl def def ghi def jkl.', 'Jkl def jkl abc abc.', 'Jkl ghi def jkl.', 'Jkl def ghi jkl ghi def abc def.', 'Ghi abc ghi def ghi abc jkl jkl.'] ['Ghi def jkl ghi.', 'Ghi jkl def.', 'Ghi abc jkl abc jkl abc.', 'Def abc def ghi jkl abc ghi.', 'Ghi jkl ghi jkl.'] ['Ghi def abc jkl def abc abc jkl.', 'Ghi ghi def.', 'Ghi abc abc abc.', 'Jkl jkl ghi def.', 'Def jkl jkl jkl ghi jkl ghi.'] ['Def ghi ghi jkl def def abc.', 'Ghi jkl abc ghi abc abc jkl def.', 'Abc abc ghi abc.', 'Ghi jkl ghi abc abc abc jkl.', 'Def def jkl abc.'] ['Abc jkl ghi.', 'Abc jkl jkl abc def abc def.', 'Abc def def abc def.', 'Abc jkl abc def ghi jkl jkl abc.', 'Jkl abc ghi jkl def.']
- text(max_nb_chars: int = 200, ext_word_list: Sequence[str] | None = None) str¶
Generate a text string.
The
max_nb_charsargument controls the approximate number of characters the text string will have, and depending on its value, this method may use eitherwords(),sentences(), orparagraphs()for text generation. Theext_word_listargument works in exactly the same way it would in any of those methods.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.text(max_nb_chars=20) ... 'Señora comisión.' 'Esfuerzo salud.' 'Algunas destino.' 'Organización.' 'Pacientes precio.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.text(max_nb_chars=80) ... 'Acerca europa cinco diez producción programas.' 'Estuvo secretario obra armas.' 'Pensar noche seguir paz políticos ni grado profesional.' 'P técnica luz. Enfermedad ni asimismo países precio otras.' 'Queda cuba televisión pablo.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.text(max_nb_chars=160) ... 'Dos peor capacidad grado s arriba. B pequeña prensa da estuvo secretario. Rafael época ejército clase algunos.' 'Profesional sí prueba seguro memoria hubo p. Unas voz comercio tener sol eran.' 'Energía imagen especialmente buen fuentes cabeza manera. Este máximo carlos tiempo. Junio carne pese pp. Hechos aumento crisis duda cambio ejemplo permite.' 'Clase cada hecho social s algo ella. Todo como rosa cosas. Posibilidad principales nos permite.' 'Expresión primer estas varias. Rey arte pueden mes.'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.text(ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'Abc jkl def jkl jkl jkl. Ghi jkl ghi def jkl ghi. Jkl ghi ghi ghi abc.\nJkl ghi def abc. Def ghi abc ghi def ghi.\nJkl abc jkl ghi jkl ghi ghi. Abc def jkl abc ghi abc.' 'Ghi def ghi def ghi def abc. Abc jkl def abc. Jkl jkl jkl jkl. Ghi jkl ghi ghi abc abc ghi.\nDef def ghi ghi jkl def def abc. Ghi jkl abc ghi abc abc jkl def. Abc abc ghi abc.' 'Ghi jkl abc abc def def. Ghi abc abc jkl. Def jkl def jkl ghi.\nJkl abc abc ghi. Ghi def abc def.\nJkl jkl ghi def ghi abc ghi. Ghi def abc def abc jkl def. Ghi ghi jkl jkl abc.' 'Def ghi abc def def abc ghi. Jkl ghi abc abc def jkl abc. Abc jkl ghi abc ghi jkl.\nDef abc ghi abc jkl ghi. Abc ghi abc def. Abc jkl def abc.\nJkl abc def ghi jkl ghi abc. Def abc abc ghi.' 'Def ghi abc abc. Def def ghi def def abc abc abc. Ghi def jkl def abc ghi def.\nAbc abc def abc def ghi. Jkl ghi def jkl. Abc abc ghi abc.\nDef ghi def def.'
- texts(nb_texts: int = 3, max_nb_chars: int = 200, ext_word_list: Sequence[str] | None = None) List[str]¶
Generate a list of text strings.
The
nb_textsargument controls how many text strings the list will contain, and this method usestext()under the hood for text generation, so the two remaining arguments,max_nb_charsandext_word_listwill work in exactly the same way as well.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.texts(nb_texts=5) ... ['Dos peor capacidad grado s arriba. B pequeña prensa da estuvo secretario. Rafael época ejército clase algunos.\nPp tiempos mes mundo. Mal pensar noche seguir paz políticos.', 'Datos aunque respecto universidad hermano nada causa. Queda cuba televisión pablo.', 'Hora figura república i noviembre últimos voz mayor. Origen solución sociedad régimen unos nadie producto luz. Mundo algunos ve muy.', 'Quizá encontrar tiempo ese casos cultura. Estamos son mundo vuelve. Carlos lópez futuro rodríguez habría.\nExpresión primer estas varias. Rey arte pueden mes.', 'Actitud título aunque podemos derecha medio. Oficial interior militares jóvenes idea.'] ['Mal nuestra región que unidad decisión. Tener evitar dentro nivel. Mundo salida servicio esa.\nFelipe mayor modo resulta vuelta siquiera presidente. Dar es dos argentina.', 'Orden quizá también tenía. Junto comisión hacen cuanto estaban estar desde fueron. Fernando nivel g dicho nada importancia cerca.', 'Dinero juego consejo valor.\nRelaciones fuerza vuelve hombres fácil. Sistema presidente unidad adelante ha próximo. Les hijo parece fue siguientes. Natural contra edad tengo llamado.', 'Cuando todas modo programas pese b. Uno otra zonas son tarde dos una. Mercado va todas siete generales prensa abril.', 'Habría luz central información tales psoe campo. Ni república mientras unidos s yo.\nBase siguiente oposición región plaza política diversas.'] ['Mismos orden hecho acto parecía expresión mucho ii. Profesional tribunal argentina supuesto juego. Ser presencia amor tener persona.', 'Menos juez corazón sin. Salud dado serie entrar voz través m. Ellas si segunda del.\nMismo aparece parece noche pie diversos. Actitud luis francia hermano.', 'Ayuda tras flores antes salir luego presenta. Película mal sociedad mitad.\nAmbos años esto lo después cada. Cierto dado jorge principal director igual.', 'Conocer casi precisamente propuesta fin libertad pueden. Quiere recursos político blanco tan mitad tierra.', 'Recuerdo seguro imagen humanos libro operación boca. Unión cuando volver largo buena. Intereses recuerdo fecha bien podrá tú hombre.'] ['Cierto entrada qué posición sus mes. U imágenes puedo.\nA también posición premio instituciones ambiente. Nacional pedro sistema principio vivir.', 'Ya lleva operación c miedo existen.\nDirector tan dolor d sola juicio demás sólo. Partes haciendo queda corazón salud ninguna madre.', 'Mis duda manera aunque comercio van. Incluso metros manos mundial buen. Palabras momentos era comenzó ahora visto éxito.\nImágenes visto les esa según ideas.', 'Espera fácil ésta llegó económico. Sentido les nuestras según conocimiento. Usted hacerlo somos a presente.', 'México opinión habla junio tal misma. Están agua centros serie. Cambio millones mí buen evitar.'] ['Españoles enfermedad informe memoria. Tipos haber hemos sean cuerpo oposición.\nPalabras sea su partidos puede. Política como única pero era ley tomar uno.', 'Socialista banco película conseguir ejército peso.\nFondo ex el lugar. Prueba ambiente otros mano técnica misma sistemas. Miedo aumento importancia formación.', 'Lejos habría ojos. Existe valores minutos. Porque esos explicó último análisis enfermedad muerto.\nJusticia hubiera período obra mayor máximo película. Plan cuarto argentina libro profesional.', 'Apoyo arte aquella del.\nSean he pasa espacio martín. Popular parte buenos cine. Mismos ministerio buen siendo cosa con diferencia.\nPasar voy torno manera mayo. Exterior dejó tal sur.', 'Pedro allí quería oposición. Curso nunca carne propuesta. Concepto través razones lejos actividades tanto.\nLas obra fecha saber características objetivo razón.\nBueno s mucho seguro mil pero soy duda.']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.texts(nb_texts=5, max_nb_chars=50) ... ['Acerca europa cinco diez producción programas.', 'Estuvo secretario obra armas.', 'Escuela última tales existencia. P técnica luz.', 'Queda cuba televisión pablo.', 'Decía lucha nuestros. Permite momento días ser.'] ['Muchas local parís cama función martín cine.', 'Mundo algunos ve muy.', 'Niños único conseguir todo.', 'Fuera felipe pone más ir año carlos.', 'Piel vez poner solución aquella.'] ['Temas asimismo suelo razón lucha casi amigo.', 'Plaza función área adelante esto.', 'Medio horas datos seguro pie temas.', 'Poder parte habrá.', 'Diversas hablar viene mal.'] ['Les suelo instituciones problema imágenes.', 'Dar es dos argentina.', 'Lugar mañana orden.', 'Creo destino quien presidente marcha.', 'Dio quienes especial menos pequeña.'] ['Campaña vio has formas zona animales.', 'País cuya junto.', 'Salud ellas parte oposición.', 'Serie modo república somos.', 'Vuelve j todas camino.']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.texts(nb_texts=5, max_nb_chars=50, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['Jkl def def ghi def jkl. Jkl def jkl abc abc.', 'Jkl def ghi jkl ghi def abc def.', 'Ghi def jkl ghi. Ghi jkl def.', 'Def abc def ghi jkl abc ghi. Ghi jkl ghi jkl.', 'Ghi ghi def. Ghi abc abc abc. Jkl jkl ghi def.'] ['Def ghi ghi jkl def def abc.', 'Abc abc ghi abc. Ghi jkl ghi abc abc abc jkl.', 'Abc jkl ghi. Abc jkl jkl abc def abc def.', 'Abc jkl abc def ghi jkl jkl abc.', 'Abc jkl ghi abc ghi. Jkl jkl ghi def ghi abc ghi.'] ['Ghi ghi jkl jkl abc. Def def ghi abc abc.', 'Def ghi def. Abc abc ghi.', 'Abc jkl jkl def ghi jkl jkl. Jkl def ghi def.', 'Abc ghi jkl def jkl. Def jkl ghi abc.', 'Def abc abc ghi. Def def ghi jkl jkl jkl ghi.'] ['Abc def def. Ghi def ghi abc abc jkl.', 'Def jkl ghi. Def def def abc jkl.', 'Ghi jkl jkl ghi def jkl. Abc abc ghi abc.', 'Jkl ghi abc abc abc jkl ghi. Def def abc jkl.', 'Def def ghi jkl. Ghi abc def def jkl.'] ['Jkl def jkl def def def. Ghi jkl abc ghi ghi.', 'Def ghi def jkl ghi jkl abc abc.', 'Jkl ghi jkl ghi ghi ghi jkl.', 'Ghi abc jkl abc jkl ghi. Ghi def abc jkl jkl.', 'Def jkl abc abc def. Jkl ghi abc ghi jkl def abc.']
- word(part_of_speech: str | None = None, ext_word_list: Sequence[str] | None = None) str¶
Generate a word.
This method uses
words()under the hood with thenbargument set to1to generate the result.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.word() ... 'señora' 'comisión' 'fácil' 'esfuerzo' 'salud'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.word(ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... 'jkl' 'jkl' 'abc' 'ghi' 'jkl'
- words(nb: int = 3, ext_word_list: List[str] | None = None, part_of_speech: str | None = None, unique: bool = False) List[str]¶
Generate a tuple of words.
The
nbargument controls the number of words in the resulting list, and ifext_word_listis provided, words from that list will be used instead of those from the locale provider’s built-in word list.if
word_listis not provided, the method will use a default value of None, which will result in the method calling theget_words_listmethod to get the word list. Ifword_listis provided, the method will use the provided list.If
uniqueisTrue, this method will return a list containing unique words. Under the hood,random_sample()will be used for sampling without replacement. IfuniqueisFalse,random_choices()is used instead, and the list returned may contain duplicates.- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.words() ... ['exterior', 'acerca', 'europa'] ['cinco', 'diez', 'producción'] ['programas', 'podía', 'nuestros'] ['b', 'pequeña', 'prensa'] ['da', 'estuvo', 'secretario']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.words(nb=5) ... ['exterior', 'acerca', 'europa', 'cinco', 'diez'] ['producción', 'programas', 'podía', 'nuestros', 'b'] ['pequeña', 'prensa', 'da', 'estuvo', 'secretario'] ['obra', 'armas', 'noviembre', 'supuesto', 'rodríguez'] ['propio', 'marcha', 'pp', 'tiempos', 'mes']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.words(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl']) ... ['jkl', 'jkl', 'def', 'def', 'ghi'] ['def', 'jkl', 'def', 'def', 'ghi'] ['jkl', 'ghi', 'def', 'jkl', 'ghi'] ['def', 'jkl', 'jkl', 'jkl', 'jkl'] ['def', 'ghi', 'jkl', 'ghi', 'def']
>>> Faker.seed(0) >>> for _ in range(5): ... fake.words(nb=4, ext_word_list=['abc', 'def', 'ghi', 'jkl'], unique=True) ... ['jkl', 'def', 'abc', 'ghi'] ['jkl', 'def', 'ghi', 'abc'] ['ghi', 'jkl', 'abc', 'def'] ['ghi', 'abc', 'jkl', 'def'] ['def', 'jkl', 'abc', 'ghi']
faker.providers.person¶
- class faker.providers.person.es_ES.Provider(generator: Any)¶
Bases:
Provider- first_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name() ... 'Rafaela' 'Rogelio' 'Marta' 'Tania' 'Sosimo'
- first_name_female() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_female() ... 'Sonia' 'Gabriela' 'Purificación' 'Vilma' 'Ignacia'
- first_name_male() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_male() ... 'Telmo' 'Guadalupe' 'Reynaldo' 'Victor' 'Humberto'
- first_name_nonbinary() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_nonbinary() ... 'Rafaela' 'Rogelio' 'Marta' 'Tania' 'Sosimo'
- language_name() str¶
Generate a random i18n language name (e.g. English).
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.language_name() ... 'Letón' 'Maltés' 'Aimara' 'Igbo' 'Romanche'
- last_name() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name() ... 'Plaza' 'Rivero' 'Arjona' 'Jove' 'Vidal'
- last_name_female() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_female() ... 'Plaza' 'Rivero' 'Arjona' 'Jove' 'Vidal'
- last_name_male() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_male() ... 'Plaza' 'Rivero' 'Arjona' 'Jove' 'Vidal'
- last_name_nonbinary() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_nonbinary() ... 'Plaza' 'Rivero' 'Arjona' 'Jove' 'Vidal'
- name() str¶
- Example:
‘John Doe’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name() ... 'Purificación Rivero Arjona' 'José Mari Torre-Quirós' 'Jorge Gastón Gil Vargas' 'Epifanio Chaves Bustamante' 'Rosalía Dionisia Collado Menéndez'
- name_female() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_female() ... 'Purificación Rivero' 'Dora Vidal Torre' 'Ágata Mateos' 'Felisa de Vargas' 'Elisabet Chaves Bustamante'
- name_male() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_male() ... 'Reynaldo Rivero' 'Efraín Vidal Torre' 'Ángel Mateos' 'Gastón de Vargas' 'Epifanio Chaves Bustamante'
- name_nonbinary() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_nonbinary() ... 'Purificación Rivero Arjona' 'José Mari Torre-Quirós' 'Jorge Gastón Gil Vargas' 'Epifanio Chaves Bustamante' 'Rosalía Dionisia Collado Menéndez'
- prefix() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix() ... 'del' 'del' 'de' 'del' 'del'
- prefix_female() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_female() ... 'del' 'del' 'de' 'del' 'del'
- prefix_male() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_male() ... 'del' 'del' 'de' 'del' 'del'
- prefix_nonbinary() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_nonbinary() ... 'del' 'del' 'de' 'del' 'del'
- suffix() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.suffix() ... '' '' '' '' ''
- suffix_female() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.suffix_female() ... '' '' '' '' ''
faker.providers.phone_number¶
- class faker.providers.phone_number.es_ES.Provider(generator: Any)¶
Bases:
ProviderAccording to official specs: https://avancedigital.mineco.gob.es/es-ES/Servicios/Numeracion/Documents/Guia_Numeracion.pdf
- country_calling_code() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.country_calling_code() ... '+687' '+595' '+880' '+964' '+41'
- msisdn() str¶
https://en.wikipedia.org/wiki/MSISDN
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.msisdn() ... '6048764759382' '2194892411578' '5659387784080' '6097535139332' '1158714841858'
faker.providers.ssn¶
- class faker.providers.ssn.es_ES.Provider(generator: Any)¶
Bases:
ProviderA Faker provider for the Spanish VAT IDs and DOIs
- cif() str¶
https://es.wikipedia.org/wiki/C%C3%B3digo_de_identificaci%C3%B3n_fiscal :return: a random Spanish CIF
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.cif() ... 'P9391640A' 'R7861206F' 'N2873923C' 'D68786748' 'G87592911'
- nie() str¶
https://es.wikipedia.org/wiki/N%C3%BAmero_de_identidad_de_extranjero :return: a random Spanish NIE
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nie() ... 'X4583788A' 'Y2975670J' 'Y8119614F' 'Y6949280M' 'X0610775X'
- nif() str¶
https://es.wikipedia.org/wiki/N%C3%BAmero_de_identificaci%C3%B3n_fiscal :return: NIF
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nif() ... '61447160S' '82632813T' '51391925N' '45960268N' '46318638L'
- nuss(company: bool = False) str¶
- Parameters:
company – flag to indicate if we should generate a company NUSS
- Returns:
a random Spanish Social Security Number (Número de la Seguridad Social)
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nuss() ... '358424377270' '019970054448' '207462817229' '114854293478' '028128827209'
>>> Faker.seed(0) >>> for _ in range(5): ... fake.nuss(company=True) ... '15860053809' '14966563668' '46168807585' '43859312155' '30348383633'
- ssn() str¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.ssn() ... '604-87-6475' '824-21-9489' '411-57-8156' '938-77-8408' '160-97-5351'
- vat_id() str¶
http://ec.europa.eu/taxation_customs/vies/faq.html#item_11 :return: a random Spanish VAT ID
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.vat_id() ... 'ES60487647w' 'ESZ3824219q' 'ESJ9241157g' 'ES65938778q' 'ESp80160975'