-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfaker_demo.py
74 lines (52 loc) · 1.27 KB
/
faker_demo.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
from faker import Faker
# Create a Faker instance
fake = Faker()
# Generate random fake data
print(fake.name())
print(fake.address())
print(fake.email())
print("*" * 50)
print("with locale de_DE\n")
fake_de = Faker('de_DE')
print(fake_de.name())
print("*" * 50)
print("with seed(42)\n")
fake_seed = Faker()
fake_seed.seed_instance(42)
print(fake_seed.name())
print("*" * 50)
print(fake.text())
print("------")
print(fake.paragraph(nb_sentences=5))
print("------")
print(fake.sentence(nb_words=10, variable_nb_words=False))
print("*" * 50)
print("Credit Cards\n")
print(fake.credit_card_provider())
print(fake.credit_card_number())
print(fake.credit_card_expire())
print(fake.credit_card_security_code())
print("------")
print(fake.credit_card_full())
print("*" * 50)
print("e-mail\n")
print(fake.ascii_company_email())
print(fake.ascii_free_email())
print(fake.ascii_safe_email())
print("*" * 50)
print("phone numbers\n")
print(fake.basic_phone_number())
print(fake.country_calling_code())
print("*" * 50)
print("ISBN\n")
print(fake.isbn10())
print(fake.isbn13())
print("*" * 50)
print("Coordinates\n")
print(fake.coordinate())
print(fake.latitude())
print(fake.longitude())
print(fake.latlng())
print(fake.local_latlng())
print(fake.location_on_land())
# print(dir(fake))