Metadata-Version: 2.4
Name: fakestack
Version: 1.0.1
Summary: Full-stack fake data generator - Generate databases and APIs from JSON schemas
Author-email: Devendra Pratap <dps.manit@gmail.com>
Maintainer-email: Devendra Pratap <dps.manit@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/0xdps/fake-stack
Project-URL: Documentation, https://fake-stack.readthedocs.io/
Project-URL: Repository, https://github.com/0xdps/fake-stack.git
Project-URL: Issues, https://github.com/0xdps/fake-stack/issues
Project-URL: Changelog, https://github.com/0xdps/fake-stack/blob/trunk/CHANGELOG.md
Keywords: faker,dummy,db,database,schema,generate,generator,fakestack,test-data,fake-data,mock,backend,api
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Database
Requires-Python: >=3.8
Description-Content-Type: text/markdown
Provides-Extra: minimal
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx>=5.0.0; extra == "docs"
Requires-Dist: sphinx-rtd-theme>=1.0.0; extra == "docs"
Requires-Dist: myst-parser>=0.18.0; extra == "docs"

<p align="center">
  <img src="https://raw.githubusercontent.com/0xdps/fake-stack/trunk/assets/fake-stack.svg" alt="Fakestack Logo" width="200"/>
</p>

<h1 align="center">Fakestack</h1>

<p align="center">
Python wrapper for the high-performance Fakestack database generator.
</p>

## Installation

```bash
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

```bash
# 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:

```bash
fakestack -d .
fakestack -c -p -f schema.json
```

### Python API

```python
from fakestack import fakestack

# Download schema
fakestack(['-d', '.'])

# Create and populate database
fakestack(['-c', '-p', '-f', 'schema.json'])
```

## Schema Example

```json
{
  "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](../golang/README.md) for complete list of 50+ fake data generators.

## Development

### Setup
```bash
cd python
pip install -e ".[dev]"
```

### Run Tests
```bash
pytest tests/ -v
```

### Code Quality
```bash
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

- PyPI: https://pypi.org/project/fakestack/
- GitHub: https://github.com/0xdps/fake-stack
- Issues: https://github.com/0xdps/fake-stack/issues
