Faker generates sorts of fake common information that you read on personal profiles, such as name or address.
_|_|_|_| _| _| _|_|_| _| _| _|_| _| _|_| _|_|_| _| _| _|_| _|_|_|_| _|_| _| _| _| _| _| _| _| _| _|_|_| _| _| _|_|_| _|
For example, using in command-line tool:
$ python -m faker faker.providers.person ### faker.providers.person fake.name_female() # Hilah Quigley fake.prefix_male() # Mr. fake.prefix() # Dr. fake.name() # Mellissa Turner fake.suffix_female() # MD fake.name_male() # Jaiden Bauch fake.first_name() # Felipe fake.suffix_male() # MD fake.suffix() # MD fake.first_name_male() # Severt fake.first_name_female() # Beatrice fake.last_name() # Kovacek fake.prefix_female() # Miss
Or even browser user agent strings:
$ python -m faker -r 3 user_agent Mozilla/5.0 (compatible; MSIE 5.0; Windows 98; Trident/4.0) Mozilla/5.0 (Macintosh; PPC Mac OS X 10_5_0) AppleWebKit/5331 (KHTML, like Gecko) Chrome/13.0.811.0 Safari/5331 Mozilla/5.0 (Windows NT 5.01; it-IT; rv:1.9.0.20) Gecko/2013-08-06 22:15:22 Firefox/11.0
Other fake data providers include file MIME type, phone number, country code language code, boolean, MD5, SHA1, SHA256, Internet IP, company, date, time, Lorem, etc.
Since it depends on locale, you can generate faked address based on the language code, or any other information is language or geography-based:
$ python -m faker address 261 Wolff Views Davantebury, MN 45805 $ python -m faker -l en_GB address Flat 56 Delila view Treshire RE8J 1SE $ python -m faker -l ko_KR address 대전광역시 후슬시 소봉혁예로 695 (009-066)
Or get some gender-specific first names:
$ python -m faker first_name_female Biddie $ python -m faker first_name_male Rocco
Faker is inspired by PHP’s Faker, Perl’s Data::Faker, and by Ruby’s Faker, licensed under the MIT License, currently version 0.4.0 (2014-03-30), works on both Python 2 and 3.
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.