synthgen
Turn a schema into synthetic data. Point at a .sql file or an OpenAPI
spec, get back realistic rows with foreign keys that resolve, semantic
hints (emails stay @example.com, phones stay in the NANP fictional
range), and a signed manifest so the output can't be mistaken for real
production data later.
pip install schema-to-synth
Then:
synthgen generate --schema schema.sql --rows 100 --out out/
Quickstart
# Generate 100 rows per table from a SQL DDL file.
synthgen generate --schema schema.sql --rows 100 --out out/
# Same, but JSON output.
synthgen generate --schema schema.sql --rows 100 --out out/ --format json
# From an OpenAPI spec.
synthgen generate --openapi petstore.yaml --rows 50 --out out/
# With per-column overrides (weights, bounds).
synthgen generate --schema schema.sql --overrides my.yaml --rows 100 --out out/
Reproducible with --seed, strict-by-default policy (no network calls
ever), and a .synthgen_manifest.json written to every output directory
carrying the SHA-256 of your schema and a "SYNTHETIC" classification
tag.
What's included
- SQL DDL ingester (every major dialect via sqlglot)
- OpenAPI 3.x / Swagger 2.0 ingester
- Schema-only generation with foreign-key integrity
- Composite primary-key uniqueness
- Semantic hints — emails, phones, addresses rendered in reserved ranges
- CSV / JSON output
- Per-column overrides: weighted values, numeric/date bounds, null rate
- Per-table row counts via overrides
- Signed provenance manifest
- Reproducible with
--seed - Capped at 100 rows per table
What's not in this edition
Features present in the code but reserved for a full edition in development — invoking them exits cleanly with a "not included in this edition" message:
- Preset library (
ecommerce,saas,fintech) - Joint groups (coherent
state × countrypairs) - Reference-CSV joint groups
- Live-API probe modes (fingerprint / sample)
- Streaming output (10M+ rows without OOM)
- Parquet output
- Calibration (per-column KS/TV, cross-column joints, correlation)
- HMAC-signed audit logs
- Row counts above 100 per table
Security posture
- Air-gapped. No network calls, period. The code to probe live APIs is not shipped in this edition.
- Synthetic data is classified. Every manifest records
"classification": "SYNTHETIC — not personal data"so downstream pipelines don't accidentally treat the output as PII. - Emails end in
@example.com. (RFC 2606 reserved domain.) - Phones are in the
555-01xxrange. (NANP fictional block.) - Composite PKs stay unique; FK references always resolve to a real parent row.
License
Elastic License 2.0 — see LICENSE.
You can read, use, modify, and redistribute this software for your own purposes. You cannot provide it as a hosted or managed service to third parties, and you cannot remove or circumvent license-key functionality. See the license text for the full terms.
Project status
v0.1.0 — first public release.
Metadata
Release files for schema-to-synth 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| schema_to_synth-0.1.0.tar.gz | 45.0 kB | Without provenance | Details for schema_to_synth-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| schema_to_synth-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for schema_to_synth-0.1.0-py3-none-any.whl |
Total release size: 95.7 kB
Release files / schema_to_synth-0.1.0.tar.gz
| Download URL | schema_to_synth-0.1.0.tar.gz |
|---|---|
| Size | 45.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2ac7950a63b5a569fe5e29f36bc6e76e31f037784f2ef214f6e38dc103a1510f
|
|
BLAKE2b-256 checksum How to use checksums |
4c5ddaa22a95193fb5fd7b7af9cf2808679f70e2bffcfc0270d757ee88fe3fc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Release files / schema_to_synth-0.1.0-py3-none-any.whl
| Download URL | schema_to_synth-0.1.0-py3-none-any.whl |
|---|---|
| Size | 50.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
900332d3d7740949274cc2200d3b1d4cbebca659c6ab547f60ae651858e6c8f7
|
|
BLAKE2b-256 checksum How to use checksums |
25089f859edc8060e6c15f2794f3fe46485c882e8cecc975e0ecb22bc61634a5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.15.2
|
Security for schema-to-synth 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.