Skip to main content

Full-stack fake data generator - Generate databases and APIs from JSON schemas

Project description

Fakestack Logo

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
  • 50+ Fake Data Generators: Built on gofakeit
  • Multi-Database Support: SQLite, MySQL, PostgreSQL
  • Fast: 10-100x 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

# 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 -d .
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

  • -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 50+ fake data generators.

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:

  1. Detects your OS and architecture
  2. Selects the appropriate binary from fakestack/bin/
  3. Executes it with your arguments
  4. 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

fakestack-1.0.1.tar.gz (19.4 MB view details)

Uploaded Source

Built Distribution

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

fakestack-1.0.1-py3-none-any.whl (19.5 MB view details)

Uploaded Python 3

File details

Details for the file fakestack-1.0.1.tar.gz.

File metadata

  • Download URL: fakestack-1.0.1.tar.gz
  • Upload date:
  • Size: 19.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fakestack-1.0.1.tar.gz
Algorithm Hash digest
SHA256 bc8e22da65d4d2d3d532f2fdee91cf3ea63f1a9047e02c49495e3f2e7e944dab
MD5 2e01af2b3e0a6a400eac2f8f3fa26a0b
BLAKE2b-256 7a9f9ea8d471a0b44f98a01e8904b59584e494d297f347a5934736b1e9285298

See more details on using hashes here.

Provenance

The following attestation bundles were made for fakestack-1.0.1.tar.gz:

Publisher: publish.yml on 0xdps/fake-stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fakestack-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: fakestack-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for fakestack-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfc00944c6fbc5947fdcf35e813f707adef1cc19d95ced1de93c44325cb6fdfc
MD5 4e7b499c1476d975449056505005f93e
BLAKE2b-256 dad6cd427ea4933ec9cd6b698fba59d89fc2ca2448d0eeb8df5db4a4b42c2c3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for fakestack-1.0.1-py3-none-any.whl:

Publisher: publish.yml on 0xdps/fake-stack

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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