Locale es_MX

faker.providers.address

class faker.providers.address.es_MX.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()
...
'Circuito Segura 647 Interior 593\nVieja Chile, CHIS 89241-1578'
'Continuación Sur Urías 784 Interior 080\nVieja Turquía, AGS 53513-9332'
'Continuación Sauceda 148 Interior 418\nSan Paola de la Montaña, NL 19659-3423'
'Peatonal Coahuila de Zaragoza 220 186\nSan Octavio de la Montaña, JAL 94775-1591'
'Cerrada Angola 413 Edif. 525 , Depto. 601\nNueva Austria, COAH 13991'
administrative_unit() str

example: u’Guerrero’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.administrative_unit()
...
'Sinaloa'
'Tabasco'
'Baja California Sur'
'Morelos'
'Zacatecas'
building_number() str
Example:

‘791’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.building_number()
...
'6048'
'6475'
'382'
'2194'
'924'
city() str
Example:

‘Sashabury’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city()
...
'San Lucía de la Montaña'
'San Nayeli los bajos'
'San Hernán los bajos'
'San Rodolfo de la Montaña'
'Vieja Chile'
city_adjective() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_adjective()
...
'Vieja'
'Vieja'
'Nueva'
'Vieja'
'Vieja'
city_prefix() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_prefix()
...
'Norte'
'Norte'
'Sur'
'Norte'
'Norte'
city_suffix() str
Example:

‘town’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_suffix()
...
'los bajos'
'los bajos'
'de la Montaña'
'los bajos'
'los altos'
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'
current_country() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.current_country()
...
'Mexico'
'Mexico'
'Mexico'
'Mexico'
'Mexico'
current_country_code() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.current_country_code()
...
'MX'
'MX'
'MX'
'MX'
'MX'
postcode() str
Example:

86039-9874

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.postcode()
...
'60487-6475'
'82421'
'89241-1578'
'56593'
'78408-0160'
secondary_address() str

:example ‘020 Interior 999’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.secondary_address()
...
'604 Interior 876'
'759 Interior 382'
'219 Interior 489'
'411 578'
'565 938'
state() str

example: u’Guerrero’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.state()
...
'Sinaloa'
'Tabasco'
'Baja California Sur'
'Morelos'
'Zacatecas'
state_abbr() str

example: u’GRO’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.state_abbr()
...
'SIN'
'TAB'
'BCS'
'MOR'
'ZAC'
street_address() str
Example:

‘791 Crist Parks’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_address()
...
'Andador Norte Segura 647 Interior 593'
'Calle Chiapas 489 Edif. 241 , Depto. 157'
'Eje vial Puebla 387 Edif. 784 , Depto. 080'
'Viaducto Sur Salcido 351 Interior 393'
'Privada Micronesia 158 714'
street_name() str
Example:

‘Crist Parks’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_name()
...
'Eje vial Sur Huerta'
'Diagonal Norte Romero'
'Prolongación Jalisco'
'Circunvalación Chile'
'Retorno Henríquez'
street_prefix() str

:example ‘Avenida’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_prefix()
...
'Diagonal'
'Eje vial'
'Andador'
'Circuito'
'Periférico'
street_suffix() str
Example:

‘Avenue’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_suffix()
...
'Street'
'Street'
'Street'
'Street'
'Street'

faker.providers.bank

class faker.providers.bank.es_MX.Provider(generator: Any)

Bases: Provider

Bank provider for es_MX locale.

aba() str

Generate an ABA routing transit number.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.aba()
...
'076048766'
'057593829'
'052194896'
'034115783'
'025659384'
bank() str

Generate a mexican bank name.

Returns:

A mexican bank name.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bank()
...
'Consubanco, S.A.'
'UBS Banco, S.A.'
'Deutsche Securities, S.A. de C.V.'
'AXA Seguros, S.A. De C.V.'
'Banco Santander, S.A.'
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()
...
'GB'
'GB'
'GB'
'GB'
'GB'
bban() str

Generate a Basic Bank Account Number (BBAN).

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bban()
...
'MYNB4876475938242'
'YDTZ4892411578156'
'KTUG8778408016097'
'KHXK1393328711587'
'DJRJ1858398947196'
clabe(bank_code: int | None = None) str

Generate a mexican bank account CLABE.

Sources:

Returns:

A fake CLABE number.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.clabe()
...
'155776689006792158'
'131988837681525139'
'166940496979959706'
'145597357884672403'
'062288228915909964'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.clabe(bank_code=2)
...
'002864631170560203'
'002041424285777665'
'002497663450887436'
'002991780860070717'
'002597357884672407'
iban() str

Generate an International Bank Account Number (IBAN).

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.iban()
...
'GB37MYNB4876475938242'
'GB05YDTZ4892411578156'
'GB04KTUG8778408016097'
'GB93KHXK1393328711587'
'GB55DJRJ1858398947196'
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 length can only be None or the integers 8 or 11. If the value is None, then a value of 8 or 11 will randomly be assigned.

Because all 8-digit SWIFT codes already refer to the primary branch or office, the primary argument only has an effect if the value of length is 11. If primary is True and length is 11, 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_dataset is True, 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 if use_dataset were False, 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()
...
'YNBIGB65ZT4'
'SGQEGBSIGQ8'
'JDXCGBV4'
'LNKTGBN9'
'OQIBGB9AFZA'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=8)
...
'MYNBGBQ6'
'PMZJGB4W'
'SGQEGBSI'
'YDTZGBQ8'
'WZTEGBTG'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=8, use_dataset=True)
...
'MYNBGBQ6'
'PMZJGB4W'
'SGQEGBSI'
'YDTZGBQ8'
'WZTEGBTG'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11)
...
'MYNBGBQ65ZT'
'PLSGGB6ISIG'
'TZIRGBJTGEV'
'PRDLGB1UN94'
'OQIBGB9AFZA'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, primary=True)
...
'MYNBGBQ6XXX'
'PMZJGB4WXXX'
'SGQEGBSIXXX'
'YDTZGBQ8XXX'
'WZTEGBTGXXX'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, use_dataset=True)
...
'MYNBGBQ65ZT'
'PLSGGB6ISIG'
'TZIRGBJTGEV'
'PRDLGB1UN94'
'OQIBGB9AFZA'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, primary=True, use_dataset=True)
...
'MYNBGBQ6XXX'
'PMZJGB4WXXX'
'SGQEGBSIXXX'
'YDTZGBQ8XXX'
'WZTEGBTGXXX'
swift11(primary: bool = False, use_dataset: bool = False) str

Generate an 11-digit SWIFT code.

This method uses swift() under the hood with the length argument set to 11. If primary is set to True, 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()
...
'MYNBGBQ65ZT'
'PLSGGB6ISIG'
'TZIRGBJTGEV'
'PRDLGB1UN94'
'OQIBGB9AFZA'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift11(use_dataset=True)
...
'MYNBGBQ65ZT'
'PLSGGB6ISIG'
'TZIRGBJTGEV'
'PRDLGB1UN94'
'OQIBGB9AFZA'
swift8(use_dataset: bool = False) str

Generate an 8-digit SWIFT code.

This method uses swift() under the hood with the length argument set to 8 and with the primary argument omitted. All 8-digit SWIFT codes already refer to the primary branch/office.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift8()
...
'MYNBGBQ6'
'PMZJGB4W'
'SGQEGBSI'
'YDTZGBQ8'
'WZTEGBTG'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift8(use_dataset=True)
...
'MYNBGBQ6'
'PMZJGB4W'
'SGQEGBSI'
'YDTZGBQ8'
'WZTEGBTG'

faker.providers.company

class faker.providers.company.es_MX.Provider(generator: Any)

Bases: Provider

bs() str
Example:

‘integrate extensible convergence’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bs()
...
'incuba esquemas proactivas'
'fortalece servicios web front-end'
'compromete interfaces eficientes'
'entrega tecnologías distribuidas'
'orquesta arquitecturas intuitivas'
catch_phrase() str
Example:

‘Robust full-range hub’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.catch_phrase()
...
'instalación multitarea enfocado al negocio'
'flexibilidad regional recontextualizado'
'interfaz híbrida realineado'
'conjunto terciaria basado en funcionalidad'
'sistema abierto sensible al contexto mandatorio'
company() str
Example:

‘Acme Ltd’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company()
...
'Peres, Arevalo y Huerta'
'Palacios y Madrigal S.C.'
'Vergara-Gamez S. R.L. de C.V.'
'Corporacin Cintrón-Cadena'
'Industrias Zarate, Contreras y Marín'
company_prefix() str
Example:

‘Grupo’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company_prefix()
...
'Proyectos'
'Club'
'Proyectos'
'Club'
'Despacho'
company_suffix() str
Example:

‘Ltd’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company_suffix()
...
'y Asociados'
'S.C.'
'y Asociados'
'S.C.'
'A.C.'

faker.providers.job

class faker.providers.job.es_MX.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.person

class faker.providers.person.es_MX.Provider(generator: Any)

Bases: Provider

first_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name()
...
'Judith'
'Lucía'
'Alfredo'
'Francisco Javier'
'Nayeli'
first_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_female()
...
'Judith'
'Lucía'
'Alfredo'
'Francisco Javier'
'Nayeli'
first_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_male()
...
'Judith'
'Lucía'
'Alfredo'
'Francisco Javier'
'Nayeli'
first_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_nonbinary()
...
'Judith'
'Lucía'
'Alfredo'
'Francisco Javier'
'Nayeli'
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()
...
'Olmos'
'Peres'
'Arevalo'
'Huerta'
'Segura'
last_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_female()
...
'Olmos'
'Peres'
'Arevalo'
'Huerta'
'Segura'
last_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_male()
...
'Olmos'
'Peres'
'Arevalo'
'Huerta'
'Segura'
last_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_nonbinary()
...
'Olmos'
'Peres'
'Arevalo'
'Huerta'
'Segura'
name() str
Example:

‘John Doe’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name()
...
'Lucía Arevalo'
'Nayeli Mercedes Palacios Madrigal'
'Jorge Vergara'
'Natalia Clara Lerma'
'Barbara Serafín Henríquez'
name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_female()
...
'Lucía Arevalo'
'Nayeli Mercedes Palacios Madrigal'
'Jorge Vergara'
'Natalia Clara Lerma'
'Barbara Serafín Henríquez'
name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_male()
...
'Lucía Arevalo'
'Nayeli Mercedes Palacios Madrigal'
'Jorge Vergara'
'Natalia Clara Lerma'
'Barbara Serafín Henríquez'
name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_nonbinary()
...
'Lucía Arevalo'
'Nayeli Mercedes Palacios Madrigal'
'Jorge Vergara'
'Natalia Clara Lerma'
'Barbara Serafín Henríquez'
prefix() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix()
...
'Lic.'
'Lic.'
'Sr(a).'
'Mtro.'
'Ing.'
prefix_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_female()
...
'Lic.'
'Lic.'
'Sr(a).'
'Mtro.'
'Ing.'
prefix_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_male()
...
'Lic.'
'Lic.'
'Sr(a).'
'Mtro.'
'Ing.'
prefix_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_nonbinary()
...
'Lic.'
'Lic.'
'Sr(a).'
'Mtro.'
'Ing.'
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()
...
''
''
''
''
''
suffix_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_male()
...
''
''
''
''
''
suffix_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_nonbinary()
...
''
''
''
''
''

faker.providers.phone_number

class faker.providers.phone_number.es_MX.Provider(generator: Any)

Bases: Provider

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'
phone_number() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.phone_number()
...
'604-876-4759x382'
'(219)489-2411'
'(578)156-5938x77840'
'(016)097-5351x3933'
'871-158-7148'

faker.providers.ssn

class faker.providers.ssn.es_MX.Provider(generator: Any)

Bases: Provider

A Faker provider for the Mexican SSN, RFC and CURP

curp() str

See https://es.wikipedia.org/wiki/Clave_%C3%9Anica_de_Registro_de_Poblaci%C3%B3n.

Returns:

a random Mexican CURP (Unique Population Registry Code)

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.curp()
...
'OUFE060301HQRZLIA2'
'NIAU960218MDFGRA08'
'MAXO561230MVZNXQ05'
'AOXP380331MSLWKP05'
'LEVK670709HTLPTS00'
elector_code(gender: Literal['H', 'M'] | None = None) str

Unique elector code issued by INE (Instituto Nacional Electoral) in Mexico.

Parameters:

gender (str) – Gender for which to generate the code. Will be randomly selected if not provided.

Returns:

a random INE elector code

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.elector_code()
...
'BXJCPD06030121M643'
'XTPBGY96021803M509'
'NXFGYJ56123027M094'
'DLFGPC38033128M306'
'MVWFDF67070917H510'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.elector_code(gender='M')
...
'DYZZBK06030133M457'
'RNVFXM96021833M827'
'KDWBNX56123031M504'
'NXRRZR38033114M173'
'RLFBDC67070932M449'
rfc(natural: bool = True) str

See https://es.wikipedia.org/wiki/Registro_Federal_de_Contribuyentes

Parameters:

natural (bool) – Whether to return the RFC of a natural person. Otherwise return the RFC of a legal person.

Returns:

a random Mexican RFC

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.rfc()
...
'AURS060301CEC'
'DAGA960218H00'
'VAYZ561230QX2'
'WILZ380331RP6'
'XUHZ670709KOP'
ssn() str

Mexican Social Security Number, as given by IMSS.

Returns:

a random Mexican SSN

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ssn()
...
'50539706643'
'34626566359'
'39456195591'
'28176446186'
'18129641058'