Locale en_IN¶
faker.providers.address
¶
- class faker.providers.address.en_IN.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() ... 'H.No. 487\nMitter Marg, Secunderabad-824219' 'H.No. 11, Sodhi Path, Raichur 593877' '01/60, Tak, Latur 139332' 'H.No. 587, Mitra Zila, Amravati-839894' '65/93, Gour Road, Gaya-947112'
- administrative_unit() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.administrative_unit() ... 'West Bengal' 'Madhya Pradesh' 'Tripura' 'Maharashtra' 'Arunachal Pradesh'
- building_number() str ¶
- Example:
‘791’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.building_number() ... '60' 'H.No. 87' '47' 'H.No. 93' '24/21'
- city() str ¶
- Example:
‘Sashabury’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.city() ... 'Bidar' 'Rampur' 'Machilipatnam' 'Morena' 'Ballia'
- city_name() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.city_name() ... 'Kharagpur' 'Bidar' 'Thane' 'Rampur' 'Sasaram'
- 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() ... 'Maldives' 'Palestine' 'Kingdom of the Netherlands' 'Barbados' 'Israel'
- 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() ... 'India' 'India' 'India' 'India' 'India'
- current_country_code() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.current_country_code() ... 'IN' 'IN' 'IN' 'IN' 'IN'
- pincode_in_army() int ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.pincode_in_army() ... 999346 905306 967013 953075 962468
- pincode_in_military() int ¶
Random PIN Code within Army Postal Service range
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.pincode_in_military() ... 999346 905306 967013 953075 962468
- pincode_in_state(state_abbr: str | None = None, include_union_territories: bool = False) int ¶
Random PIN Code within provided state abbreviation
- Parameters:
state_abbr – State Abbr, defaults to None
include_union_territories – Include Union Territories ?, defaults to False
- Raises:
ValueError – If incorrect state abbr
- Returns:
PIN Code
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.pincode_in_state() ... 741445 792094 794880 262468 678268
- postcode() str ¶
- Example:
86039-9874
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.postcode() ... '604876' '759382' '219489' '411578' '565938'
- postcode_in_army() int ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.postcode_in_army() ... 999346 905306 967013 953075 962468
- postcode_in_military() int ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.postcode_in_military() ... 999346 905306 967013 953075 962468
- postcode_in_state(state_abbr: str | None = None, include_union_territories: bool = False) int ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.postcode_in_state() ... 741445 792094 794880 262468 678268
- state() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.state() ... 'West Bengal' 'Madhya Pradesh' 'Tripura' 'Maharashtra' 'Arunachal Pradesh'
- street_address() str ¶
- Example:
‘791 Crist Parks’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.street_address() ... '04\nSunder Circle' 'H.No. 75\nKamdar' 'H.No. 21, Krishna' 'H.No. 11, Sodhi Path' 'H.No. 65, Jayaraman'
- street_name() str ¶
- Example:
‘Crist Parks’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.street_name() ... 'Salvi Marg' 'Lad Nagar' 'Sunder Circle' 'Mitter Marg' 'Parmar Chowk'
- street_suffix() str ¶
- Example:
‘Avenue’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.street_suffix() ... 'Street' 'Street' 'Street' 'Street' 'Street'
- union_territory() str ¶
Returns random union territory name
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.union_territory() ... 'Ladakh' 'Ladakh' 'Andaman and Nicobar Islands' 'Delhi, National Capital Territory of Delhi' 'Pondicherry'
- zipcode_in_army() int ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.zipcode_in_army() ... 999346 905306 967013 953075 962468
faker.providers.bank
¶
- class faker.providers.bank.en_IN.Provider(generator: Any)¶
Bases:
Provider
Implement bank provider for
en_IN
locale. Source: https://en.wikipedia.org/wiki/List_of_banks_in_India- 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 bank name.
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.bank() ... 'Jammu & Kashmir Bank' 'Karur Vysya Bank' 'Bank of Maharashtra' 'DCB Bank' 'Yes Bank'
- 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'
- 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 beNone
or the integers8
or11
. If the value isNone
, then a value of8
or11
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 oflength
is11
. Ifprimary
isTrue
andlength
is11
, 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
isTrue
, 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_dataset
wereFalse
, 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 thelength
argument set to11
. Ifprimary
is 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() ... '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 thelength
argument set to8
and with theprimary
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.person
¶
- class faker.providers.person.en_IN.Provider(generator: Any)¶
Bases:
Provider
- first_name() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name() ... 'Lekha' 'Osha' 'Banjeet' 'Aashi' 'Yasti'
- first_name_female() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_female() ... 'Sanya' 'Ucchal' 'Anusha' 'Leela' 'Yashodhara'
- first_name_male() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_male() ... 'Reyansh' 'Shivansh' 'Anmol' 'Kai' 'Xavier'
- first_name_nonbinary() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.first_name_nonbinary() ... 'Lekha' 'Osha' 'Banjeet' 'Aashi' 'Yasti'
- language_name() str ¶
Generate a random i18n language name (e.g. English).
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.language_name() ... 'Luba-Katanga' 'Malay' 'Aymara' 'Interlingue' 'Quechua'
- last_name() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name() ... 'Rajan' 'Salvi' 'Baria' 'Lad' 'Vaidya'
- last_name_female() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_female() ... 'Rajan' 'Salvi' 'Baria' 'Lad' 'Vaidya'
- last_name_male() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_male() ... 'Rajan' 'Salvi' 'Baria' 'Lad' 'Vaidya'
- last_name_nonbinary() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.last_name_nonbinary() ... 'Rajan' 'Salvi' 'Baria' 'Lad' 'Vaidya'
- name() str ¶
- Example:
‘John Doe’
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name() ... 'Osha Baria' 'Yasti Sunder' 'Chavvi Sood' 'Tejas Thaman' 'Baghyawati Dey'
- name_female() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_female() ... 'Ucchal Baria' 'Yashodhara Sunder' 'Nidra Sood' 'Janani Thaman' 'Megha Dey'
- name_male() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_male() ... 'Shivansh Baria' 'Xavier Ravel' 'William Parmar' 'Zayyan Dewan' 'Ekaraj Chandran'
- name_nonbinary() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.name_nonbinary() ... 'Osha Baria' 'Yasti Sunder' 'Chavvi Sood' 'Tejas Thaman' 'Baghyawati Dey'
- prefix() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix() ... '' '' '' '' ''
- prefix_female() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_female() ... '' '' '' '' ''
- prefix_male() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_male() ... '' '' '' '' ''
- prefix_nonbinary() str ¶
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.prefix_nonbinary() ... '' '' '' '' ''
- 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.en_IN.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'
faker.providers.ssn
¶
- class faker.providers.ssn.en_IN.Provider(generator: Any)¶
Bases:
Provider
Faker provider for Indian Identifiers
- aadhaar_id() str ¶
Aadhaar is a 12 digit person identifier generated for residents of India. Details: https://en.wikipedia.org/wiki/Aadhaar Official Website: https://uidai.gov.in/my-aadhaar/about-your-aadhaar.html
- Examples:
>>> Faker.seed(0) >>> for _ in range(5): ... fake.aadhaar_id() ... '460487647592' '242194892418' '878156593872' '608016097537' '939332871150'