Language zh_CN¶
faker.providers.address
¶
fake.latitude() # 0.293265
fake.street_name() # 韶路
fake.address() # 博市连路D座 741843
fake.street_address() # 于街b座
fake.postcode() # 433541
fake.longitude() # 15.886019
fake.country() # 摩洛哥
fake.city_name() # 成都
fake.street_suffix() # 路
fake.geo_coordinate(center=None, radius=0.001) # 45.465021
fake.city_suffix() # 市
fake.building_number() # r座
fake.city() # 玉兰市
fake.state() # 南湖区
faker.providers.barcode
¶
fake.ean(length=13) # 6204976644884
fake.ean13() # 2769721485142
fake.ean8() # 92165304
faker.providers.color
¶
fake.rgb_css_color() # rgb(214,152,71)
fake.color_name() # Thistle
fake.rgb_color_list() # (163, 31, 198)
fake.rgb_color() # 210,205,39
fake.safe_hex_color() # #ee7700
fake.safe_color_name() # navy
fake.hex_color() # #acce68
faker.providers.company
¶
fake.company_suffix() # 科技有限公司
fake.company() # 诺依曼软件信息有限公司
fake.company_prefix() # 鸿睿思博
faker.providers.credit_card
¶
fake.credit_card_security_code(card_type=None) # 0
fake.credit_card_full(card_type=None, validate=False, max_check=10) # Diners Club / Carte Blanche 利 全 36316866131293 09/20 CVC: 186
fake.credit_card_expire(start="now", end="+10y", date_format="%m/%y") # 05/19
fake.credit_card_number(card_type=None, validate=False, max_check=10) # 5288632906551173
fake.credit_card_provider(card_type=None) # enRoute
faker.providers.currency
¶
fake.currency_code() # LBP
faker.providers.date_time
¶
fake.date_time_ad() # 1780-11-13 00:47:58
fake.month() # 03
fake.am_pm() # PM
fake.iso8601() # 1983-03-03T04:37:50
fake.date_time_this_century() # 2008-07-15 01:41:08
fake.date_time() # 1986-07-04 04:42:16
fake.month_name() # September
fake.date_time_this_month() # 2016-03-13 09:33:44
fake.date_time_this_decade() # 2010-12-26 08:37:51
fake.day_of_week() # Wednesday
fake.day_of_month() # 05
fake.time(pattern="%H:%M:%S") # 05:21:34
fake.date_time_between(start_date="-30y", end_date="now") # 1988-06-18 19:04:42
fake.unix_time() # 202334682
fake.date_time_this_year() # 2016-03-14 08:24:17
fake.timezone() # Europe/Monaco
fake.century() # XIV
fake.date(pattern="%Y-%m-%d") # 2002-03-28
fake.year() # 1973
faker.providers.file
¶
fake.mime_type(category=None) # application/zip
faker.providers.internet
¶
fake.ipv4() # 191.78.116.92
fake.url() # http://www..com/
fake.company_email() # n@.com
fake.uri() # http://.com/wp-content/category/main/home.php
fake.image_url(width=None, height=None) # http://dummyimage.com/649x899
fake.tld() # com
fake.free_email() # m@yahoo.com
fake.slug(*args, **kwargs) # id-cupiditate
fake.free_email_domain() # gmail.com
fake.domain_name() # .com
fake.uri_extension() # .html
fake.ipv6() # 010f:16d7:c2c7:dba8:0d7b:b615:b1f2:24dd
fake.safe_email() # .@example.org
fake.user_name(*args, **kwargs) # q
fake.uri_path(deep=None) # wp-content/category
fake.email() # .@gmail.com
fake.uri_page() # author
fake.mac_address() # 4b:7f:fa:5e:15:a2
faker.providers.job
¶
fake.job() # Careers information officer
faker.providers.lorem
¶
fake.text(max_nb_chars=200) # Voluptatem repellat modi assumenda molestias. Ut tempore m olestias voluptas similique. Nisi est delectus odio quod v oluptates a labore. Consequatur magni eveniet fuga neque.
fake.sentence(nb_words=6, variable_nb_words=True) # Molestiae ab eaque qui qui quos quas.
fake.word() # et
fake.paragraphs(nb=3) # [u'Cumque distinctio pariatur hic deleniti deleniti error porro ad. Dolorem est vel culpa facilis ut esse. Quidem do loremque at voluptatem molestias. Qui neque voluptatem rei ciendis saepe pariatur reiciendis eius debitis.', u'Quas m inus expedita quia. Voluptas consequatur veniam officia mo di non.', u'Voluptatum nemo voluptas vero ipsum iure qui. Sunt omnis magnam harum ab quasi ut vel. Et odit quia et s it quasi deserunt qui. Perspiciatis qui repellendus eum do lore vel quam eveniet.']
fake.words(nb=3) # [u'fugit', u'distinctio', u'dolores']
fake.paragraph(nb_sentences=3, variable_nb_sentences=True) # Expedita provident et optio. Omnis fugit quos at autem dol orum reiciendis voluptas. Eum sunt quam facilis qui quasi sapiente libero consequuntur.
fake.sentences(nb=3) # [u'Beatae nesciunt alias quae odit libero.', u'Dolorum sus cipit quis consequatur repellendus autem provident.', u'In autem maiores sequi non consequatur commodi ratione.']
faker.providers.misc
¶
fake.password(length=10, special_chars=True, digits=True, upper_case=True, lower_case=True) # qqgZRDL&ml
fake.locale() # de_HN
fake.md5(raw_output=False) # bc23f8418b0a558f964846d4becf5b5c
fake.sha1(raw_output=False) # 14dcd903cae01a8628040e8d60111ea0b0301c45
fake.null_boolean() # True
fake.sha256(raw_output=False) # ee2791a7f27f81bbe31d84a46da0606034a259cb17fd7d4089564fc811 f9ef87
fake.country_code() # NP
fake.language_code() # es
fake.boolean(chance_of_getting_true=50) # True
faker.providers.person
¶
fake.last_name_male() # 聂
fake.name_female() # 荀琳
fake.name() # 禹峰
fake.name_male() # 牛志强
fake.first_name() # 宇
fake.first_name_male() # 秀兰
fake.first_name_female() # 玉英
fake.last_name_female() # 空
fake.last_name() # 闾
faker.providers.profile
¶
fake.profile(fields=[]) # {'website': [u'http://www..net/', u'http://.com/', u'http: //www..biz/'], 'username': u'.', 'name': u'\u970d\u7389\u5 34e', 'blood_group': '0+', 'residence': u'\u6842\u82f1\u5e 02\u5bab\u8defE\u5ea7 130030', 'company': u'\u94f6\u5609\u 7f51\u7edc\u6709\u9650\u516c\u53f8', 'address': u'\u71d5\u 5e02\u5ed6\u8857O\u5ea7 922821', 'birthdate': '1990-02-16' , 'sex': 'M', 'job': 'Fisheries officer', 'ssn': u'812-42- 7595', 'current_location': (Decimal('36.9288195'), Decimal ('170.650627')), 'mail': u'.@hotmail.com'}
fake.simple_profile() # {'username': u'.', 'name': u'\u901a\u6dd1\u82f1', 'birthda te': '1976-08-08', 'sex': 'F', 'address': u'\u658c\u5e02\u 73ed\u8defN\u5ea7 906690', 'mail': u'.@hotmail.com'}
faker.providers.python
¶
fake.pyiterable(nb_elements=10, variable_nb_elements=True, *value_types) # (u'Assumenda similique.', u'Dolorem amet.', datetime(2009, 11, 16, 14, 58, 23), u'Aut eum recusandae.', 8146, 7920, u'http://.net/list/category/category/category/', u'Nobis l abore.', u'Dolores voluptatem.', u'Dolorem officia.', date time(1993, 8, 12, 16, 16, 7))
fake.pystr(max_chars=20) # Ipsa quibusdam.
fake.pyfloat(left_digits=None, right_digits=None, positive=False) # 3439924.771
fake.pystruct(count=10, *value_types) # ([u'Ut fugit vitae.', u'http://.com/', datetime(2012, 9, 3 0, 22, 54, 33), u'Quidem explicabo.', u'Hic reiciendis.', u'Esse ea sit.', datetime(1989, 1, 3, 14, 28, 42), u'Volup tas placeat.', 8499, u'http://www..org/privacy/'], {u'inci dunt': u'Est eligendi.', u'neque': Decimal('-83648753.125' ), u'fugiat': 4484, u'repudiandae': 6784, u'est': u'Nostru m possimus.', u'mollitia': Decimal('65912.5094'), u'volupt atem': datetime(1990, 1, 27, 2, 59, 55), u'laudantium': u' Qui fugiat eligendi.', u'labore': datetime(1977, 9, 28, 18 , 48, 17)}, {u'eum': {8: u'Ut ad animi placeat.', 9: [u'Ex plicabo in nihil.', u'Magnam est.', u'.@.com'], 10: {8: 56 06, 9: 6711, 10: [98.413, u'Non iusto beatae.']}}, u'minim a': {8: [2258, u'Distinctio nemo.', u'Inventore provident. '], 9: {8: u'Enim ipsa quo aut.', 9: [u'Consectetur.', u'C onsequatur.'], 7: u'Est et magni.'}, 7: 8528}, u'ab': {1: u'http://.com/search/', 2: [u'http://.com/tags/tags/homepa ge/', 8982, Decimal('-4.2204')], 3: {1: Decimal('-49022453 612.7'), 2: 6820, 3: [u'Exercitationem.', u'i@.com']}}, u' odit': {2: u'http://.com/', 3: [u'Voluptatem sit.', 1794, u'.@.com'], 4: {2: u'Sed nostrum laborum.', 3: Decimal('-5 6.0'), 4: [2532, 7920]}}, u'voluptas': {4: u'Itaque illo q uasi.', 5: [u'Explicabo sit.', 3521.554, u'Modi est nostru m.'], 6: {4: u'Deserunt voluptatem.', 5: u'Consequatur omn is.', 6: [datetime(1995, 8, 23, 15, 35, 34), 8974]}}, u'ut ': {5: 8965, 6: [u'Cum harum et et.', u'Dignissimos.', u'A ssumenda cumque.'], 7: {5: u'http://.com/', 6: u'.@.com', 7: [u'Velit debitis nulla.', u'Est soluta.']}}, u'est': {3 : 485, 4: [u'Dolor expedita.', datetime(2004, 1, 6, 3, 45, 20), u'Fugiat inventore.'], 5: {3: 9175, 4: 4130, 5: [u'E xcepturi est.', u'Pariatur placeat.']}}, u'cum': {0: Decim al('4.44326209829E+13'), 1: [-788498033126.347, u'http://w ww..com/faq/', 99462544670.8785], 2: {0: u'http://.com/cat egories/categories/register.html', 1: u'http://www..biz/fa q/', 2: [u'Corporis a fugiat.', u'Omnis deserunt.']}}, u'r epellat': {8: {8: [datetime(1993, 5, 9, 5, 43, 18), u'Quae rat sint non.'], 6: u'Tempore id facere.', 7: u'Tenetur si t qui.'}, 6: 521, 7: [u'http://www..com/explore/explore/re gister.php', Decimal('4.74286168411E+14'), Decimal('662705 531.47')]}, u'omnis': {9: u'Ab quia neque.', 10: [datetime (1973, 5, 28, 17, 47, 1), u'http://www..net/privacy.jsp', u'Dolor aut.'], 11: {9: u'http://www..com/category.htm', 1 0: u'55@yahoo.com', 11: [u'Ex quo sed aut ipsa.', datetime (1983, 3, 8, 7, 15, 40)]}}})
fake.pydecimal(left_digits=None, right_digits=None, positive=False) # 246973067.144
fake.pylist(nb_elements=10, variable_nb_elements=True, *value_types) # [u'Facere minus.', 4662, u'Qui similique rerum.', 1509, u' 76@hotmail.com', 3641, 7786, u'Rem aut quo est sit.', date time(1976, 5, 28, 7, 46, 33), u'http://.com/', u'.@.net', u'Reiciendis fuga qui.']
fake.pytuple(nb_elements=10, variable_nb_elements=True, *value_types) # (Decimal('71210830543.5'), 1453, u'93@.net', datetime(1995 , 7, 23, 6, 37, 34), u'http://www..com/homepage.htm', Deci mal('-31955245596.4'), u'http://.com/explore/about.php', D ecimal('80752.4300344'))
fake.pybool() # True
fake.pyset(nb_elements=10, variable_nb_elements=True, *value_types) # set([u'Ipsam quo ipsum et.', -3010599513361.6, u'Atque per ferendis.', 5296, u'http://.com/explore/about/', u'http:// www..com/blog/about/', u'Hic eveniet sed.', u'Sint molesti ae.', u'Aut est similique.', 506, 2461, u'Nihil omnis eaqu e.'])
fake.pydict(nb_elements=10, variable_nb_elements=True, *value_types) # {u'nisi': u'Iure commodi sint.', u'inventore': 52845280952 .636, u'facilis': u'Suscipit.', u'eaque': datetime(2014, 6 , 22, 12, 22, 15), u'architecto': -4371238441.0, u'ullam': Decimal('-6.31559037432E+12'), u'rerum': u'Mollitia iure. ', u'iusto': 267, u'qui': u'Adipisci voluptate.', u'magni' : u'.@.info', u'odio': u'Repellendus omnis.', u'earum': De cimal('3.101')}
fake.pyint() # 2391
faker.providers.phone_number
¶
fake.phone_number() # 15941691418
fake.phonenumber_prefix() # 134
faker.providers.ssn
¶
fake.ssn() # 377-06-6338
faker.providers.user_agent
¶
fake.mac_processor() # PPC
fake.firefox() # Mozilla/5.0 (Windows NT 5.0; sl-SI; rv:1.9.2.20) Gecko/201 3-01-01 05:07:55 Firefox/3.6.9
fake.linux_platform_token() # X11; Linux x86_64
fake.opera() # Opera/8.86.(Windows NT 6.2; it-IT) Presto/2.9.184 Version/ 10.00
fake.windows_platform_token() # Windows 95
fake.internet_explorer() # Mozilla/5.0 (compatible; MSIE 5.0; Windows 98; Trident/4.1 )
fake.user_agent() # Mozilla/5.0 (Windows NT 6.2) AppleWebKit/5312 (KHTML, like Gecko) Chrome/15.0.806.0 Safari/5312
fake.chrome() # Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_4) AppleWeb Kit/5311 (KHTML, like Gecko) Chrome/15.0.897.0 Safari/5311
fake.linux_processor() # i686
fake.mac_platform_token() # Macintosh; U; PPC Mac OS X 10_6_9
fake.safari() # Mozilla/5.0 (Windows; U; Windows NT 6.1) AppleWebKit/531.3 9.5 (KHTML, like Gecko) Version/5.1 Safari/531.39.5