Locale zh_CN

faker.providers.address

class faker.providers.address.zh_CN.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()
...
'甘肃省澳门县崇文黄街s座 319489'
'河北省北镇县东丽陈街C座 108016'
'贵州省兴城市南长武汉路f座 587148'
'贵州省太原县滨城梁路m座 209471'
'辽宁省兰州县梁平南昌路C座 851591'
administrative_unit() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.administrative_unit()
...
'云南省'
'甘肃省'
'天津市'
'湖南省'
'香港特别行政区'
building_number() str
Example:

‘791’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.building_number()
...
'W座'
'c座'
'G座'
'z座'
'E座'
city() str
Example:

‘Sashabury’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city()
...
'婷婷市'
'凤兰县'
'莉县'
'红霞市'
'成市'
city_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_name()
...
'六安'
'宁德'
'长春'
'澳门'
'梧州'
city_suffix() str
Example:

‘town’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.city_suffix()
...
'县'
'县'
'市'
'县'
'县'
country() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.country()
...
'梵蒂冈'
'牙买加'
'瑞士'
'赞比亚'
'科威特'
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()
...
"People's Republic of China"
"People's Republic of China"
"People's Republic of China"
"People's Republic of China"
"People's Republic of China"
current_country_code() str
Examples:

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

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.district()
...
'高明'
'大兴'
'兴山'
'沈北新'
'璧山'
postcode() str
Example:

86039-9874

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.postcode()
...
'760487'
'375938'
'321948'
'211578'
'865938'
province() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.province()
...
'云南省'
'甘肃省'
'天津市'
'湖南省'
'香港特别行政区'
street_address() str
Example:

‘791 Crist Parks’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_address()
...
'王路Y座'
'黄街s座'
'香港街g座'
'马街B座'
'潮州路d座'
street_name() str
Example:

‘Crist Parks’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.street_name()
...
'廖路'
'澳门路'
'柳路'
'黄街'
'太原街'
street_suffix() str
Example:

‘Avenue’

Examples:

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

faker.providers.automotive

class faker.providers.automotive.zh_CN.Provider(generator: Any)

Bases: Provider

Implement automotive provider for zh_CN locale. electric vehicles or downtown-restricted plates are not included

license_plate() str

Generate a license plate.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.license_plate()
...
'甘M-60487'
'闽Z-47593'
'鄂E-42194'
'宁R-92411'
'青V-57815'
vin() str

Generate vin number.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.vin()
...
'RT3GZYSKXXNDZ9J97'
'G0K75MX77NULDXVG4'
'16S1YMFL25CEF0V66'
'LZY7KJ8M0DJV6RLFJ'
'BCB3GX5649036SHFD'

faker.providers.bank

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

Bases: Provider

Implement bank provider for zh_CN locale. Source: https://zh.wikipedia.org/wiki/中国大陆银行列表

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()
...
'招商银行'
'中信银行'
'国家开发银行'
'中国工商银行'
'平安银行'
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 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.zh_CN.Provider(generator: Any)

Bases: Provider

bs() str
Example:

‘integrate extensible convergence’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.bs()
...
'iterate integrated e-markets'
'integrate back-end mindshare'
'synthesize wireless content'
'syndicate synergistic applications'
'productize killer mindshare'
catch_phrase() str
Example:

‘Robust full-range hub’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.catch_phrase()
...
'Networked well-modulated instruction set'
'Balanced empowering migration'
'Pre-emptive impactful toolset'
'Innovative mission-critical help-desk'
'Reduced didactic middleware'
company() str
Example:

‘Acme Ltd’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company()
...
'万迅电脑科技有限公司'
'太极传媒有限公司'
'恩悌传媒有限公司'
'四通网络有限公司'
'凌颖信息网络有限公司'
company_prefix() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company_prefix()
...
'新宇龙信息'
'万迅电脑'
'济南亿次元'
'天开'
'太极'
company_suffix() str
Example:

‘Ltd’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company_suffix()
...
'传媒有限公司'
'传媒有限公司'
'科技有限公司'
'信息有限公司'
'传媒有限公司'

faker.providers.date_time

class faker.providers.date_time.zh_CN.Provider(generator: Any)

Bases: Provider

am_pm() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.am_pm()
...
'PM'
'PM'
'PM'
'PM'
'PM'
century() str
Example:

‘XVII’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.century()
...
'XIII'
'XIV'
'II'
'IX'
'XVII'
date(pattern: str = '%Y-%m-%d', end_datetime: date | datetime | timedelta | str | int | None = None) str

Get a date string between January 1, 1970 and now.

Parameters:

pattern – Format of the date (year-month-day by default)

Example:

‘2008-11-27’

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date()
...
'2016-05-13'
'2011-08-14'
'1993-02-03'
'1984-03-20'
'1998-01-27'
date_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'today') date

Get a Date object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to 30 years ago

  • end_date – Defaults to “today”

Example:

Date(‘1999-02-02’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_between()
...
datetime.date(2020, 3, 28)
datetime.date(2017, 8, 23)
datetime.date(2007, 7, 10)
datetime.date(2002, 9, 3)
datetime.date(2010, 3, 30)
date_between_dates(date_start: date | datetime | timedelta | str | int | None = None, date_end: date | datetime | timedelta | str | int | None = None) date

Takes two Date objects and returns a random date between the two given dates. Accepts Date or datetime objects

Parameters:
  • date_start – Date

  • date_end – Date

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_between_dates()
...
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
datetime.date(2024, 11, 27)
date_object(end_datetime: datetime | None = None) date

Get a date object between January 1, 1970 and now

Example:

datetime.date(2016, 9, 20)

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_object()
...
datetime.date(2016, 5, 13)
datetime.date(2011, 8, 14)
datetime.date(1993, 2, 3)
datetime.date(1984, 3, 20)
datetime.date(1998, 1, 27)
date_of_birth(tzinfo: tzinfo | None = None, minimum_age: int = 0, maximum_age: int = 115) date

Generate a random date of birth represented as a Date object, constrained by optional miminimum_age and maximum_age parameters.

Parameters:
  • tzinfo – Defaults to None.

  • minimum_age – Defaults to 0.

  • maximum_age – Defaults to 115.

Example:

Date(‘1979-02-02’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_of_birth()
...
datetime.date(2006, 11, 10)
datetime.date(1996, 10, 29)
datetime.date(1957, 9, 10)
datetime.date(1938, 12, 10)
datetime.date(1968, 3, 19)
date_this_century(before_today: bool = True, after_today: bool = False) date

Gets a Date object for the current century.

Parameters:
  • before_today – include days in current century before today

  • after_today – include days in current century after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_century()
...
datetime.date(2021, 1, 11)
datetime.date(2018, 11, 17)
datetime.date(2010, 6, 22)
datetime.date(2006, 6, 13)
datetime.date(2012, 9, 25)
date_this_decade(before_today: bool = True, after_today: bool = False) date

Gets a Date object for the decade year.

Parameters:
  • before_today – include days in current decade before today

  • after_today – include days in current decade after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_decade()
...
datetime.date(2024, 2, 22)
datetime.date(2023, 9, 20)
datetime.date(2022, 1, 23)
datetime.date(2021, 4, 8)
datetime.date(2022, 7, 5)
date_this_month(before_today: bool = True, after_today: bool = False) date

Gets a Date object for the current month.

Parameters:
  • before_today – include days in current month before today

  • after_today – include days in current month after today

Example:

dtdate(‘2012-04-04’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_month()
...
datetime.date(2024, 11, 22)
datetime.date(2024, 11, 20)
datetime.date(2024, 11, 11)
datetime.date(2024, 11, 7)
datetime.date(2024, 11, 14)
date_this_year(before_today: bool = True, after_today: bool = False) date

Gets a Date object for the current year.

Parameters:
  • before_today – include days in current year before today

  • after_today – include days in current year after today

Example:

Date(‘2012-04-04’)

Returns:

Date

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_this_year()
...
datetime.date(2024, 10, 6)
datetime.date(2024, 9, 7)
datetime.date(2024, 5, 19)
datetime.date(2024, 3, 26)
datetime.date(2024, 6, 18)
date_time(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None) datetime

Get a datetime object for a date between January 1, 1970 and now

Parameters:

tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2005-08-16 20:39:21’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time()
...
datetime.datetime(2016, 5, 13, 20, 35, 51, 280142)
datetime.datetime(2011, 8, 14, 18, 8, 21, 448254)
datetime.datetime(1993, 2, 3, 13, 15, 1, 121180)
datetime.datetime(1984, 3, 20, 13, 38, 54, 82028)
datetime.datetime(1998, 1, 27, 14, 25, 45, 121501)
date_time_ad(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) datetime

Get a datetime object for a date between January 1, 001 and now

Parameters:

tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1265-03-22 21:15:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_ad()
...
datetime.datetime(1710, 1, 12, 23, 10, 46, 750000)
datetime.datetime(1535, 1, 12, 18, 14, 35, 331619)
datetime.datetime(852, 3, 13, 15, 37, 53, 165176)
datetime.datetime(525, 1, 9, 15, 45, 35, 51880)
datetime.datetime(1035, 10, 10, 22, 51, 26, 113705)
date_time_between(start_date: date | datetime | timedelta | str | int = '-30y', end_date: date | datetime | timedelta | str | int = 'now', tzinfo: tzinfo | None = None) datetime

Get a datetime object based on a random date between two given dates. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to 30 years ago

  • end_date – Defaults to “now”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1999-02-02 11:42:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_between()
...
datetime.datetime(2020, 3, 29, 6, 33, 12, 236214)
datetime.datetime(2017, 8, 24, 19, 57, 58, 808743)
datetime.datetime(2007, 7, 12, 1, 27, 39, 361449)
datetime.datetime(2002, 9, 4, 18, 38, 15, 49189)
datetime.datetime(2010, 3, 31, 21, 55, 11, 171082)
date_time_between_dates(datetime_start: date | datetime | timedelta | str | int | None = None, datetime_end: date | datetime | timedelta | str | int | None = None, tzinfo: tzinfo | None = None) datetime

Takes two datetime objects and returns a random datetime between the two given datetimes. Accepts datetime objects.

Parameters:
  • datetime_start – datetime

  • datetime_end – datetime

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1999-02-02 11:42:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_between_dates()
...
datetime.datetime(2024, 11, 27, 23, 22, 29)
datetime.datetime(2024, 11, 27, 23, 22, 29)
datetime.datetime(2024, 11, 27, 23, 22, 29)
datetime.datetime(2024, 11, 27, 23, 22, 29)
datetime.datetime(2024, 11, 27, 23, 22, 29)
date_time_this_century(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime

Gets a datetime object for the current century.

Parameters:
  • before_now – include days in current century before today

  • after_now – include days in current century after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_century()
...
datetime.datetime(2021, 1, 12, 12, 40, 19, 653522)
datetime.datetime(2018, 11, 17, 20, 23, 9, 91594)
datetime.datetime(2010, 6, 23, 8, 22, 58, 236648)
datetime.datetime(2006, 6, 13, 14, 49, 42, 114284)
datetime.datetime(2012, 9, 25, 13, 32, 17, 777605)
date_time_this_decade(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime

Gets a datetime object for the decade year.

Parameters:
  • before_now – include days in current decade before today

  • after_now – include days in current decade after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_decade()
...
datetime.datetime(2024, 2, 23, 0, 37, 59, 219785)
datetime.datetime(2023, 9, 20, 23, 49, 11, 767016)
datetime.datetime(2022, 1, 24, 1, 46, 23, 852098)
datetime.datetime(2021, 4, 9, 5, 32, 37, 333380)
datetime.datetime(2022, 7, 5, 16, 51, 14, 836365)
date_time_this_month(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime

Gets a datetime object for the current month.

Parameters:
  • before_now – include days in current month before today

  • after_now – include days in current month after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_month()
...
datetime.datetime(2024, 11, 23, 18, 39, 26, 501650)
datetime.datetime(2024, 11, 21, 10, 40, 49, 875818)
datetime.datetime(2024, 11, 12, 8, 16, 2, 677134)
datetime.datetime(2024, 11, 7, 23, 36, 58, 173479)
datetime.datetime(2024, 11, 14, 18, 59, 10, 790611)
date_time_this_year(before_now: bool = True, after_now: bool = False, tzinfo: tzinfo | None = None) datetime

Gets a datetime object for the current year.

Parameters:
  • before_now – include days in current year before today

  • after_now – include days in current year after today

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘2012-04-04 11:02:02’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.date_time_this_year()
...
datetime.datetime(2024, 10, 7, 7, 49, 31, 133038)
datetime.datetime(2024, 9, 8, 14, 54, 24, 302101)
datetime.datetime(2024, 5, 19, 14, 51, 4, 975188)
datetime.datetime(2024, 3, 26, 22, 53, 12, 377199)
datetime.datetime(2024, 6, 18, 17, 31, 2, 248116)
day_of_month() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.day_of_month()
...
'13'
'14'
'03'
'20'
'27'
day_of_week() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.day_of_week()
...
'星期五'
'星期日'
'星期三'
'星期二'
'星期二'
future_date(end_date: date | datetime | timedelta | str | int = '+30d', tzinfo: tzinfo | None = None) date

Get a Date object based on a random date between 1 day from now and a given date. Accepts date strings that can be recognized by strtotime().

Parameters:
  • end_date – Defaults to “+30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

dtdate(‘2030-01-01’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.future_date()
...
datetime.date(2024, 12, 22)
datetime.date(2024, 12, 19)
datetime.date(2024, 12, 10)
datetime.date(2024, 12, 5)
datetime.date(2024, 12, 12)
future_datetime(end_date: date | datetime | timedelta | str | int = '+30d', tzinfo: tzinfo | None = None) datetime

Get a datetime object based on a random date between 1 second form now and a given date. Accepts date strings that can be recognized by strtotime().

Parameters:
  • end_date – Defaults to “+30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1999-02-02 11:42:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.future_datetime()
...
datetime.datetime(2024, 12, 23, 7, 21, 30, 594731)
datetime.datetime(2024, 12, 20, 17, 6, 7, 54467)
datetime.datetime(2024, 12, 10, 14, 11, 11, 116942)
datetime.datetime(2024, 12, 5, 17, 47, 41, 957843)
datetime.datetime(2024, 12, 13, 7, 29, 33, 566513)
iso8601(tzinfo: tzinfo | None = None, end_datetime: date | datetime | timedelta | str | int | None = None, sep: str = 'T', timespec: str = 'auto') str

Get a timestamp in ISO 8601 format (or one of its profiles).

Parameters:
  • tzinfo – timezone, instance of datetime.tzinfo subclass

  • sep – separator between date and time, defaults to ‘T’

  • timespec – format specifier for the time part, defaults to ‘auto’ - see datetime.isoformat() documentation

Example:

‘2003-10-21T16:05:52+0000’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.iso8601()
...
'2016-05-13T20:35:51.280142'
'2011-08-14T18:08:21.448254'
'1993-02-03T13:15:01.121180'
'1984-03-20T13:38:54.082028'
'1998-01-27T14:25:45.121501'
month() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.month()
...
'05'
'08'
'02'
'03'
'01'
month_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.month_name()
...
'五月'
'八月'
'二月'
'三月'
'一月'
past_date(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) date

Get a Date object based on a random date between a given date and 1 day ago. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to “-30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

dtdate(‘1999-02-02’)

Returns:

dtdate

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.past_date()
...
datetime.date(2024, 11, 21)
datetime.date(2024, 11, 18)
datetime.date(2024, 11, 9)
datetime.date(2024, 11, 4)
datetime.date(2024, 11, 11)
past_datetime(start_date: date | datetime | timedelta | str | int = '-30d', tzinfo: tzinfo | None = None) datetime

Get a datetime object based on a random date between a given date and 1 second ago. Accepts date strings that can be recognized by strtotime().

Parameters:
  • start_date – Defaults to “-30d”

  • tzinfo – timezone, instance of datetime.tzinfo subclass

Example:

datetime(‘1999-02-02 11:42:52’)

Returns:

datetime

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.past_datetime()
...
datetime.datetime(2024, 11, 23, 7, 21, 29, 594731)
datetime.datetime(2024, 11, 20, 17, 6, 6, 54467)
datetime.datetime(2024, 11, 10, 14, 11, 10, 116942)
datetime.datetime(2024, 11, 5, 17, 47, 40, 957843)
datetime.datetime(2024, 11, 13, 7, 29, 32, 566513)
pytimezone(*args: Any, **kwargs: Any) tzinfo | None

Generate a random timezone (see faker.timezone for any args) and return as a python object usable as a tzinfo to datetime or other fakers.

Example:

faker.pytimezone()

Returns:

dateutil.tz.tz.tzfile

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.pytimezone()
...
tzfile('/usr/share/zoneinfo/Indian/Maldives')
tzfile('/usr/share/zoneinfo/America/Barbados')
tzfile('/usr/share/zoneinfo/Europe/Stockholm')
tzfile('/usr/share/zoneinfo/Africa/Windhoek')
tzfile('/usr/share/zoneinfo/Asia/Qatar')
time(pattern: str = '%H:%M:%S', end_datetime: date | datetime | timedelta | str | int | None = None) str

Get a time string (24h format by default)

Parameters:

pattern – format

Example:

‘15:02:34’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time()
...
'20:35:51'
'18:08:21'
'13:15:01'
'13:38:54'
'14:25:45'
time_delta(end_datetime: date | datetime | timedelta | str | int | None = None) timedelta

Get a timedelta object

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_delta()
...
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
datetime.timedelta(0)
time_object(end_datetime: date | datetime | timedelta | str | int | None = None) time

Get a time object

Example:

datetime.time(15, 56, 56, 772876)

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_object()
...
datetime.time(20, 35, 51, 280142)
datetime.time(18, 8, 21, 448254)
datetime.time(13, 15, 1, 121180)
datetime.time(13, 38, 54, 82028)
datetime.time(14, 25, 45, 121501)
time_series(start_date: date | datetime | timedelta | str | int = '-30d', end_date: date | datetime | timedelta | str | int = 'now', precision: float | None = None, distrib: Callable[[datetime], float] | None = None, tzinfo: tzinfo | None = None) Iterator[Tuple[datetime, Any]]

Returns a generator yielding tuples of (<datetime>, <value>).

The data points will start at start_date, and be at every time interval specified by precision. distrib is a callable that accepts <datetime> and returns <value>

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.time_series()
...
<generator object Provider.time_series at 0x7f8f5e530190>
<generator object Provider.time_series at 0x7f8f5e530190>
<generator object Provider.time_series at 0x7f8f5e530190>
<generator object Provider.time_series at 0x7f8f5e530190>
<generator object Provider.time_series at 0x7f8f5e530190>
timezone() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.timezone()
...
'Indian/Maldives'
'America/Barbados'
'Europe/Stockholm'
'Africa/Windhoek'
'Asia/Qatar'
unix_time(end_datetime: date | datetime | timedelta | str | int | None = None, start_datetime: date | datetime | timedelta | str | int | None = None) float

Get a timestamp between January 1, 1970 and now, unless passed explicit start_datetime or end_datetime values.

On Windows, the decimal part is always 0.

Example:

1061306726.6

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.unix_time()
...
1463171751.2801423
1313345301.4482539
728745301.1211799
448637934.0820279
885911145.1215013
year() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.year()
...
'2016'
'2011'
'1993'
'1984'
'1998'

faker.providers.internet

class faker.providers.internet.zh_CN.Provider(generator: Any)

Bases: Provider

ascii_company_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ascii_company_email()
...
'cshao@wei.cn'
'tao59@gi.cn'
'yilei@yanyao.com'
'guiying15@xie.cn'
'nlu@huangxiao.cn'
ascii_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ascii_email()
...
'qcheng@hotmail.com'
'eliu@yahoo.com'
'ligao@guiyingxiuying.cn'
'guiying15@xie.cn'
'xiuying38@yahoo.com'
ascii_free_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ascii_free_email()
...
'cshao@yahoo.com'
'yqiu@yahoo.com'
'lmo@gmail.com'
'ligao@gmail.com'
'xia92@yahoo.com'
ascii_safe_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ascii_safe_email()
...
'cshao@example.com'
'yqiu@example.com'
'lmo@example.org'
'ligao@example.org'
'xia92@example.com'
company_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.company_email()
...
'cshao@wei.cn'
'tao59@gi.cn'
'yilei@yanyao.com'
'guiying15@xie.cn'
'nlu@huangxiao.cn'
dga(year: int | None = None, month: int | None = None, day: int | None = None, tld: str | None = None, length: int | None = None) str

Generates a domain name by given date https://en.wikipedia.org/wiki/Domain_generation_algorithm

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.dga()
...
'hxqvaffcmfsccynscisxeajjagjahtnfcm.cn'
'cnrhkwsauxvmqcengcluh.cn'
'iiulfpgbvqcdaeh.net'
'dgunygtn.cn'
'uqniukqjckmjabijnuqholpsjayatffafysbsyaaytuquhbpmpviajxnaro.net'
domain_name(levels: int = 1) str

Produce an Internet domain name with the specified number of subdomain levels.

>>> domain_name()
nichols-phillips.com
>>> domain_name(2)
williamson-hopkins.jackson.com
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.domain_name()
...
'naping.cn'
'taoqiu.com'
'litao.cn'
'gi.cn'
'guiyingxiuying.cn'
domain_word() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.domain_word()
...
'naping'
'48'
'qiu'
'litao'
'xiulan'
email(safe: bool = True, domain: str | None = None) str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.email()
...
'cshao@example.com'
'yqiu@example.com'
'lmo@example.org'
'ligao@example.org'
'xia92@example.com'
free_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.free_email()
...
'cshao@yahoo.com'
'yqiu@yahoo.com'
'lmo@gmail.com'
'ligao@gmail.com'
'xia92@yahoo.com'
free_email_domain() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.free_email_domain()
...
'yahoo.com'
'yahoo.com'
'gmail.com'
'yahoo.com'
'hotmail.com'
hostname(levels: int = 1) str

Produce a hostname with specified number of subdomain levels.

>>> hostname()
db-01.nichols-phillips.com
>>> hostname(0)
laptop-56
>>> hostname(2)
web-12.williamson-hopkins.jackson.com
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.hostname()
...
'web-66.48.cn'
'web-47.xiulan.net'
'srv-82.jie.cn'
'lt-48.yaogong.cn'
'email-15.xie.cn'
http_method() str

Returns random HTTP method https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.http_method()
...
'OPTIONS'
'OPTIONS'
'GET'
'DELETE'
'PATCH'
http_status_code(include_unassigned: bool = True) int

Returns random HTTP status code https://www.rfc-editor.org/rfc/rfc9110#name-status-codes :param include_unassigned: Whether to include status codes which have

not yet been assigned or are unused

Returns:

a random three digit status code

Return type:

int

Example:

404

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.http_status_code()
...
532
297
488
555
315
iana_id() str

Returns IANA Registrar ID https://www.iana.org/assignments/registrar-ids/registrar-ids.xhtml

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.iana_id()
...
'6463344'
'7056021'
'679216'
'4343903'
'8577767'
image_url(width: int | None = None, height: int | None = None, placeholder_url: str | None = None) str

Returns URL to placeholder image Example: http://placehold.it/640x480

Parameters:
  • width – Optional image width

  • height – Optional image height

  • placeholder_url – Optional template string of image URLs from custom placeholder service. String must contain {width} and {height} placeholders, eg: https:/example.com/{width}/{height}.

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.image_url()
...
'https://picsum.photos/788/861'
'https://dummyimage.com/530x995'
'https://dummyimage.com/621x976'
'https://dummyimage.com/447x285'
'https://placekitten.com/286/194'
ipv4(network: bool = False, address_class: str | None = None, private: str | None = None) str

Returns a random IPv4 address or network with a valid CIDR.

Parameters:
  • network – Network address

  • address_class – IPv4 address class (a, b, or c)

  • private – Public or private

Returns:

IPv4

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ipv4()
...
'171.174.170.81'
'95.25.112.121'
'51.105.121.194'
'195.110.164.126'
'141.250.247.54'
ipv4_network_class() str

Returns a IPv4 network class ‘a’, ‘b’ or ‘c’.

Returns:

IPv4 network class

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ipv4_network_class()
...
'b'
'b'
'a'
'b'
'c'
ipv4_private(network: bool = False, address_class: str | None = None) str

Returns a private IPv4.

Parameters:
  • network – Network address

  • address_class – IPv4 address class (a, b, or c)

Returns:

Private IPv4

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ipv4_private()
...
'172.29.117.82'
'10.248.203.131'
'172.25.180.188'
'172.22.253.123'
'192.168.71.140'
ipv4_public(network: bool = False, address_class: str | None = None) str

Returns a public IPv4 excluding private blocks.

Parameters:
  • network – Network address

  • address_class – IPv4 address class (a, b, or c)

Returns:

Public IPv4

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ipv4_public()
...
'166.186.169.69'
'111.198.92.30'
'168.155.75.206'
'141.250.247.54'
'212.120.204.37'
ipv6(network: bool = False) str

Produce a random IPv6 address or network with a valid CIDR

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ipv6()
...
'e3e7:682:c209:4cac:629f:6fbf:d82c:7cd'
'f728:b4fa:4248:5e3a:a5d:2f35:6baa:9455'
'eb11:67b3:67a9:c378:7c65:c1e6:82e2:e662'
'f7c1:bd87:4da5:e709:d471:3d61:c8a7:639'
'e443:df78:9558:867f:5ba9:1fb0:7a02:4204'
mac_address(multicast: bool = False) str

Returns a random MAC address.

Parameters:

multicast – Multicast address

Returns:

MAC Address

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.mac_address()
...
'66:c5:d7:14:84:f8'
'48:9b:f4:b7:6f:47'
'18:47:30:80:4b:9e'
'6e:25:a9:f1:33:b5'
'0e:a1:68:f4:e2:85'
nic_handle(suffix: str = 'FAKE') str

Returns NIC Handle ID https://www.apnic.net/manage-ip/using-whois/guide/person/

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.nic_handle()
...
'ZYT1598-FAKE'
'SIW493-FAKE'
'UE59352-FAKE'
'WBUN892-FAKE'
'CHQD98-FAKE'
nic_handles(count: int = 1, suffix: str = '????') List[str]

Returns NIC Handle ID list

Return type:

list[str]

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.nic_handles()
...
['ZYT1598-EWLN']
['WGNZ53-QITZ']
['UERV52-EJGW']
['CHQ498-DZJA']
['UU1864-TEMK']
port_number(is_system: bool = False, is_user: bool = False, is_dynamic: bool = False) int

Returns a network port number https://tools.ietf.org/html/rfc6335

Parameters:
  • is_system – System or well-known ports

  • is_user – User or registered ports

  • is_dynamic – Dynamic / private / ephemeral ports

Return type:

int

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.port_number()
...
50494
55125
5306
33936
63691
ripe_id() str

Returns RIPE Organization ID https://www.ripe.net/manage-ips-and-asns/db/support/organisation-object-in-the-ripe-database

Return type:

str

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ripe_id()
...
'ORG-ZYT1598-RIPE'
'ORG-SIW493-RIPE'
'ORG-UE59352-RIPE'
'ORG-WBUN892-RIPE'
'ORG-CHQD98-RIPE'
safe_domain_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.safe_domain_name()
...
'example.com'
'example.com'
'example.org'
'example.com'
'example.net'
safe_email() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.safe_email()
...
'cshao@example.com'
'yqiu@example.com'
'lmo@example.org'
'ligao@example.org'
'xia92@example.com'
slug(value: str | None = None) str

Django algorithm

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.slug()
...
'threeimagesonvoice'
'amounteventmuch'
'interviewwhystep'
'floormehelppastwait'
'discovermotherchair'
tld() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.tld()
...
'net'
'cn'
'cn'
'cn'
'cn'
uri(schemes: List[str] | None = None, deep: int | None = None) str
Parameters:
  • schemes – a list of strings to use as schemes, one will chosen randomly. If None, it will generate http and https uris. Passing an empty list will result in schemeless uri generation like “://domain.com/index.html”.

  • deep – an integer specifying how many path components the URI should have..

Returns:

a random url string.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.uri()
...
'https://liu.org/categorylogin.jsp'
'https://www.yanyao.com/main/main/mainprivacy.htm'
'https://www.ping.cn/app/list/searchlogin.html'
'http://16.cn/list/searchprivacy.asp'
'http://ko.cn/wp-content/searchauthor.html'
uri_extension() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.uri_extension()
...
'.php'
'.php'
'.html'
'.htm'
'.asp'
uri_page() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.uri_page()
...
'author'
'category'
'privacy'
'category'
'index'
uri_path(deep: int | None = None) str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.uri_path()
...
'posts/tag'
'explore/tag'
'explore/category'
'blog'
'category'
url(schemes: List[str] | None = None) str
Parameters:

schemes – a list of strings to use as schemes, one will chosen randomly. If None, it will generate http and https urls. Passing an empty list will result in schemeless url generation like “://domain.com”.

Returns:

a random url string.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.url()
...
'https://48.cn/'
'https://xiulan.net/'
'http://www.jie.cn/'
'https://www.guiying.cn/'
'https://guiyingmo.cn/'
user_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.user_name()
...
'cshao'
'wei76'
'tao59'
'weigao'
'jie19'

faker.providers.job

class faker.providers.job.zh_CN.Provider(generator: Any)

Bases: Provider

job() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.job()
...
'列车/地铁车长'
'纸样师/车板工'
'行政主厨/厨师长'
'其他语种翻译'
'物流/仓储'
job_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.job_female()
...
'列车/地铁车长'
'纸样师/车板工'
'行政主厨/厨师长'
'其他语种翻译'
'物流/仓储'
job_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.job_male()
...
'列车/地铁车长'
'纸样师/车板工'
'行政主厨/厨师长'
'其他语种翻译'
'物流/仓储'

faker.providers.lorem

class faker.providers.lorem.zh_CN.Provider(generator: Any)

Bases: Provider

Implement lorem provider for zh_CN locale.

get_words_list(part_of_speech: str | None = None, ext_word_list: Sequence[str] | None = None) List[str]

Get list of words.

ext_word_list is a parameter that allows the user to provide a list of words to be used instead of the built-in word list. If ext_word_list is provided, then the value of part_of_speech is ignored.

part_of_speech is a parameter that defines to what part of speech the returned word belongs. If ext_word_list is not None, then part_of_speech is ignored. If the value of part_of_speech does not correspond to an existent part of speech according to the set locale, then an exception is raised.

Warning

Depending on the length of a locale provider’s built-in word list or on the length of ext_word_list if provided, a large nb can exhaust said lists if unique is True, raising an exception.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.get_words_list(part_of_speech="abc", ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.get_words_list(ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
['abc', 'def', 'ghi', 'jkl']
paragraph(nb_sentences: int = 3, variable_nb_sentences: bool = True, ext_word_list: Sequence[str] | None = None) str

Generate a paragraph.

The nb_sentences argument controls how many sentences the paragraph will contain, and setting variable_nb_sentences to False will generate the exact amount, while setting it to True (default) will generate a random amount (+/-40%, minimum of 1) using randomize_nb_elements().

Under the hood, sentences() is used to generate the sentences, so the argument ext_word_list works in the same way here as it would in that method.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraph(nb_sentences=5)
...
'论坛报告单位帮助一种报告.设备当然帖子图片分析喜欢.一定详细男人说明本站.关系来源对于首页.不会成为其中通过.'
'不同位置内容帮助一点就是语言.一个应该网上手机专业事情游戏标准.能够开始一般作者特别.准备怎么这样国际因为任何历史.只要说明之后不同销售.成为活动上海控制自己标题.'
'进行这是有限发布工作系统规定.对于实现不要位置同时个人行业.那个有关重要全部帮助业务.专业电话之后教育.'
'公司不过各种介绍积分.人民提供本站规定企业认为.说明服务因为世界一种所有作者.产品信息参加中心.'
'不是能够密码信息回复相关发现.市场这样学习内容研究.提供一定价格知道可是语言帮助积分.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraph(nb_sentences=5, variable_nb_sentences=False)
...
'基本全国发现能力电影她的.报告出现完成但是还是.分析喜欢一些当然.有些来自关系来源对于首页提供学习.其中通过感觉不同位置内容帮助一点.'
'系列资源其实合作.作品之间任何.男人内容帮助地址能够开始.以及系统他的显示应用文章这里.发生根据是一只要.'
'发生功能作者加入成为活动上海控制.或者地区方法.这是有限发布工作.来源历史一般虽然.生产中文社区类型然后到了那个.'
'应该其中处理标题出现专业电话.经营谢谢手机可是发表地址业务任何.提供本站规定企业.科技密码说明服务因为世界一种.虽然介绍标题产品.'
'需要当前商品.不是能够密码信息回复相关发现.市场这样学习内容研究.提供一定价格知道可是语言帮助积分.报告问题影响谢谢状态.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraph(nb_sentences=5, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'Abcjkldefjkljkljkl.Ghijklghidefjklghi.Jklghighighiabc.Ghijklghidef.Defdefghiabc.'
'Defghiabcjkljklabcjkl.Abcdefjklabcdefjklabcghi.Jklabcghiabcjkl.Jkldefdefdefabcdefjkl.Jklghighidefghi.Defabcabcjklabcjkl.'
'Abcghiabcabcabcabcghi.Ghijklghighiabcabcghi.Ghidefghijkljkljkl.Defabcghidef.'
'Abcdefghidefabc.Jklabcabcghiabcghi.Ghiabcabcabcjklabcabc.Abcabcjklabc.'
'Abcjkljklabcdefabcdef.Abcdefdefabcdef.Abcjklabcdefghijkljklabc.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraph(nb_sentences=5, variable_nb_sentences=False, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'Jkldefdefghidefjkl.Jkldefjklabcabc.Jklghidefjkl.Jkldefghijklghidefabcdef.Ghiabcghidefghiabcjkljkl.'
'Ghidefjklghi.Ghijkldef.Ghiabcjklabcjklabc.Defabcdefghijklabcghi.Ghijklghijkl.'
'Ghidefabcjkldefabcabcjkl.Ghighidef.Ghiabcabcabc.Jkljklghidef.Defjkljkljklghijklghi.'
'Defghighijkldefdefabc.Ghijklabcghiabcabcjkldef.Abcabcghiabc.Ghijklghiabcabcabcjkl.Defdefjklabc.'
'Abcjklghi.Abcjkljklabcdefabcdef.Abcdefdefabcdef.Abcjklabcdefghijkljklabc.Jklabcghijkldef.'
paragraphs(nb: int = 3, ext_word_list: Sequence[str] | None = None) List[str]

Generate a list of paragraphs.

This method uses paragraph() under the hood to generate paragraphs, and the nb argument controls exactly how many sentences the list will contain. The ext_word_list argument works in exactly the same way as well.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraphs(nb=5)
...
['论坛报告单位帮助一种报告.设备当然帖子图片分析喜欢.一定详细男人说明本站.', '来源对于首页提供.成为其中通过感觉不同位置.', '一点就是语言部门她的简介作品.手机专业事情游戏标准这些.', '以及系统他的显示应用文章这里.发生根据是一只要.', '之后不同销售建设女人国际世界.自己标题发现进行.国内历史出来来源.对于实现不要位置同时个人行业.']
['生产应该其中处理标题出现专业电话.经营谢谢手机可是发表地址业务任何.提供本站规定企业.', '说明服务因为世界一种所有作者.产品信息参加中心.希望因此内容行业.', '东西实现市场市场这样学习.帖子工作提供一定.目前有些广告有些一样.', '责任在线生活无法.销售不同所以首页.', '今年帮助解决朋友地区支持包括.一直教育企业图片活动拥有为了.结果然后完成是否有限.']
['这么之间系统学校规定国家.作为可能今年标准阅读.', '安全直接这个以及发现在线由于.当然说明一个工作专业实现他们.世界准备科技技术因此一定.', '成为免费商品一个控制由于.世界为什价格这样.提供是否资源技术.', '加入发表大家经验人民工程电话.美国没有论坛行业.', '次数密码当然论坛您的处理.数据有些其中介绍是一要求之后.什么不过教育.']
['资料东西论坛生活.国际电子发生的是希望这些这个的人.关系这样实现其他文章的话地方.', '因为发表以上工作任何表示.增加简介音乐正在.使用发展您的内容.', '电子查看有关怎么.', '只有而且一切目前一次.游戏电话控制是否软件不要.所有资源要求论坛次数.方面我的还有社会之间.', '空间发布电影行业国内今天帮助最新.准备科技今年一般应用中国各种.']
['产品发布大家她的出来设备.使用发展网上工作网站论坛公司.人员国家发布地区当前帖子质量.', '认为这是觉得.一切这么一起要求投资组织其实地方.为什设计很多信息浏览一直.', '一样任何应该目前其实得到这种.内容其中北京功能一种已经.', '安全应该决定商品影响自己一定.', '作品建设这个.继续没有组织有限专业处理解决.这种一次怎么以后作品.']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.paragraphs(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['Abcjkldefjkljkljkl.Ghijklghidefjklghi.Jklghighighiabc.', 'Jklghidefabc.Defghiabcghidefghi.', 'Jklabcjklghijklghighi.Abcdefjklabcghiabc.', 'Defabcdefghijklabcghi.Ghijklghijkl.', 'Ghidefghidefghidefabc.Abcjkldefabc.Jkljkljkljkl.Ghijklghighiabcabcghi.']
['Defdefghighijkldefdefabc.Ghijklabcghiabcabcjkldef.Abcabcghiabc.', 'Ghiabcabcabcjklabcabc.Abcabcjklabc.Defghiabcghi.', 'Ghijklabcabcdefdef.Ghiabcabcjkl.Defjkldefjklghi.', 'Jklabcabcghi.Ghidefabcdef.', 'Jkljklghidefghiabcghi.Ghidefabcdefabcjkldef.Ghighijkljklabc.']
['Ghijklabcghighiabc.Ghidefjklghidef.', 'Defghiabcdefdefabcghi.Jklghiabcabcdefjklabc.Abcjklghiabcghijkl.', 'Defabcghiabcjklghi.Abcghiabcdef.Abcjkldefabc.', 'Jklabcdefghijklghiabc.Defabcabcghi.', 'Jkljkljklabcghighi.Ghijklghidefghiabcghi.Abcdefdef.']
['Defghiabcabc.Defdefghidefdefabcabcabc.Ghidefjkldefabcghidef.', 'Abcabcdefabcdefghi.Jklghidefjkl.Abcabcghiabc.', 'Defghidefdef.', 'Defdefjkldefjkl.Abcabcjkljklabcghi.Abcdefabcabcjkl.Ghiabcdefdefjkl.', 'Jklabcdefghijkldefjkldef.Jklghijklghijklabcghi.']
['Abcabcdefjkljklghi.Abcabcjklabcabcabcabc.Defabcabcghijklghijkl.', 'Ghighijkl.Jklghijklabcghighijkldef.Ghiabcjklabcjklghi.', 'Ghidefdefdefjkljkldef.Abcghiabcdefjklabc.', 'Defdefjklghighiabcjkl.', 'Ghidefabc.Jklabcghiabcdefghighi.Defjkldefjklghi.']
sentence(nb_words: int = 6, variable_nb_words: bool = True, ext_word_list: Sequence[str] | None = None) str

Generate a sentence.

The nb_words argument controls how many words the sentence will contain, and setting variable_nb_words to False will generate the exact amount, while setting it to True (default) will generate a random amount (+/-40%, minimum of 1) using randomize_nb_elements().

Under the hood, words() is used to generate the words, so the argument ext_word_list works in the same way here as it would in that method.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentence(nb_words=10)
...
'基本全国发现能力电影她的这样方法设备当然.'
'还是还是就是加入一定详细男人说明本站提供服务品牌.'
'首页提供学习作品汽车报告希望很多目前觉得.'
'一点就是语言部门她的简介作品之间任何关系男人内容帮助.'
'这些报告能够以及系统他的显示应用.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentence(nb_words=10, variable_nb_words=False)
...
'谢谢基本全国发现能力电影她的这样方法设备.'
'当然帖子图片分析喜欢一些当然空间中文有些.'
'来自关系来源对于首页提供学习作品汽车报告.'
'希望很多目前觉得发生可以系列资源其实合作.'
'一个应该网上手机专业事情游戏标准这些报告.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentence(nb_words=10, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'Jkldefdefghidefjkldefdefghijkl.'
'Abcabcabcjkljklghighighiabcabcabcjkl.'
'Defabcdefghijkljkldefjkldefjkl.'
'Jklabcjklghijklghighijkldefghighiabcjkl.'
'Abcjkljkldefabcdefghijkl.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentence(nb_words=10, variable_nb_words=True, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'Jkldefdefghidefjkldefdefghijkl.'
'Abcabcabcjkljklghighighiabcabcabcjkl.'
'Defabcdefghijkljkldefjkldefjkl.'
'Jklabcjklghijklghighijkldefghighiabcjkl.'
'Abcjkljkldefabcdefghijkl.'
sentences(nb: int = 3, ext_word_list: Sequence[str] | None = None) List[str]

Generate a list of sentences.

This method uses sentence() under the hood to generate sentences, and the nb argument controls exactly how many sentences the list will contain. The ext_word_list argument works in exactly the same way as well.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentences()
...
['基本全国发现能力电影她的.', '报告出现完成但是还是.', '分析喜欢一些当然.']
['有些来自关系来源对于首页提供学习.', '其中通过感觉不同位置内容帮助一点.', '系列资源其实合作.']
['作品之间任何.', '男人内容帮助地址能够开始.', '以及系统他的显示应用文章这里.']
['发生根据是一只要.', '发生功能作者加入成为活动上海控制.', '或者地区方法.']
['这是有限发布工作.', '来源历史一般虽然.', '生产中文社区类型然后到了那个.']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentences(nb=5)
...
['基本全国发现能力电影她的.', '报告出现完成但是还是.', '分析喜欢一些当然.', '有些来自关系来源对于首页提供学习.', '其中通过感觉不同位置内容帮助一点.']
['系列资源其实合作.', '作品之间任何.', '男人内容帮助地址能够开始.', '以及系统他的显示应用文章这里.', '发生根据是一只要.']
['发生功能作者加入成为活动上海控制.', '或者地区方法.', '这是有限发布工作.', '来源历史一般虽然.', '生产中文社区类型然后到了那个.']
['应该其中处理标题出现专业电话.', '经营谢谢手机可是发表地址业务任何.', '提供本站规定企业.', '科技密码说明服务因为世界一种.', '虽然介绍标题产品.']
['需要当前商品.', '不是能够密码信息回复相关发现.', '市场这样学习内容研究.', '提供一定价格知道可是语言帮助积分.', '报告问题影响谢谢状态.']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.sentences(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['Jkldefdefghidefjkl.', 'Jkldefjklabcabc.', 'Jklghidefjkl.', 'Jkldefghijklghidefabcdef.', 'Ghiabcghidefghiabcjkljkl.']
['Ghidefjklghi.', 'Ghijkldef.', 'Ghiabcjklabcjklabc.', 'Defabcdefghijklabcghi.', 'Ghijklghijkl.']
['Ghidefabcjkldefabcabcjkl.', 'Ghighidef.', 'Ghiabcabcabc.', 'Jkljklghidef.', 'Defjkljkljklghijklghi.']
['Defghighijkldefdefabc.', 'Ghijklabcghiabcabcjkldef.', 'Abcabcghiabc.', 'Ghijklghiabcabcabcjkl.', 'Defdefjklabc.']
['Abcjklghi.', 'Abcjkljklabcdefabcdef.', 'Abcdefdefabcdef.', 'Abcjklabcdefghijkljklabc.', 'Jklabcghijkldef.']
text(max_nb_chars: int = 200, ext_word_list: Sequence[str] | None = None) str

Generate a text string.

The max_nb_chars argument controls the approximate number of characters the text string will have, and depending on its value, this method may use either words(), sentences(), or paragraphs() for text generation. The ext_word_list argument works in exactly the same way it would in any of those methods.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.text(max_nb_chars=20)
...
'一样方面问题这种分析商品组织有关各种.'
'决定最新这么要求安全要求还是一点介绍.'
'完成但是还有本站文章怎么规定之间发布.'
'运行研究有些次数这样人民各种经验日本.'
'作者中文信息什么然后一切以下一个一起.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.text(max_nb_chars=80)
...
'基本全国发现能力电影她的.报告出现完成但是还是.分析喜欢一些当然.有些来自关系来源对于首页提供学习.其中通过感觉不同位置内容帮助一点.系列资源其实合作.'
'男人内容帮助地址能够开始.以及系统他的显示应用文章这里.发生根据是一只要.发生功能作者加入成为活动上海控制.或者地区方法.这是有限发布工作.来源历史一般虽然.'
'应该其中处理标题出现专业电话.经营谢谢手机可是发表地址业务任何.提供本站规定企业.科技密码说明服务因为世界一种.虽然介绍标题产品.需要当前商品.'
'市场这样学习内容研究.提供一定价格知道可是语言帮助积分.报告问题影响谢谢状态.发表增加登录可以行业.今年帮助解决朋友地区支持包括.'
'结果然后完成是否有限.朋友阅读操作一个游戏.国家网站有关部门影响今年.精华处理安全.联系使用处理.由于单位的话分析制作今天来自.他们控制正在阅读发生只要注意.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.text(max_nb_chars=160)
...
'论坛报告单位帮助一种报告.设备当然帖子图片分析喜欢.一定详细男人说明本站.\n来源对于首页提供.成为其中通过感觉不同位置.\n一点就是语言部门她的简介作品.手机专业事情游戏标准这些.\n以及系统他的显示应用文章这里.发生根据是一只要.'
'生产应该其中处理标题出现专业电话.经营谢谢手机可是发表地址业务任何.提供本站规定企业.\n说明服务因为世界一种所有作者.产品信息参加中心.希望因此内容行业.\n东西实现市场市场这样学习.帖子工作提供一定.目前有些广告有些一样.\n责任在线生活无法.销售不同所以首页.'
'这么之间系统学校规定国家.作为可能今年标准阅读.\n安全直接这个以及发现在线由于.当然说明一个工作专业实现他们.世界准备科技技术因此一定.\n成为免费商品一个控制由于.世界为什价格这样.提供是否资源技术.\n加入发表大家经验人民工程电话.美国没有论坛行业.'
'资料东西论坛生活.国际电子发生的是希望这些这个的人.关系这样实现其他文章的话地方.\n因为发表以上工作任何表示.增加简介音乐正在.使用发展您的内容.\n电子查看有关怎么.\n只有而且一切目前一次.游戏电话控制是否软件不要.所有资源要求论坛次数.方面我的还有社会之间.'
'产品发布大家她的出来设备.使用发展网上工作网站论坛公司.人员国家发布地区当前帖子质量.\n认为这是觉得.一切这么一起要求投资组织其实地方.为什设计很多信息浏览一直.\n一样任何应该目前其实得到这种.内容其中北京功能一种已经.\n安全应该决定商品影响自己一定.'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.text(ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'Abcjkldefjkljkljkl.Ghijklghidefjklghi.Jklghighighiabc.\nJklghidefabc.Defghiabcghidefghi.\nJklabcjklghijklghighi.Abcdefjklabcghiabc.\nDefabcdefghijklabcghi.Ghijklghijkl.'
'Defdefghighijkldefdefabc.Ghijklabcghiabcabcjkldef.Abcabcghiabc.\nGhiabcabcabcjklabcabc.Abcabcjklabc.Defghiabcghi.\nGhijklabcabcdefdef.Ghiabcabcjkl.Defjkldefjklghi.\nJklabcabcghi.Ghidefabcdef.'
'Ghijklabcghighiabc.Ghidefjklghidef.\nDefghiabcdefdefabcghi.Jklghiabcabcdefjklabc.Abcjklghiabcghijkl.\nDefabcghiabcjklghi.Abcghiabcdef.Abcjkldefabc.\nJklabcdefghijklghiabc.Defabcabcghi.'
'Defghiabcabc.Defdefghidefdefabcabcabc.Ghidefjkldefabcghidef.\nAbcabcdefabcdefghi.Jklghidefjkl.Abcabcghiabc.\nDefghidefdef.\nDefdefjkldefjkl.Abcabcjkljklabcghi.Abcdefabcabcjkl.Ghiabcdefdefjkl.'
'Abcabcdefjkljklghi.Abcabcjklabcabcabcabc.Defabcabcghijklghijkl.\nGhighijkl.Jklghijklabcghighijkldef.Ghiabcjklabcjklghi.\nGhidefdefdefjkljkldef.Abcghiabcdefjklabc.\nDefdefjklghighiabcjkl.'
texts(nb_texts: int = 3, max_nb_chars: int = 200, ext_word_list: Sequence[str] | None = None) List[str]

Generate a list of text strings.

The nb_texts argument controls how many text strings the list will contain, and this method uses text() under the hood for text generation, so the two remaining arguments, max_nb_chars and ext_word_list will work in exactly the same way as well.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.texts(nb_texts=5)
...
['论坛报告单位帮助一种报告.设备当然帖子图片分析喜欢.一定详细男人说明本站.\n来源对于首页提供.成为其中通过感觉不同位置.\n一点就是语言部门她的简介作品.手机专业事情游戏标准这些.\n以及系统他的显示应用文章这里.发生根据是一只要.\n之后不同销售建设女人国际世界.自己标题发现进行.国内历史出来来源.对于实现不要位置同时个人行业.', '说明服务因为世界一种所有作者.产品信息参加中心.希望因此内容行业.\n东西实现市场市场这样学习.帖子工作提供一定.目前有些广告有些一样.\n责任在线生活无法.销售不同所以首页.\n今年帮助解决朋友地区支持包括.一直教育企业图片活动拥有为了.结果然后完成是否有限.\n这么之间系统学校规定国家.作为可能今年标准阅读.\n安全直接这个以及发现在线由于.当然说明一个工作专业实现他们.世界准备科技技术因此一定.', '加入发表大家经验人民工程电话.美国没有论坛行业.\n次数密码当然论坛您的处理.数据有些其中介绍是一要求之后.什么不过教育.\n资料东西论坛生活.国际电子发生的是希望这些这个的人.关系这样实现其他文章的话地方.\n因为发表以上工作任何表示.增加简介音乐正在.使用发展您的内容.\n电子查看有关怎么.\n只有而且一切目前一次.游戏电话控制是否软件不要.所有资源要求论坛次数.方面我的还有社会之间.', '产品发布大家她的出来设备.使用发展网上工作网站论坛公司.人员国家发布地区当前帖子质量.\n认为这是觉得.一切这么一起要求投资组织其实地方.为什设计很多信息浏览一直.\n一样任何应该目前其实得到这种.内容其中北京功能一种已经.\n安全应该决定商品影响自己一定.\n作品建设这个.继续没有组织有限专业处理解决.这种一次怎么以后作品.', '孩子有些工作大家.如此登录一样.最后一次浏览必须更新.全国会员电话回复起来历史那些.\n提供得到比较注册.学生安全今天决定专业主要为了.知道注册点击中国.\n市场类型要求通过影响密码.这么的是程序应用.\n中心方式都是原因.软件不是任何参加.\n作为上海特别相关那个在线来源.觉得成为手机分析.\n全国这个有限信息如果服务.其他安全以下然后其他不会.\n经营作为无法等级时间参加.项目介绍拥有作者中心文章.']
['只是但是电话注意这样为什只有您的.这是基本设计最大.经营信息不过合作一个.\n完成部门不同这么不会事情结果.销售产品业务会员资料.完全完成最大进行完全图片公司.\n不是我的孩子进入一直有些美国不同.必须在线规定可能然后还是合作.经营一直但是怎么更新应该.\n其他法律管理东西下载首页.谢谢注意表示.\n时间论坛东西准备今年处理.还是认为游戏学习具有.', '自己科技事情社会法律这是.\n选择发展网上城市日本制作新闻管理.登录解决发生比较大学开发大家.\n教育论坛管理为了国际.还是责任行业.资源增加那么资料相关制作业务最新.\n大家位置世界系统事情都是.一些关系这样记者建设.都是数据企业那些服务只是大小.\n注意只是发表技术提供类别.\n项目如果回复分析之间.原因一些地址.那些他的学习更多经济.', '时候工程发表.知道影响男人重要地址一种活动.环境一下音乐地方设备什么公司.\n名称科技中文国内支持不能.公司要求一点今天.同时有限设计建设为什.\n以上帮助喜欢软件销售怎么环境原因.操作重要今天拥有地方日期社区.\n提高男人控制她的.如此不是成为这么一些决定.\n都是生活公司认为问题.自己信息必须下载企业情况经验进行.\n客户只有完成个人学习出现.解决因此她的如何.\n完成详细觉得标题男人基本.', '相关必须部门或者工作资料文化等级.应用产品作者的是自己同时出现比较.教育能够如此公司无法功能.\n得到一样目前.开发系列精华.他们评论全部主要行业男人不断.\n记者建设威望一些发表标题觉得.搜索系列行业不会帮助.\n谢谢政府搜索他们在线都是.简介最新成功组织一定.\n标准项目状态中国.\n这么中心发生只有到了.无法内容其中那个.经营进入建设学习来自可以继续.\n是一感觉一切世界成功.谢谢您的支持重要.', '认为同时数据决定.原因生活历史不断.计划主要制作得到为什作者.\n中国一些最大建设一次简介朋友.\n非常一种因为部门一下下载首页位置.\n起来点击我们游戏.\n首页日期出来孩子下载虽然因为.电影开始发布很多能力.\n完成汽车各种具有.关系查看控制.\n到了都是搜索技术你们根据.加入一下部门成功查看.准备支持质量感觉工作搜索其中.来源成为次数.\n作品根据位置部门汽车公司日本.进入政府状态根据.']
['游戏阅读内容来自朋友管理两个数据.帮助以下如何项目提高东西.结果的话觉得新闻注册.\n到了使用网络软件信息.喜欢经验可以开发感觉事情.\n系统他们决定深圳完全目前解决.实现系统知道提供.支持记者觉得.\n等级在线发生.\n所以增加其中活动.一下下载原因简介资源情况科技一下.\n情况国内非常国内什么起来.生活设备表示.\n没有其实能力工作.认为发布自己责任.\n学习一点任何推荐什么能力.', '工作最新加入只要我的.开始虽然两个.\n历史数据提高国家资料新闻.帮助很多最大方式而且开始出现首页.城市需要原因不能设备选择科技.\n学生对于不过因此点击有限或者.注册女人非常运行.\n进入感觉积分要求情况不要.出现制作比较具有任何发表只要.\n质量状态更新人员留言.空间法律会员以后特别都是.能力只要全部根据对于支持我们.', '如何重要关于对于文件之后增加.浏览起来帮助不断.\n电影设计今年工作东西你的显示这里.首页的人一般国家品牌一种.\n进行进行电子拥有更多文件最后.选择知道就是地区.\n搜索价格自己精华.怎么程序应用你们今年状态网络我们.\n语言来自网站今天次数能力资料.会员只有文化只要.\n功能价格一次重要成功.这种北京继续看到更新.\n地区音乐一点学生知道.两个具有图片我的有些所有.都是手机中心孩子.', '用户一下电话欢迎社会.拥有时间详细北京控制.\n技术研究社区查看方面.进行不能同时不断这种部分.不是正在论坛孩子软件点击.之间这是其中销售作者次数.\n下载开始得到什么要求.用户显示所有我的汽车因为.\n不能发生北京大家系统帖子政府.开发为了一次如何以及.感觉原因一次.\n活动希望还是项目知道单位.当前位置现在其他.\n结果次数支持产品事情觉得类别广告.新闻游戏虽然责任能够.过程对于位置大小上海历史.', '虽然一切成为特别进行地址.城市孩子电子非常.不是而且这个电影现在新闻一样.\n不是我们全部什么运行怎么可能.使用提高关系城市通过喜欢知道.法律两个这些报告.\n决定电脑支持发现学校美国语言但是.\n以下情况然后那些企业成为搜索.内容特别希望他的关系下载学习.最大浏览所有大学.\n评论这种状态音乐能够世界其实一般.\n感觉国家今天信息决定人员都是.或者安全深圳进行.我的服务准备北京自己语言网站.']
['之间空间生产直接日本技术政府.事情成功最新发展可以.\n数据注意电脑都是.现在更新一种时候学校非常专业.\n必须影响功能信息时间.如果正在日期注意经验.\n她的一些过程.还是销售她的安全设备主要日期.\n过程部门只有积分他们各种希望.这些环境其实.参加公司城市不要.\n推荐图片精华广告密码问题部门.出现一些地址这样本站这里一些.\n设计政府安全制作.\n基本北京威望行业法律.一定其他网上欢迎一直系列深圳.', '有关生产新闻都是资源因此.搜索一直工具最大.\n部分包括一些部门来源重要组织.\n可以发布登录名称只要.运行主要信息部分那些是否为什.首页项目方法选择部分汽车.\n可能那个留言更新影响分析出来世界.文件联系还是销售分析.继续显示其实方法状态学生开发.\n深圳需要大家.没有销售工具注意.其实个人类型.\n一起重要为什你的.信息帮助联系.参加同时控制文化工具.设备成功处理两个.', '帖子之后计划完全一起管理来源注册.更新全国人员一点.世界内容客户成为标题这么单位地方.不过工程还有分析来源电脑.\n为什全国国家历史两个表示.搜索方式中心只要.表示提供类别目前她的.\n其实能够时间为什客户拥有过程.建设注意浏览日期政府发展.运行您的网站不是一点有些.\n成功有限关系选择电影注意威望发生.\n本站计划因为要求孩子一种女人.你的免费对于很多决定.得到市场中国经济得到威望显示.', '这种精华地方回复服务但是.之间能力发布市场支持这种.发表进行你的这样密码网上希望.\n法律一起研究都是一次工作.成功名称业务时间认为方法.学习东西进入查看方式工作.工作名称资料单位分析制作.\n中文日本经验.法律浏览对于社区她的国家企业.不要准备联系建设功能以后也是.\n准备组织正在主题项目那个注意.\n开始大学这些可能活动大家活动之后.如此这些教育科技最新开始.这里投资部门电话增加.', '程序全国日期影响那些.管理一点完成任何国家你的.关于发生阅读一点音乐次数作者.\n作者一切是否设备人员可是销售网络.同时论坛网络应用来自人民事情.\n如此历史无法很多价格选择当然.拥有什么国内发现责任本站喜欢通过.\n正在的人事情公司是一希望.分析一直技术系列.\n深圳比较我们开始要求.影响安全本站是一帖子到了合作.成为以后设计解决可是影响世界.怎么不会之后图片经济虽然.']
['电脑都是决定比较这种因为.标准经验会员不同最大一切不是.虽然现在投资时候影响.\n用户活动组织.市场之间免费价格应该游戏.\n有限需要女人其中学生电子其中.结果首页经营责任为了.\n正在项目查看.其实开始那么作者生产.\n一下系列直接具有国内现在.之间介绍东西现在.\n增加活动没有图片记者科技.发表最新对于如果.\n全部位置只有因此可能.开始如果必须.\n世界说明为了搜索国内大学一直.计划还是一点投资.', '研究发现搜索男人.生活简介这是设备因此查看.解决必须可以开始组织两个开始.社区中文然后不能.\n网络方面女人发现全国.部门还是注意.\n任何作为虽然信息选择活动.学校开始事情免费.\n类别全国查看.部门具有经验一定.其他以及科技同时工程.\n而且有关建设运行.经营日本能力.\n作品标准查看国家时间文章建设.价格以后文件精华为什.到了主题公司资料部门.\n学习最新系列.人员继续北京其中一些.', '积分美国因为合作教育当前一个资料.那么价格音乐合作只是进入.\n公司我们人员要求进入更新.过程相关喜欢一直推荐.对于不同联系发现.\n男人一样的话公司时候来自.两个不是大小最后工程帖子实现中心.\n全国次数设计都是日期必须类别研究.\n评论生活以后质量最新下载.方面计划功能推荐标题还有查看.\n人民拥有说明这里自己.完成业务国内而且价格通过.\n重要商品包括计划.或者要求大学进入商品状态.价格选择类别.', '这样发生会员人民搜索得到都是只有.来自行业一切最后下载资料.控制以上进行提供.自己解决不能经验一定帮助关于学生.\n项目原因工作希望类型我的.首页可是可是会员.\n搜索你的基本.问题操作之间地址.科技发生要求国内只有论坛以下.\n的是问题自己.支持学校积分.搜索没有一直公司.\n部门为什重要用户.那些学生电话商品.', '品牌报告比较如此帖子信息.开始一直包括.中心之间比较登录.报告人民事情主题地区.\n空间就是业务本站一些.科技喜欢程序不会看到.原因一次一切更多.\n设计自己分析投资继续国家.\n法律你的系统.解决时间这是情况一切应用.\n而且到了不要电话以上.作品服务经济留言论坛我们加入.\n主题精华设备政府一点注册.城市完成开发发生有关东西任何.']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.texts(nb_texts=5, max_nb_chars=50)
...
['基本全国发现能力电影她的.报告出现完成但是还是.分析喜欢一些当然.', '其中通过感觉不同位置内容帮助一点.系列资源其实合作.作品之间任何.男人内容帮助地址能够开始.', '发生根据是一只要.发生功能作者加入成为活动上海控制.或者地区方法.这是有限发布工作.', '生产中文社区类型然后到了那个.应该其中处理标题出现专业电话.经营谢谢手机可是发表地址业务任何.', '科技密码说明服务因为世界一种.虽然介绍标题产品.需要当前商品.不是能够密码信息回复相关发现.']
['提供一定价格知道可是语言帮助积分.报告问题影响谢谢状态.发表增加登录可以行业.', '一直教育企业图片活动拥有为了.结果然后完成是否有限.朋友阅读操作一个游戏.', '精华处理安全.联系使用处理.由于单位的话分析制作今天来自.他们控制正在阅读发生只要注意.', '可以分析标题影响作品.所有解决今年美国注意.方法历史必须信息.加入发表大家经验人民工程电话.', '日期名称标准社区谢谢参加为什.数据有些其中介绍是一要求之后.什么不过教育.']
['知道一切北京电话关系.环境工具关系.精华一下阅读提供当然.教育加入根据因为发表以上工作.', '使用发展您的内容.网络更多国际.责任具有但是技术地址准备搜索.学生知道使用决定.有些那么这是.', '方面我的还有社会之间.一切空间发布电影.国内今天帮助最新以上以上.一般应用中国各种这么.', '的是各种广告加入记者一点使用有限.公司谢谢人员国家发布.当前帖子质量更新认为这是觉得.', '为什设计很多信息浏览一直.显示大家使用完全如此.得到这种这种生活那些.功能一种已经产品安全.']
['建设这个广告自己自己喜欢必须.处理解决需要她的.方式问题处理或者那些操作当前.', '查看她的世界成功.介绍世界出现经营孩子有些.单位质量如此.一样个人就是政府过程继续规定.', '阅读提供得到比较.深圳学生安全.增加参加系列系统市场知道注册.不能一种最后名称销售开始.', '这么的是程序应用.完全中心方式都是原因.软件不是任何参加.密码原因作为上海特别.详细环境等级本站.', '介绍直接完全说明电子.有限其他安全以下.只有作为发展不同而且到了问题如何.']
['欢迎生产你们程序.不断中心全国所以原因资料不要.非常作为也是通过一个规定.', '这是基本设计最大.经营信息不过合作一个.由于设备资源相关主要经济.销售产品业务会员资料.', '简介无法新闻科技精华继续责任.不同标准什么时候所有.然后还是合作不会首页阅读.', '个人不会虽然特别谢谢注意表示技术.时间论坛东西准备今年处理.还是认为游戏学习具有.', '成为不是中心点击空间回复应该.欢迎关于通过部门一起.设计发展中心.法律这是设计选择.']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.texts(nb_texts=5, max_nb_chars=50, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['Jkldefdefghidefjkl.Jkldefjklabcabc.Jklghidefjkl.', 'Ghiabcghidefghiabcjkljkl.Ghidefjklghi.Ghijkldef.', 'Defabcdefghijklabcghi.Ghijklghijkl.', 'Ghighidef.Ghiabcabcabc.Jkljklghidef.', 'Defghighijkldefdefabc.Ghijklabcghiabcabcjkldef.']
['Ghijklghiabcabcabcjkl.Defdefjklabc.Abcjklghi.', 'Abcdefdefabcdef.Abcjklabcdefghijkljklabc.', 'Abcjklghiabcghi.Jkljklghidefghiabcghi.', 'Ghighijkljklabc.Defdefghiabcabc.', 'Defghidef.Abcabcghi.Ghidefghijkljkldefdef.']
['Jkldefghidef.Abcjkljklghighi.Abcghijkldefjkl.', 'Jklabcdefghijklghiabc.Defabcabcghi.', 'Ghijklghidefghiabcghi.Abcdefdef.', 'Defjklabcabcghi.Defjklghi.Defdefdefabcjkl.', 'Ghijkljklghidefjkl.Abcabcghiabc.Abcghidef.']
['Defdefabcjkl.Jkldefghi.Defdefghijkl.', 'Jkljklabcdef.Jkldefjkldefdefdef.Ghijklabcghighi.', 'Defghidefjklghijklabcabc.Abcjkldefabcabc.', 'Jklghijklabcghighijkldef.Ghiabcjklabcjklghi.', 'Jkldefdefabcjkl.Defjklabcabcdef.']
['Defabcdefabcabcghighi.Ghighiabcjkl.', 'Defjkljkldefdefghijkljkl.Ghijklabcjkl.', 'Defjkljkl.Ghiabcabcjkljkljklghi.', 'Defabcjklghi.Jkldefdef.Jkljklghiabcabcdefabc.', 'Abcghijkl.Ghidefghijkl.Jklabcabcdefjkl.']
word(part_of_speech: str | None = None, ext_word_list: Sequence[str] | None = None) str

Generate a word.

This method uses words() under the hood with the nb argument set to 1 to generate the result.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.word()
...
'一样'
'方面'
'问题'
'这种'
'分析'
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.word(ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
'jkl'
'jkl'
'abc'
'ghi'
'jkl'
words(nb: int = 3, ext_word_list: List[str] | None = None, part_of_speech: str | None = None, unique: bool = False) List[str]

Generate a tuple of words.

The nb argument controls the number of words in the resulting list, and if ext_word_list is provided, words from that list will be used instead of those from the locale provider’s built-in word list.

if word_list is not provided, the method will use a default value of None, which will result in the method calling the get_words_list method to get the word list. If word_list is provided, the method will use the provided list.

If unique is True, this method will return a list containing unique words. Under the hood, random_sample() will be used for sampling without replacement. If unique is False, random_choices() is used instead, and the list returned may contain duplicates.

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.words()
...
['谢谢', '基本', '全国']
['发现', '能力', '电影']
['她的', '这样', '方法']
['设备', '当然', '帖子']
['图片', '分析', '喜欢']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.words(nb=5)
...
['谢谢', '基本', '全国', '发现', '能力']
['电影', '她的', '这样', '方法', '设备']
['当然', '帖子', '图片', '分析', '喜欢']
['一些', '当然', '空间', '中文', '有些']
['来自', '关系', '来源', '对于', '首页']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.words(nb=5, ext_word_list=['abc', 'def', 'ghi', 'jkl'])
...
['jkl', 'jkl', 'def', 'def', 'ghi']
['def', 'jkl', 'def', 'def', 'ghi']
['jkl', 'ghi', 'def', 'jkl', 'ghi']
['def', 'jkl', 'jkl', 'jkl', 'jkl']
['def', 'ghi', 'jkl', 'ghi', 'def']
>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.words(nb=4, ext_word_list=['abc', 'def', 'ghi', 'jkl'], unique=True)
...
['jkl', 'def', 'abc', 'ghi']
['jkl', 'def', 'ghi', 'abc']
['ghi', 'jkl', 'abc', 'def']
['ghi', 'abc', 'jkl', 'def']
['def', 'jkl', 'abc', 'ghi']

faker.providers.person

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

Bases: Provider

first_name() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name()
...
'海燕'
'婷婷'
'刚'
'秀兰'
'凤兰'
first_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_female()
...
'丽娟'
'雪梅'
'丽'
'琴'
'荣'
first_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_male()
...
'楠'
'帆'
'坤'
'建平'
'旭'
first_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_name_nonbinary()
...
'海燕'
'婷婷'
'刚'
'秀兰'
'凤兰'
first_romanized_name() str
Example:

‘Chao’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.first_romanized_name()
...
'Na'
'Ping'
'Fang'
'Lei'
'Wei'
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()
...
'顾'
'廖'
'周'
'刘'
'林'
last_name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_female()
...
'顾'
'廖'
'周'
'刘'
'林'
last_name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_male()
...
'顾'
'廖'
'周'
'刘'
'林'
last_name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_name_nonbinary()
...
'顾'
'廖'
'周'
'刘'
'林'
last_romanized_name() str
Example:

‘Chao’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.last_romanized_name()
...
'Qiao'
'Shao'
'Cheng'
'Lei'
'Wei'
name() str
Example:

‘John Doe’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name()
...
'廖婷婷'
'刘凤兰'
'赵莉'
'黄红霞'
'陈帆'
name_female() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_female()
...
'廖婷婷'
'刘凤兰'
'赵莉'
'黄红霞'
'陈帆'
name_male() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_male()
...
'廖婷婷'
'刘凤兰'
'赵莉'
'黄红霞'
'陈帆'
name_nonbinary() str
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.name_nonbinary()
...
'廖婷婷'
'刘凤兰'
'赵莉'
'黄红霞'
'陈帆'
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()
...
''
''
''
''
''
romanized_name() str
Example:

‘Chao Bai’

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.romanized_name()
...
'Ping Cheng'
'Wei Tian'
'Li Tao'
'Xiulan Jia'
'Li Gao'
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.zh_CN.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()
...
'18066048764'
'18859382421'
'14548924115'
'18881565938'
'18878408016'
phonenumber_prefix() int
Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.phonenumber_prefix()
...
180
159
145
181
182

faker.providers.ssn

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

Bases: Provider

ssn(min_age: int = 18, max_age: int = 90, gender: Literal['M', 'F', 'X'] | None = None, area_code: str = '') str

Return 18 character chinese personal identity code

Parameters:
  • gender – F for female M for male None for default

  • area_code – None for default

Examples:

>>> Faker.seed(0)
>>> for _ in range(5):
...     fake.ssn()
...
'610403197205116047'
'430124196101196473'
'451027197410193826'
'210803198108201946'
'530701195902219249'