Skip to content

A simple wrapper for the faker and random modules that will quickly generate fake data in 5 parallel threads and export to a csv.

Notifications You must be signed in to change notification settings

jasonleehodges/datagen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 

Repository files navigation

DataGen

A simple wrapper for the faker and random python modules that will quickly generate fake data in 5 parallel threads and export to a csv. Instantiate the class with a string filename as well as the number of rows you wish to generate as arguments to the constructor method. The file will be stored in the same directory that the python script is executed from.

Data can be generated with or without a date column. Call the dates method with a start date string and an end date string (in the YYYY-MM-DD format) in order to set the date column to generate random dates between the start and end date.

Known limitations:
  • Requires Python 3, the multiprocess module, and the typing module for type hints.
  • Number of rows should be a multiple of 10 in order to split up the work between threads equally.

Example:

dg = DataGen("fakedata_1000",1000)
dg.dates("2017-01-01","2017-12-31")
dg.generate()

About

A simple wrapper for the faker and random modules that will quickly generate fake data in 5 parallel threads and export to a csv.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages