philiprehberger-test-data
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:
License
Release files for philiprehberger-test-data 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| philiprehberger_test_data-0.1.7.tar.gz | 7.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| philiprehberger_test_data-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.0 kB
Release files / philiprehberger_test_data-0.1.7.tar.gz
| Download URL | philiprehberger_test_data-0.1.7.tar.gz |
|---|---|
| Size | 7.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b48d9afa85391ca7b9a13cda40937cfaf1aac7a31406281f0c010d8d463ec5e9
|
|
BLAKE2b-256 checksum How to use checksums |
7c42c9c08ec85cc5c89c67a09acfe2aa87a04b99623287d4a2a4e856c33d05f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|
Release files / philiprehberger_test_data-0.1.7-py3-none-any.whl
| Download URL | philiprehberger_test_data-0.1.7-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5bf0cc9620fe675c71bcbfea197895e4cf958b5ac788e1a2a26d0802109cb56f
|
|
BLAKE2b-256 checksum How to use checksums |
9feafdafe7a1e435c50e96da3012157055204a252fe249118d89fce3296dfef9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.13
|