faker.providers.passport

class faker.providers.passport.Provider(generator: Any)

Bases: BaseProvider

Implement default Passport provider for Faker.

passport_dob() date

Generate a datetime date of birth.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.passport_dob()
...
datetime.date(2006, 4, 26)
datetime.date(1996, 4, 14)
datetime.date(1957, 2, 24)
datetime.date(1938, 5, 26)
datetime.date(1967, 9, 3)
passport_number() str

Generate a passport number by replacing tokens to be alphanumeric

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.passport_number()
...
'604876475'
'Q24219489'
'J11578156'
'938778408'
'C60975351'
passport_owner(gender: str = 'X') Tuple[str, str]

Generate a given_name and surname for a passport owner The gender argument is the gender marker of a passport owner, which is a one character string that is either male, female, or non-binary.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.passport_owner()
...
('Megan', 'Chang')
('Robert', 'Green')
('William', 'Sullivan')
('Kristen', 'Turner')
('Thomas', 'Silva')