Locale en_IN

faker.providers.address

class faker.providers.address.en_IN.Provider(generator: Any)

Bases: Provider

address() str
示例:

‘791 Crist Parks, Sashabury, IL 86039-9874’

示例:

>>> 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
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.administrative_unit()
...
'West Bengal'
'Madhya Pradesh'
'Tripura'
'Maharashtra'
'Arunachal Pradesh'
building_number() str
示例:

‘791’

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.building_number()
...
'60'
'H.No. 87'
'47'
'H.No. 93'
'24/21'
city() str
示例:

‘Sashabury’

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city()
...
'Bidar'
'Rampur'
'Machilipatnam'
'Morena'
'Ballia'
city_name() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_name()
...
'Kharagpur'
'Bidar'
'Thane'
'Rampur'
'Sasaram'
city_suffix() str
示例:

‘town’

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_suffix()
...
'Ville'
'Ville'
'Ville'
'Ville'
'Ville'
country() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.country()
...
'Maldives'
'Palestine'
'Kingdom of the Netherlands'
'Barbados'
'Israel'
country_code(representation: str = 'alpha-2') str
示例:

>>> 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
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.current_country()
...
'India'
'India'
'India'
'India'
'India'
current_country_code() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.current_country_code()
...
'IN'
'IN'
'IN'
'IN'
'IN'
pincode_in_army() int
示例:

>>> 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

示例:

>>> 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

参数:
  • 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

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.pincode_in_state()
...
741445
792094
794880
262468
678268
postcode() str
示例:

86039-9874

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.postcode()
...
'604876'
'759382'
'219489'
'411578'
'565938'
postcode_in_army() int
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.postcode_in_army()
...
999346
905306
967013
953075
962468
postcode_in_military() int
示例:

>>> 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
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.postcode_in_state()
...
741445
792094
794880
262468
678268
state() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.state()
...
'West Bengal'
'Madhya Pradesh'
'Tripura'
'Maharashtra'
'Arunachal Pradesh'
street_address() str
示例:

‘791 Crist Parks’

示例:

>>> 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
示例:

‘Crist Parks’

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_name()
...
'Salvi Marg'
'Lad Nagar'
'Sunder Circle'
'Mitter Marg'
'Parmar Chowk'
street_suffix() str
示例:

‘Avenue’

示例:

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

Returns random union territory name

示例:

>>> 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
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.zipcode_in_army()
...
999346
905306
967013
953075
962468
zipcode_in_military() int
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.zipcode_in_military()
...
999346
905306
967013
953075
962468
zipcode_in_state(state_abbr: str | None = None, include_union_territories: bool = False) int
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.zipcode_in_state()
...
741445
792094
794880
262468
678268

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.

示例:

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

Generate a bank name.

示例:

>>> 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.

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bank_country()
...
'GB'
'GB'
'GB'
'GB'
'GB'
bban() str

Generate a Basic Bank Account Number (BBAN).

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bban()
...
'MYNB4876475938242'
'YDTZ4892411578156'
'KTUG8778408016097'
'KHXK1393328711587'
'DJRJ1858398947196'
iban() str

Generate an International Bank Account Number (IBAN).

示例:

>>> 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.

示例:

>>> 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.

示例:

>>> 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.

示例:

>>> 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
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name()
...
'Lekha'
'Osha'
'Banjeet'
'Aashi'
'Yasti'
first_name_female() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_female()
...
'Sanya'
'Ucchal'
'Anusha'
'Leela'
'Yashodhara'
first_name_male() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_male()
...
'Reyansh'
'Shivansh'
'Anmol'
'Kai'
'Xavier'
first_name_nonbinary() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_nonbinary()
...
'Lekha'
'Osha'
'Banjeet'
'Aashi'
'Yasti'
language_name() str

生成一个随机的 i18n 语言名称(例如 English)。

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.language_name()
...
'Luba-Katanga'
'Malay'
'Aymara'
'Interlingue'
'Quechua'
last_name() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name()
...
'Rajan'
'Salvi'
'Baria'
'Lad'
'Vaidya'
last_name_female() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_female()
...
'Rajan'
'Salvi'
'Baria'
'Lad'
'Vaidya'
last_name_male() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_male()
...
'Rajan'
'Salvi'
'Baria'
'Lad'
'Vaidya'
last_name_nonbinary() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_nonbinary()
...
'Rajan'
'Salvi'
'Baria'
'Lad'
'Vaidya'
name() str
示例:

‘John Doe’

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name()
...
'Osha Baria'
'Yasti Sunder'
'Chavvi Sood'
'Tejas Thaman'
'Baghyawati Dey'
name_female() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_female()
...
'Ucchal Baria'
'Yashodhara Sunder'
'Nidra Sood'
'Janani Thaman'
'Megha Dey'
name_male() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_male()
...
'Shivansh Baria'
'Xavier Ravel'
'William Parmar'
'Zayyan Dewan'
'Ekaraj Chandran'
name_nonbinary() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_nonbinary()
...
'Osha Baria'
'Yasti Sunder'
'Chavvi Sood'
'Tejas Thaman'
'Baghyawati Dey'
prefix() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix()
...
''
''
''
''
''
prefix_female() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_female()
...
''
''
''
''
''
prefix_male() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_male()
...
''
''
''
''
''
prefix_nonbinary() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_nonbinary()
...
''
''
''
''
''
suffix() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix()
...
''
''
''
''
''
suffix_female() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_female()
...
''
''
''
''
''
suffix_male() str
示例:

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

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

faker.providers.phone_number

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

基类: Provider

country_calling_code() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.country_calling_code()
...
'+687'
'+595'
'+880'
'+964'
'+41'
msisdn() str

https://en.wikipedia.org/wiki/MSISDN

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.msisdn()
...
'6048764759382'
'2194892411578'
'5659387784080'
'6097535139332'
'1158714841858'
phone_number() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.phone_number()
...
'06048764759'
'+918242194892'
'01157815659'
'3877840801'
'6097535139'

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

示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.aadhaar_id()
...
'460487647592'
'242194892418'
'878156593872'
'608016097537'
'939332871150'
ssn() str
示例:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ssn()
...
'604-87-6475'
'824-21-9489'
'411-57-8156'
'938-77-8408'
'160-97-5351'