search

Thursday, March 9, 2017

List data samples for faker

faker is a very useful library for generating beautiful test data. However, I was not able to find a proper description with all providers. All samples (plus some useless data) can be printed and inspected with the following code:
from faker import Factory as FakerFactory

faker = FakerFactory.create()
methods = [method for method in dir(faker) if callable(getattr(faker, method)) and not method.startswith("_")]
for item in methods:
    try:
        print u"- %s:" % item
        print u"  %s" % getattr(faker, item)()
    except TypeError:
        pass
The output is:
- address:
  25611 Senger Cove
Cadenmouth, HI 46932-8013
- am_pm:
  AM
- boolean:
  False
- bothify:
  07 sb
- bs:
  re-contextualize customized mindshare
- building_number:
  86338
- catch_phrase:
  Expanded uniform complexity
- century:
  III
- chrome:
  Mozilla/5.0 (Windows NT 6.0) AppleWebKit/5361 (KHTML, like Gecko) Chrome/14.0.879.0 Safari/5361
- city:
  Sporershire
- city_prefix:
  Lake
- city_suffix:
  port
- color_name:
  Indigo
- company:
  Flatley Inc
- company_email:
  kbaumbach@mckenzie.com
- company_suffix:
  LLC
- country:
  Syrian Arab Republic
- country_code:
  FI
- credit_card_expire:
  12/26
- credit_card_full:
  
Diners Club / Carte Blanche
Pierre Donnelly
36417005868777  04/26
CVC: 568
- credit_card_number:
  6011478274887340
- credit_card_provider:
  VISA 16 digit
- credit_card_security_code:
  081
- currency_code:
  RSD
- date:
  1982-04-04
- date_time:
  1999-05-19 00:50:24
- date_time_ad:
  1864-03-03 15:27:13
- date_time_between:
  2002-08-21 16:01:56
- date_time_between_dates:
  2017-03-08 21:56:07
- date_time_this_century:
  2016-01-14 03:30:51
- date_time_this_decade:
  2014-08-17 00:29:28
- date_time_this_month:
  2017-03-03 08:27:52
- date_time_this_year:
  2017-01-10 12:08:41
- day_of_month:
  04
- day_of_week:
  Saturday
- domain_name:
  altenwerth.com
- domain_word:
  cronawalker
- ean:
  3265654672776
- ean13:
  4119002606106
- ean8:
  13383411
- email:
  columbus64@gmail.com
- file_extension:
  png
- file_name:
  aperiam.html
- firefox:
  Mozilla/5.0 (Windows NT 6.1; it-IT; rv:1.9.2.20) Gecko/2012-07-23 16:34:01 Firefox/4.0
- first_name:
  Tella
- first_name_female:
  Oliva
- first_name_male:
  Arba
- format:
- free_email:
  milford.rempel@yahoo.com
- free_email_domain:
  yahoo.com
- geo_coordinate:
  -82.910152
- get_formatter:
- get_providers:
  [<faker.providers.user_agent.Provider object at 0x7fcce4201410>, <faker.providers.ssn.en_US.Provider object at 0x7fcce4201450>, <faker.providers.python.Provider object at 0x7fcce42013d0>, <faker.providers.profile.Provider object at 0x7fcce4201390>, <faker.providers.phone_number.en_US.Provider object at 0x7fcce4201350>, <faker.providers.person.en_US.Provider object at 0x7fcce4201310>, <faker.providers.misc.Provider object at 0x7fcce4201250>, <faker.providers.lorem.la.Provider object at 0x7fcce42012d0>, <faker.providers.job.en_US.Provider object at 0x7fcce4201290>, <faker.providers.internet.en_US.Provider object at 0x7fcce4201210>, <faker.providers.file.Provider object at 0x7fcce42011d0>, <faker.providers.date_time.Provider object at 0x7fcce4201190>, <faker.providers.currency.Provider object at 0x7fcce4201150>, <faker.providers.credit_card.Provider object at 0x7fcce4201110>, <faker.providers.company.en_US.Provider object at 0x7fcce4201090>, <faker.providers.color.en_US.Provider object at 0x7fcce42010d0>, <faker.providers.barcode.Provider object at 0x7fcce4201050>, <faker.providers.address.en_US.Provider object at 0x7fcce41e9fd0>]
- hex_color:
  #69d7c0
- image_url:
  http://www.lorempixum.com/373/972
- internet_explorer:
  Mozilla/5.0 (compatible; MSIE 6.0; Windows NT 5.01; Trident/3.1)
- ipv4:
  129.146.124.124
- ipv6:
  ef5e:860d:c643:8233:0ff0:d40d:7739:9844
- iso8601:
  2007-01-25T19:03:46
- job:
  Dancer
- language_code:
  de
- last_name:
  Romaguera
- last_name_female:
  Heidenreich
- last_name_male:
  Bogan
- latitude:
  62.9329675
- lexify:
  UGTW
- linux_platform_token:
  X11; Linux x86_64
- linux_processor:
  x86_64
- locale:
  ru_TO
- longitude:
  -49.789527
- mac_address:
  41:9e:ad:ca:2a:fe
- mac_platform_token:
  Macintosh; PPC Mac OS X 10_5_2
- mac_processor:
  Intel
- md5:
  04c1004fa2b0de119d764c4ec41e567d
- military_apo:
  PSC 0750, Box 3490
- military_dpo:
  Unit 1372 Box 0808
- military_ship:
  USNV
- military_state:
  AE
- mime_type:
  message/rfc822
- month:
  11
- month_name:
  February
- name:
  Dorcas Wolff MD
- name_female:
  Amy Tromp
- name_male:
  Colvin Hoppe
- null_boolean:
  False
- numerify:
  597
- opera:
  Opera/9.27.(Windows NT 6.2; it-IT) Presto/2.9.173 Version/11.00
- paragraph:
  Ex est maiores et maiores id voluptatem velit iure. Ratione ad enim sed. Quidem ea vel esse quis molestiae quisquam tempora.
- paragraphs:
  [u'Ipsum consequatur et et et et. Voluptatem qui totam veritatis. Quasi vitae autem quos magnam ducimus. Doloremque minima perferendis quibusdam mollitia doloremque. Et temporibus porro quia eveniet sunt.', u'Neque nihil cupiditate sunt. Velit ducimus sint qui eaque nam.', u'Sequi labore laudantium expedita iusto aspernatur quibusdam ipsa hic. Et delectus numquam et fugit. Et quo explicabo quia voluptatem molestias blanditiis omnis. Mollitia facilis molestiae sunt aut eius quia.']
- parse:
- password:
  H$E4isuB__
- phone_number:
  322-309-6514
- postalcode:
  36510
- postalcode_plus4:
  31785-2317
- postcode:
  63240
- prefix:
  Dr.
- prefix_female:
  Miss
- prefix_male:
  Mr.
- profile:
  {'website': [u'http://feest.com/', u'http://runolfsson.info/', u'http://www.wiegand.com/', u'http://www.rennerzemlak.org/'], 'username': u'bogisich.forest', 'name': u'Lorenz Friesen III', 'blood_group': 'A+', 'residence': u'87593 Douglas Pike\nBeahanberg, NY 08971-4439', 'company': u'Ratke and Sons', 'address': u'3721 Rath Springs\nMillerbury, AK 65443-3366', 'birthdate': '1985-10-14', 'sex': 'M', 'job': 'Scientist, research (medical)', 'ssn': u'658-53-8410', 'current_location': (Decimal('-69.179215'), Decimal('73.080343')), 'mail': u'natalee03@yahoo.com'}
- provider:
- pybool:
  False
- pydecimal:
  93907633.3459
- pydict:
  {u'non': u'Sint at et ut ut.', u'voluptas': datetime(2011, 6, 30, 13, 28, 24), u'in': u'Consequatur modi ut.', u'temporibus': u'nberge@gmail.com', u'quam': 5946, u'quia': -50185653292693.0, u'corporis': 44989.34539971, u'aspernatur': datetime(2001, 5, 8, 5, 0, 4), u'id': u'Voluptas et.', u'consequatur': u'Sint voluptatum quo.'}
- pyfloat:
  5.427466
- pyint:
  5831
- pyiterable:
  [u'Praesentium atque.', 510, u'Voluptatem.', u'Aspernatur culpa.', -86872010066.1, Decimal('1.39045051271E+12'), u'Aut neque quod quis.', 774237663.8, u'Libero voluptates.']
- pylist:
  [u'Enim voluptatem.', u'In ut unde aut est.', 3744, u'Tenetur harum nam.', u'Amet nam quam.', Decimal('-2.15222088569E+13'), 56014295154.367]
- pyset:
  set([2144, u'Est voluptas rem.', datetime(1989, 2, 18, 3, 52, 13), u'Est nihil.', Decimal('-243.7196'), datetime(1983, 9, 28, 12, 52, 56), u'beverlee76@yahoo.com', Decimal('-3.04622164413E+12'), u'Natus ut atque.'])
- pystr:
  Ex non explicabo.
- pystruct:
- pytuple:
- random_digit:
  5
- random_digit_not_null:
  1
- random_digit_not_null_or_empty:
  
- random_digit_or_empty:
  9
- random_element:
  b
- random_int:
  3804
- random_letter:
  x
- random_number:
  981
- randomize_nb_elements:
  11
- rgb_color:
  63,125,116
- rgb_color_list:
- rgb_css_color:
  rgb(21,8,176)
- safari:
  Mozilla/5.0 (iPod; U; CPU iPhone OS 3_1 like Mac OS X; en-US) AppleWebKit/533.9.6 (KHTML, like Gecko) Version/3.0.5 Mobile/8B112 Safari/6533.9.6
- safe_color_name:
  fuchsia
- safe_email:
  irvin.little@example.net
- safe_hex_color:
  #dd7700
- secondary_address:
  Suite 378
- seed:
  None
- sentence:
  Consequuntur unde quo non voluptas minima voluptatibus.
- sentences:
  [u'Sapiente quia incidunt porro dolorum sapiente.', u'Et quaerat ad nesciunt maiores.', u'Ut excepturi autem qui laboriosam.']
- set_formatter:
- sha1:
  aab5c833e76265e48aa35b5b39ed798b2d21d971
- sha256:
  d74cbb45b74394c6a95f55f27926db1bdfeaf42dbbfcb3fddff22911f0dd4202
- simple_profile:
  {'username': u'cbuckridge', 'name': u'Britta Cartwright', 'birthdate': '1974-08-05', 'sex': 'M', 'address': u'123 Talia Island\nSouth Thursa, DC 68141', 'mail': u'vonda67@hotmail.com'}
- slug:
  ut-ducimus-illum
- ssn:
  142-04-9440
- state:
  Vermont
- state_abbr:
  VT
- street_address:
  33334 Auer Via
- street_name:
  Tayler Pines
- street_suffix:
  Curve
- suffix:
  II
- suffix_female:
  DVM
- suffix_male:
  V
- text:
  Eius ut atque voluptatum deserunt similique aliquid. Rerum quo commodi cum eius.
- time:
  14:45:00
- time_delta:
  16412 days, 22:34:37
- timezone:
  Asia/Saigon
- tld:
  com
- unix_time:
  330977642
- uri:
  http://boyer.com/main/index.php
- uri_extension:
  .html
- uri_page:
  post
- uri_path:
  tags/posts
- url:
  http://www.hammes.com/
- user_agent:
  Mozilla/5.0 (compatible; MSIE 7.0; Windows 98; Trident/4.0)
- user_name:
  jenkins.layton
- uuid4:
  8fef0d23-2010-44f1-873a-49767169db27
- windows_platform_token:
  Windows 95
- word:
  omnis
- words:
  [u'neque', u'odit', u'dolorum']
- year:
  1975
- zipcode:
  77130
- zipcode_plus4:
  71629-5918

No comments:

Post a Comment