- Welcome to Faker’s documentation! — Faker 37. 4. 2 documentation
Faker is a Python package that generates fake data for you 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
- Using the Faker Class — Faker 37. 4. 2 documentation
This is all that is needed to start using the new Faker class and its features, even if additional arguments are passed to Faker, because the arguments expected by new Faker and old Faker are the same
- faker. providers. python — Faker 37. 4. 2 documentation
faker providers python ¶ class faker providers python Provider(generator: Any) ¶ Bases: BaseProvider enum(enum_cls: Type[TEnum]) → TEnum ¶ Returns a random enum of the provided input Enum type Parameters: enum_cls – The Enum type to produce the value for Returns: A randomly selected enum value pybool(truth_probability: int = 50) →
- faker. providers — Faker 37. 4. 2 documentation
By default, letters contains all ASCII letters, uppercase and lowercase Under the hood, this method uses numerify() and and lexify() to generate random values for number signs and question marks respectively Examples: >>> Faker seed(0) >>> for _ in range(5): fake bothify(letters='ABCDE') '66 AC' '87 DC' '75 EB' '82 CB' '19 CE'
- faker. providers. address — Faker 37. 4. 2 documentation
postcode() → str ¶ Example: 86039-9874 Examples: >>> Faker seed(0) >>> for _ in range(5): fake postcode() '50995' '99847' '55626' '05807' '34437'
- faker. providers. date_time — Faker 37. 4. 2 documentation
Defaults to True after_today – include days in current century after today Defaults to False Examples: >>> Faker seed(0) >>> for _ in range(5): fake date_this_century() datetime date(2021, 7, 24) datetime date(2019, 5, 10) datetime date(2010, 9, 27) datetime date(2006, 8, 11) datetime date(2013, 1, 20)
- faker. providers. person — Faker 37. 4. 2 documentation
>>> Faker seed(0) >>> for _ in range(5): fake language_name() 'Luba-Katanga' 'Malay' 'Aymara' 'Interlingue' 'Quechua'
- Locale en_US — Faker 37. 4. 2 documentation
Example:fake set_arguments (‘top_half’, {‘min_value’: 50, ‘max_value’: 100}) fake json (data_columns= {‘Name’: ‘name’, ‘Score’: ‘pyint:top_half’}) Data Column List format: [ (‘key name’, ‘definition’, {‘arguments’})]
|