-
Notifications
You must be signed in to change notification settings - Fork 52
Expand file tree
/
Copy pathfaker_tutorial.py
More file actions
34 lines (28 loc) · 838 Bytes
/
faker_tutorial.py
File metadata and controls
34 lines (28 loc) · 838 Bytes
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
"""
https://pypi.org/project/Faker/
pip install Faker
https://faker.readthedocs.io/en/master/locales/zh_TW.html
"""
from faker import Faker
from datetime import datetime
fake = Faker(locale='zh_TW')
for _ in range(10):
# print(fake.company_prefix())
print(fake.name())
# print(fake.first_name())
# print(fake.last_name())
# print(fake.language_name())
# print(fake.email())
# print(fake.city())
# print(fake.user_agent())
# print(fake.date())
# print(fake.date_between())
# print(fake.date_between(start_date=datetime(2023,1,1), end_date=datetime(2023,12,31)))
# print(fake.image_url())
# print(fake.user_agent())
# print(fake.ipv4())
# print(fake.ipv4_public())
# print(fake.url())
# print(fake.phone_number())
# print(fake.address())
# print(fake.text())