Locale de_CH

faker.providers.bank

class faker.providers.bank.de_CH.Provider(generator)

Bases: faker.providers.bank.Provider

Implement bank provider for de_CH locale.

bank_country()

Generate the bank provider’s ISO 3166-1 alpha-2 country code.

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

Generate a Basic Bank Account Number (BBAN).

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bban()
...
'66048764759382421'
'94892411578156593'
'87784080160975351'
'39332871158714841'
'85839894719659342'
iban()

Generate an International Bank Account Number (IBAN).

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.iban()
...
'CH8566048764759382421'
'CH1694892411578156593'
'CH2487784080160975351'
'CH3639332871158714841'
'CH3285839894719659342'
swift(length=None, primary=None, use_dataset=False)

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()
...
'TKGNCHO2KRV'
'NHTQCHJ6936'
'SXRMCHDP'
'XZMWCHJ2TAZ'
'VRAMCH5I'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=8)
...
'VTKGCHSO'
'UHMPCH6S'
'HTQGCH69'
'VXISCH6Y'
'MCLPCH68'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=8, use_dataset=True)
...
'VTKGCHSO'
'UHMPCH6S'
'HTQGCH69'
'VXISCH6Y'
'MCLPCH68'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11)
...
'VTKGCHSO2KR'
'PXNHCH1WJ69'
'VXISCH6YQDP'
'PXZMCH5J2TA'
'SKVRCHAR5IL'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, primary=True)
...
'VTKGCHSOXXX'
'UHMPCH6SXXX'
'HTQGCH69XXX'
'VXISCH6YXXX'
'MCLPCH68XXX'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, use_dataset=True)
...
'VTKGCHSO2KR'
'PXNHCH1WJ69'
'VXISCH6YQDP'
'PXZMCH5J2TA'
'SKVRCHAR5IL'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift(length=11, primary=True, use_dataset=True)
...
'VTKGCHSOXXX'
'UHMPCH6SXXX'
'HTQGCH69XXX'
'VXISCH6YXXX'
'MCLPCH68XXX'
swift11(primary=None, use_dataset=False)

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()
...
'VTKGCHSO2KR'
'PXNHCH1WJ69'
'VXISCH6YQDP'
'PXZMCH5J2TA'
'SKVRCHAR5IL'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift11(use_dataset=True)
...
'VTKGCHSO2KR'
'PXNHCH1WJ69'
'VXISCH6YQDP'
'PXZMCH5J2TA'
'SKVRCHAR5IL'
swift8(use_dataset=False)

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()
...
'VTKGCHSO'
'UHMPCH6S'
'HTQGCH69'
'VXISCH6Y'
'MCLPCH68'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.swift8(use_dataset=True)
...
'VTKGCHSO'
'UHMPCH6S'
'HTQGCH69'
'VXISCH6Y'
'MCLPCH68'

faker.providers.person

class faker.providers.person.de_CH.Provider(generator)

Bases: faker.providers.person.Provider

first_name()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name()
...
'Leonor'
'Sanja'
'Erkan'
'Ilir'
'Laura'
first_name_female()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_female()
...
'Katalin'
'Sónia'
'Géraldine'
'Samira'
'Yolande'
first_name_male()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_male()
...
'Ernest'
'Constantin'
'François'
'Helmut'
'Mael'
first_name_nonbinary()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_nonbinary()
...
'Leonor'
'Sanja'
'Erkan'
'Ilir'
'Laura'
language_name()

Generate a random i18n language name (e.g. English).

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.language_name()
...
'Swahili'
'Sardinian'
'Georgian'
'French'
'Ganda'
last_name()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name()
...
'Stucki'
'Schweizer'
'Jäggi'
'Gasser'
'Lehmann'
last_name_female()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_female()
...
'Stucki'
'Schweizer'
'Jäggi'
'Gasser'
'Lehmann'
last_name_male()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_male()
...
'Stucki'
'Schweizer'
'Jäggi'
'Gasser'
'Lehmann'
last_name_nonbinary()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_nonbinary()
...
'Stucki'
'Schweizer'
'Jäggi'
'Gasser'
'Lehmann'
name()

:example ‘John Doe’

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name()
...
'Sónia Jäggi Gasser'
'Florim Sigrist'
'Cornelius Meister'
'Prof. Ilija Schwarz'
'Gaetano Wegmann'
name_female()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_female()
...
'Sónia Jäggi Gasser'
'Florim Sigrist'
'Cornelius Meister'
'Prof. Ilija Schwarz'
'Gaetano Wegmann'
name_male()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_male()
...
'Sónia Jäggi Gasser'
'Florim Sigrist'
'Cornelius Meister'
'Prof. Ilija Schwarz'
'Gaetano Wegmann'
name_nonbinary()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_nonbinary()
...
'Sónia Jäggi Gasser'
'Florim Sigrist'
'Cornelius Meister'
'Prof. Ilija Schwarz'
'Gaetano Wegmann'
prefix()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix()
...
'Prof.'
'Prof.'
'Dr.'
'Dr.'
'Prof.'
prefix_female()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_female()
...
'Prof.'
'Prof.'
'Dr.'
'Dr.'
'Prof.'
prefix_male()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_male()
...
'Prof.'
'Prof.'
'Dr.'
'Dr.'
'Prof.'
prefix_nonbinary()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.prefix_nonbinary()
...
'Prof.'
'Prof.'
'Dr.'
'Dr.'
'Prof.'
suffix()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix()
...
''
''
''
''
''
suffix_female()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_female()
...
''
''
''
''
''
suffix_male()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_male()
...
''
''
''
''
''
suffix_nonbinary()
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.suffix_nonbinary()
...
''
''
''
''
''

faker.providers.ssn

class faker.providers.ssn.de_CH.Provider(generator)

Bases: faker.providers.ssn.fr_CH.Provider

ssn()
Returns a 13 digits Swiss SSN named AHV (German) or
AVS (French and Italian)

See: http://www.bsv.admin.ch/themen/ahv/00011/02185/

Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ssn()
...
'756.6902.4351.88'
'756.5327.1068.40'
'756.4186.5239.04'
'756.5694.7138.25'
'756.0897.5362.19'
vat_id()
Returns:Swiss UID number
Examples:
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.vat_id()
...
'CHE660487649'
'CHE759382428'
'CHE194892412'
'CHE157815650'
'CHE938778409'