Skip to main content

Generate realistic fake data for testing without external dependencies

Project description

philiprehberger-test-data

Tests PyPI version Last updated

Generate realistic fake data for testing without external dependencies.

Installation

pip install philiprehberger-test-data

Usage

from philiprehberger_test_data import fake

# Basic generators
fake.name()          # "Alice Johnson"
fake.email()         # "bob.smith@example.com"
fake.integer(1, 100) # 42
fake.boolean()       # True
fake.uuid()          # "a1b2c3d4-..."

# Seed for reproducible output
fake.seed(42)
fake.name()  # always the same name with seed 42

# Bulk generation
fake.many(fake.name, 5)   # ["Alice Smith", "Bob Jones", ...]
fake.many(fake.integer, 3, 1, 100)  # [42, 87, 13]

API

Method Description
fake.seed(value) Set random seed for reproducible output
fake.name() Full name (first + last)
fake.first_name() First name
fake.last_name() Last name
fake.email() Email address
fake.integer(low, high) Random integer in [low, high]
fake.floating(low, high) Random float in [low, high]
fake.boolean() Random boolean
fake.choice(items) Random item from list
fake.sentence(words) Random sentence
fake.paragraph(sentences) Random paragraph
fake.uuid() UUID4 string
fake.date(start_year, end_year) Random date
fake.datetime_(start_year, end_year) Random datetime
fake.address() Street address
fake.full_address() Full address with city, state, ZIP
fake.phone() Phone number
fake.company() Company name
fake.hex_color() Hex color code
fake.ip_address() IPv4 address
fake.url() URL
fake.many(generator, count, *args, **kwargs) List of N generated values

Development

pip install -e .
python -m pytest tests/ -v

Support

If you find this project useful:

Star the repo

🐛 Report issues

💡 Suggest features

❤️ Sponsor development

🌐 All Open Source Projects

💻 GitHub Profile

🔗 LinkedIn Profile

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

philiprehberger_test_data-0.1.7.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

philiprehberger_test_data-0.1.7-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file philiprehberger_test_data-0.1.7.tar.gz.

File metadata

File hashes

Hashes for philiprehberger_test_data-0.1.7.tar.gz
Algorithm Hash digest
SHA256 b48d9afa85391ca7b9a13cda40937cfaf1aac7a31406281f0c010d8d463ec5e9
MD5 72be83055ac5889f1128766e5381d8c5
BLAKE2b-256 7c42c9c08ec85cc5c89c67a09acfe2aa87a04b99623287d4a2a4e856c33d05f0

See more details on using hashes here.

File details

Details for the file philiprehberger_test_data-0.1.7-py3-none-any.whl.

File metadata

File hashes

Hashes for philiprehberger_test_data-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 5bf0cc9620fe675c71bcbfea197895e4cf958b5ac788e1a2a26d0802109cb56f
MD5 1326227b4e0f640270f2a42381a961f8
BLAKE2b-256 9feafdafe7a1e435c50e96da3012157055204a252fe249118d89fce3296dfef9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page