Blueprint
Blueprint is a pure-Python library for generating realistic synthetic datasets. Define features, population segments, and causal relationships between columns — then emit a reproducible pandas.DataFrame in one call.
from blueprint import Blueprint, Feature, Class, Influence
df = (
Blueprint(n=1000, seed=42)
.add_feature(
Feature("sqft", dtype=int, base=1800, std=400, clip=(500, 5000)),
Feature("price", dtype=float, base=0, std=0, derived=True),
Feature("tax", dtype=float, base=0, std=0, derived=True),
)
.add_class(Class("luxury", when=("sqft", ">=", 2500)))
.add_influence(
Influence("sqft").on("price", effect="+155 per unit"),
Influence("price").on("tax", effect="+0.012 per unit"),
)
.emit()
)
How it works
emit() runs the pipeline in this order: generate starting values, resolve class membership, regenerate overridden rows, determine dependency order for influence chains, apply influences, then compute formula columns last.
Why Blueprint?
Most synthetic data tools generate columns independently. Blueprint lets you specify why one column affects another — and preserves those relationships in the output:
- Features — numeric, boolean, categorical, datetime, text/template, computed, and derived columns
- Classes — named population segments that override feature parameters for a subset of rows
- Influences — causal edges (
source → target) with rich effect types, optional row-level noise, class-conditional behavior, and gating conditions - Dependency graph — influence chains are ordered so source columns are updated before columns that depend on them, which keeps chains like
sqft → price → taxconsistent - Reproducibility — every run with the same
seedproduces identical data; influence noise has its own deterministic sub-seed per edge
Installation
pip install blueprint-synth
Requires Python 3.10+ and only depends on numpy and pandas.
import blueprint
Coding agent support
Blueprint ships an Agent Skill that teaches Claude Code and other compatible agents how to use this library — the effect-string grammar, the derived accumulator idiom, and the failure modes that produce wrong data rather than errors. Install it once after pip:
blueprint-synth install-skill
That copies the skill to ~/.claude/skills/blueprint-synth/. Use --dest for a different location and --force to overwrite an existing copy.
Feature overview
Features
Feature("age", dtype=int, base=35, std=10, clip=(18, 80))
Feature("active", dtype=bool, p=0.7)
Feature("tier", dtype="category", values=["bronze", "silver", "gold"], weights=[5, 3, 1])
Feature("joined", dtype="datetime", start="2020-01-01", end="2024-12-31")
Feature("user_id", dtype="id", style="uuid4") # or "uuid1", "sequential", "prefixed"
Feature("score", dtype="computed", formula=lambda df: df["a"] * 2 + df["b"])
Feature("revenue", dtype=float, base=0, std=0, derived=True) # accumulates from influences only
Modifiers chain onto any numeric feature: .trend(), .seasonality(), .noise(), .clip(), .round().
Classes (population segments)
Class("high_value", when=("income", ">=", 100000))
Class("churned", when=("days_inactive", ">", 90))
Class("sampled", when=("__random__", 0.2)) # random 20% of rows
Class("custom", when=lambda df: df["x"] > df["y"])
Override any feature parameter for rows that match a class:
Class("vip", when=("tier", "==", "gold")).override("spend", base=5000, std=800)
Influences (causal relationships)
Influence("sqft").on("price", effect="+155 per unit") # per-unit additive
Influence("has_pool").on("price", effect="+8%") # percentage
Influence("is_member").on("fee", effect="-20") # flat additive (boolean source)
Influence("region").on("price", by_class={ # class-conditional
"urban": "+15%", "suburban": "+5%"
}, effect="+0%")
Influence("distance").on("price", # custom function
fn=lambda src, tgt, df: tgt - src * 250)
Add row-level noise to any numeric effect for more realistic variation:
Influence("sqft").on("price", effect="+155 per unit", noise_std=0.1)
# effective rate ~ N(155, 15.5) per row, fully reproducible
Output formats
df = bp.emit() # pandas DataFrame
df = bp.emit(describe=True) # prints blueprint summary first
df = bp.emit(manifest="meta.json") # writes a JSON config sidecar
bp.to_csv("data.csv")
bp.to_json("data.json", manifest="meta.json")
Notebook guide
The docs/notebooks/ directory contains a step-by-step notebook series covering every aspect of the library:
| Notebook | Topic |
|---|---|
| 01 — Getting Started | Installation, minimal example, reproducibility |
| 02 — Features Deep Dive | All dtype options, modifiers, computed & derived columns |
| 03 — Classes | Population segments, condition types, presets |
| 04 — Influences | Effect strings, by_class, when=, fn=, noise_std, presets |
| 05 — The Dependency DAG | Topological sort, cycle detection, visualization |
| 06 — Assembly & Emission | Blueprint construction, validate, describe, emit, output formats |
| 07 — Presets & Recipes | Class and influence presets, starter recipes |
Note that the notebooks are still a work in progress, but should be completed soon. Thank you for your patience.
Preset library
from blueprint.presets.classes import RandomClass, HighValueClass, LowValueClass, OutlierClass
from blueprint.presets.influences import ScalesWith, CorrelatedWith, Caps
bp.add_class(HighValueClass("rich", feature="income", top_pct=0.2))
bp.add_influence(CorrelatedWith("income", "spend", correlation=0.75))
bp.add_influence(Caps("experience", "salary", threshold=10, decay=0.05))
License
MIT — see LICENSE.
Metadata
Release files for blueprint-synth 0.1.1
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 |
|---|---|---|---|---|
| blueprint_synth-0.1.1.tar.gz | 37.3 kB | With provenance | Details for blueprint_synth-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| blueprint_synth-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for blueprint_synth-0.1.1-py3-none-any.whl |
Total release size: 68.4 kB
Release files / blueprint_synth-0.1.1.tar.gz
| Download URL | blueprint_synth-0.1.1.tar.gz |
|---|---|
| Size | 37.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c8c4897230e7c86d110e2ba10cb87cd0e4bb93debc44f289afe3167d03ce4958
|
|
BLAKE2b-256 checksum How to use checksums |
a130f045f30882f5f782bbd5a1125ee739af892830fe93afedfc614a99e8162d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logRelease files / blueprint_synth-0.1.1-py3-none-any.whl
| Download URL | blueprint_synth-0.1.1-py3-none-any.whl |
|---|---|
| Size | 31.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b748f0cf7fbc8aeec8538f53cdf5664ab8b9e1c2d0abc17dbe66a60fe45b7512
|
|
BLAKE2b-256 checksum How to use checksums |
f8e2a207417ad353344913d83c9850869ba12720fc66b44c49e4485d7f8a84c6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logSecurity for blueprint-synth 0.1.1
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for blueprint_synth-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 31, 2026.
Transparency logA 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.