Skip to content

Instantly share code, notes, and snippets.

@orasik
Created May 8, 2018 16:24
Show Gist options
  • Save orasik/11ccab816a0ef0813e89a277f9b61a4e to your computer and use it in GitHub Desktop.
Save orasik/11ccab816a0ef0813e89a277f9b61a4e to your computer and use it in GitHub Desktop.
Python Fake to generate random values
from faker import Faker
import json
fake = Faker('en_GB')
for i in range(50):
medicine = {
'name': fake.name(),
'manufacturer': fake.company(),
'country': fake.country(),
'info': fake.text(),
'version': 'v1',
'image': fake.image_url(),
'UID': fake.isbn13(),
'barcode': fake.ean(),
'type': fake.word()
}
print(json.dumps(medicine))
print("\n\n")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment