Full-stack fake data generator - Generate databases and APIs from JSON schemas
Project description
Fakestack
Python wrapper for the high-performance Fakestack database generator.
Installation
pip install fakestack
Features
- Zero Dependencies: No runtime dependencies, all functionality provided by bundled Go binary
- 116+ Fake Data Generators: Built on gofakeit (financial, localization, products, animals, food, vehicles, books, and more)
- Template Generator: Create custom data patterns (SKUs, IDs, codes) with modifiers
- Interactive Schema Generator: Built-in generator with 10 pre-built templates
- Multi-Database Support: SQLite, MySQL, PostgreSQL, MariaDB, MS SQL Server, CockroachDB
- Fast: 10-50x faster than pure Python implementations
- Cross-Platform: Works on Linux, macOS, Windows (x64 & ARM64)
- Python 3.8+: Compatible with Python 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
Quick Start
Command Line
# Generate schema interactively
python -m fakestack.runner -g .
# Download example schema
python -m fakestack.runner -d .
# Create database and populate with fake data
python -m fakestack.runner -c -p -f schema.json
Or use the installed command:
fakestack -g . # Interactive schema generator
fakestack -d . # Download example
fakestack -c -p -f schema.json
Python API
from fakestack import fakestack
# Download schema
fakestack(['-d', '.'])
# Create and populate database
fakestack(['-c', '-p', '-f', 'schema.json'])
Schema Example
{
"database": {
"db_type": "sqlite",
"db_name": "test.db"
},
"tables": [
{
"name": "users",
"count": 50,
"columns": [
{"name": "id", "type": "INTEGER PRIMARY KEY AUTOINCREMENT"},
{"name": "name", "type": "TEXT", "fake": "name"},
{"name": "email", "type": "TEXT", "fake": "email"},
{"name": "phone", "type": "TEXT", "fake": "phoneformatted"},
{"name": "address", "type": "TEXT", "fake": "address"},
{"name": "created_at", "type": "TEXT", "fake": "date"}
]
}
]
}
Available Options
-g <file>- Generate schema interactively (use '.' for default filename)-d <path>- Download example schema-c- Create database tables-p- Populate tables with fake data-f <file>- Schema file path
Available Fake Data Types
See golang/README.md for complete list of 116+ fake data generators across 12 categories:
- Personal Data & Identifiers
- Financial & Payment
- Address & Location
- Company & Job
- Internet & Technology
- Dates & Times
- Products & E-commerce
- Files & Media
- Books & Entertainment
- Animals & Nature
- Food & Drink
- Vehicles & Transportation
Development
Setup
cd python
pip install -e ".[dev]"
Run Tests
pytest tests/ -v
Code Quality
black fakestack/
isort fakestack/
flake8 fakestack/
How It Works
This package bundles pre-compiled Go binaries for all major platforms. When you run fakestack, the Python wrapper:
- Detects your OS and architecture
- Selects the appropriate binary from
fakestack/bin/ - Executes it with your arguments
- Returns the exit code
This approach provides:
- ✅ Zero runtime dependencies
- ✅ Native performance
- ✅ Easy installation
- ✅ Cross-platform compatibility
License
MIT - See LICENSE file in root directory
Links
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 fakestack-1.1.0.tar.gz.
File metadata
- Download URL: fakestack-1.1.0.tar.gz
- Upload date:
- Size: 23.6 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd00b61171099f196ca1b12140292483aaa83098a5f0e758868dd6a6f4d17349
|
|
| MD5 |
64be74f8726d1aaafe8f678b09efda10
|
|
| BLAKE2b-256 |
936837135d454a9fe7c10f6d534d08c4683ce3438aabcc50e7b447276d07fb75
|
Provenance
The following attestation bundles were made for fakestack-1.1.0.tar.gz:
Publisher:
publish.yml on 0xdps/fake-stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fakestack-1.1.0.tar.gz -
Subject digest:
bd00b61171099f196ca1b12140292483aaa83098a5f0e758868dd6a6f4d17349 - Sigstore transparency entry: 707576184
- Sigstore integration time:
-
Permalink:
0xdps/fake-stack@8b17b8e03b59ba214b1b6b21c47f8e3fdf511158 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/0xdps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8b17b8e03b59ba214b1b6b21c47f8e3fdf511158 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fakestack-1.1.0-py3-none-any.whl.
File metadata
- Download URL: fakestack-1.1.0-py3-none-any.whl
- Upload date:
- Size: 23.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b2dd826b0f612cfec75595173c508d6d311f85929acd68fb0c3003214acb273
|
|
| MD5 |
63c453c3a09febf83ee351df80c1fd3c
|
|
| BLAKE2b-256 |
459bd1e011f1bac59b76ed9100a094859ef9f582f2fb46c7430aa5c6d7c8fc4b
|
Provenance
The following attestation bundles were made for fakestack-1.1.0-py3-none-any.whl:
Publisher:
publish.yml on 0xdps/fake-stack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fakestack-1.1.0-py3-none-any.whl -
Subject digest:
2b2dd826b0f612cfec75595173c508d6d311f85929acd68fb0c3003214acb273 - Sigstore transparency entry: 707576187
- Sigstore integration time:
-
Permalink:
0xdps/fake-stack@8b17b8e03b59ba214b1b6b21c47f8e3fdf511158 -
Branch / Tag:
refs/tags/v1.1.0 - Owner: https://github.com/0xdps
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8b17b8e03b59ba214b1b6b21c47f8e3fdf511158 -
Trigger Event:
push
-
Statement type: