Skip to content

Instantly share code, notes, and snippets.

@nongiach
Created February 21, 2017 22:23
Show Gist options
  • Save nongiach/8b625f2a7adab263c1777667781ff34a to your computer and use it in GitHub Desktop.
Save nongiach/8b625f2a7adab263c1777667781ff34a to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import faker
import random
from string import ascii_letters, digits
fake = faker.Faker()
def main():
print('id_num, state, date_start, date_end, desc')
for id_num in range(100):
refs = ''.join([ random.choice(digits + ascii_letters)
for i in range(5)])
state = random.choice(["active", "inactive", "blocked"])
date_start = fake.date_time()
date_end = fake.date_time_between(start_date=date_start)
desc = fake.sentence().replace(',', '')
all_info = id_num, state, date_start, date_end, desc
print(', '.join([ str(i) for i in all_info ]))
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment