Skip to content

faker but fast and dumb instead of slow and smart

License

Notifications You must be signed in to change notification settings

bengetch/fakeish

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fakeish

faker but fast and dumb instead of slow and smart

Usage

To generate random but possibly overlapping data:

from fakeish import Fakeish

f = Fakeish()
rand_ssn = f.ssn()

In order to generate data that is both random and non-overlapping, however, some light configuration is needed. The following code will

f = Fakeish()
f.configure_unique_samples_list("ssn", 50)

non_overlapping_ssns = [f.unique.ssn() for i in range(50)]

Configuration sample type can also be any of the following: emails, first_names, first_names_male, first_names_female, last_names, names, names_male, names_female.

In order to generate the same random data each time, the Fakeish object can be seeded:

f = Fakeish()
f.seed(<int>)
# configure / generate data here

About

faker but fast and dumb instead of slow and smart

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages