Hi Guys,
I created a python class that provides new unique fake data at your request. It provides a unique fake firstname, surname, number, email, username, password, maiden name, birthday, mastercard with expiry date, occupation, company and website.
Enjoy.
Commands:
populate()
Collects and stores the data. The username and surname is collected from namelist.txt and the rest is collected from fakenamegenerator.com.
new()
Request a new set of data. The will provide a new firstname, surname, birthday, etc.
firstname()
Returns firstname as string
surname()
Returns surname as string
number()
Returns phone number as string
email()
Returns email address as string
username()
Returns username as string
password()
Returns password as string
maidenname()
Returns maiden name as string
birthday()
Returns birthday as string
month()
Returns month of birthday as string
day()
Returns day of birthday as string
year()
Returns year of birthday as string
mastercard()
Returns mastercard as string
expire()
Returns expiry date of mastercard as string
occupation()
Returns occupation as string
company()
Returns company as string
website()
Returns website as string
Tutorial
Extract fackinfogen.py to your project folder.
from fakeinfogen import infogen
info = infogen() #Create infogen object
info.populate() #Grabs all data and creats first data set.
print 'Hi, my name is ' + info.firstname() + ' ' + info.surname() + ', i was born in ' + info.year()
info.new() #Get new data set.
print 'Hi, my name is ' + info.firstname() + ' ' + info.surname() + ', i was born in ' + info.year()
result:
Hi, my name is Ronald Hice, i was born in 1966.
Hi, my name is Nathan Gomez, i was born in 1960.
Download
Note: The class needs Python 2.7 and need the BeautifulSoup library to run.
No comments:
Post a Comment