A schema-aware data generation and testing platform for Python
Project description
PyCatalyst
Schema-aware data generation and testing: recipes (YAML), REST API, optional UI, schema inference, and ML hooks.
Documentation
-
Published (GitHub Pages): optophi.github.io/pycatalyst — start with Getting Started → Quick Start.
-
Local docs (from repo root):
pip install "pycatalyst[docs]" pycatalyst docs serve
Opens at http://127.0.0.1:5005 by default. Static site:
pycatalyst docs build→site/. -
Live API (when the server is running): http://127.0.0.1:8005/docs (Swagger).
Tutorial index in the doc site: Quick Start, API authentication, generate, recipes, infer schema, workbench.
Installation
pip install pycatalyst
API server, DB, and common extras:
pip install "pycatalyst[api,db,inference,faker]"
From source (editable):
git clone https://github.com/optophi/pycatalyst
cd pycatalyst
pip install -e ".[dev]"
Quick Start (CLI)
pycatalyst api --port 8005
pycatalyst generate --recipe path/to/recipe.yaml -n 10
See the Quick Start page in the docs for database setup, UI, and REST examples.
Streaming mock data
Python — same sequence as batch generation for a fixed seed:
from pycatalyst import GenerationEngine, SchemaBuilder
engine = GenerationEngine()
schema = SchemaBuilder("events").add_uuid("id").add_string("kind").build()
for row in engine.iter_records(schema, seed=123, limit=1000):
process(row)
HTTP (Server-Sent Events) — POST /api/v1/stream/sse with the same field list as /generate, plus max_records and optional interval_ms. Use curl -N and a Bearer token when auth is enabled:
curl -N -H "Authorization: Bearer YOUR_JWT" -H "Content-Type: application/json" \
-d '{"name":"x","fields":[{"name":"n","type":"int"}],"max_records":5,"seed":1}' \
http://127.0.0.1:8005/api/v1/stream/sse
CLI — NDJSON to stdout (one JSON object per line):
pycatalyst stream ndjson --schema my.json -n 500 --seed 1
CLI — Kafka (pip install pycatalyst[kafka]):
export PYCATALYST_STREAM_KAFKA_BOOTSTRAP=localhost:9092
export PYCATALYST_STREAM_KAFKA_TOPIC=test-topic
pycatalyst stream kafka --schema my.json -n 2000 --batch 100
Server caps (optional): PYCATALYST_STREAM_MAX_RECORDS, PYCATALYST_STREAM_MAX_INTERVAL_MS.
Development
- Lint & format:
ruff check . && ruff format . - Type check:
mypy src/ - Tests:
pytest - Coverage:
pytest --cov=pycatalyst --cov-report=term-missing
Publishing
- Bump version in
pyproject.tomlandCHANGELOG.md. - Create a release tag:
git tag v0.1.0 && git push origin v0.1.0. - The GitHub Action uses PyPI Trusted Publishing; configure the publisher on PyPI for this repo, then the workflow will publish on tag push.
License
MIT
Project details
Release history Release notifications | RSS feed
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 pycatalyst-0.0.13.tar.gz.
File metadata
- Download URL: pycatalyst-0.0.13.tar.gz
- Upload date:
- Size: 2.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94876d491db7075d63d812283536b44dc6773dd359ddfdf196ecf75532547079
|
|
| MD5 |
5c3557673c1c01b9cec8d840c2b4b00d
|
|
| BLAKE2b-256 |
ed288b5330403fe7ee02251f3e7f9883f68ff7975fb93414bbc6e40746fb9ee6
|
Provenance
The following attestation bundles were made for pycatalyst-0.0.13.tar.gz:
Publisher:
publish.yml on optophi/pycatalyst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycatalyst-0.0.13.tar.gz -
Subject digest:
94876d491db7075d63d812283536b44dc6773dd359ddfdf196ecf75532547079 - Sigstore transparency entry: 1242869417
- Sigstore integration time:
-
Permalink:
optophi/pycatalyst@ec59f39b0ac291c14f3a9556c46f1227a0a4b350 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/optophi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec59f39b0ac291c14f3a9556c46f1227a0a4b350 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pycatalyst-0.0.13-py3-none-any.whl.
File metadata
- Download URL: pycatalyst-0.0.13-py3-none-any.whl
- Upload date:
- Size: 2.1 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 |
2ce40d12c357c0e2c385357d98cf716ed58ebaf48239337dee45625659d4cd80
|
|
| MD5 |
23aa3393fc2041d33460023f51dda4bb
|
|
| BLAKE2b-256 |
49d27f550c465be38d0f8cffc98fe5079d176798e3c2de59405a71058cb3719e
|
Provenance
The following attestation bundles were made for pycatalyst-0.0.13-py3-none-any.whl:
Publisher:
publish.yml on optophi/pycatalyst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pycatalyst-0.0.13-py3-none-any.whl -
Subject digest:
2ce40d12c357c0e2c385357d98cf716ed58ebaf48239337dee45625659d4cd80 - Sigstore transparency entry: 1242869457
- Sigstore integration time:
-
Permalink:
optophi/pycatalyst@ec59f39b0ac291c14f3a9556c46f1227a0a4b350 -
Branch / Tag:
refs/tags/v0.0.13 - Owner: https://github.com/optophi
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ec59f39b0ac291c14f3a9556c46f1227a0a4b350 -
Trigger Event:
push
-
Statement type: