Date: 20 Jun 2022
Introduction: Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. Module: Faker Installation: pip install Faker About: Faker package helps to generate fake data, such as name, address, text, color, date time, currencies, sentences, phone numbers and so on. To ensure that all the generated values are unique for a specific function, the .unique method is called. Instead, to generate the same value each time, the seed() method is used. Sample Source Code: from faker import Faker fake = Faker() print("Name:", fake.name()) print("Address:", fake.address()) print("Email:", fake.email()) print("Phone Number:", fake.phone_number()) print("Company:", fake.company()) print("Text:", fake.text()) Execution: $ python faker_sample.py Output: Name: Maria Miller Address: 006 Melissa Radial Emilyfort, MA 79709 Email: bradfordjacquel...@hotmail.com Phone Number: (315)802-5718x3723 Company: Lopez-Estrada Text: Site church style yeah truth before. Boy shoulder his man could. Administration mouth create career difficult return speech. Mrs town concern us. Reference: https://pypi.org/project/Faker
_______________________________________________ Chennaipy mailing list Chennaipy@python.org https://mail.python.org/mailman/listinfo/chennaipy