Generate realistic fake data for testing without external dependencies
Project description
philiprehberger-test-data
Generate realistic fake data for testing without external dependencies.
Install
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 |
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file philiprehberger_test_data-0.1.1.tar.gz.
File metadata
- Download URL: philiprehberger_test_data-0.1.1.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
069b7587eb51d703556f15d75018b166e8d3f9c1dca5925046dbcc2c8dcc521b
|
|
| MD5 |
772fef2554e173c060e499f288a5c215
|
|
| BLAKE2b-256 |
4869349a5846ae45333e3cd2e48bf4a35b5fab4971efa888c2a4594d1ed18873
|
File details
Details for the file philiprehberger_test_data-0.1.1-py3-none-any.whl.
File metadata
- Download URL: philiprehberger_test_data-0.1.1-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8107ed591ccc46caf9273b95e029c351322d49543ed39d2ba0a07beafe01b98f
|
|
| MD5 |
aa53c9cf358b4d173186af2d4aac57df
|
|
| BLAKE2b-256 |
a27fc0409084e528369e9a40be6780a7cf3c6c43324a9bf40068cd476eecf8b5
|