Skip to main content

Ectype

Learn the statistical fingerprint of a table, generate unlimited realistic rows from it, and prove how faithful they are.

Python License: Apache-2.0 Status: alpha Local-first

Quickstart · Features · Uses · Guide · Format spec


An ectype is a faithful reproduction of an original: the counterpart of an archetype.

Ectype learns a fingerprint of your table: a small, portable, inspectable file that captures how your data behaves. That includes distributions, dependencies, missingness, constraints, time patterns and relationships between tables. From the fingerprint you can generate any number of rows, simulate what-if scenarios and detect drift, and you never need the original data again.

The validator also measures fidelity on held-back targets the generator was never tuned on, so the report reflects how well the generator reproduces the data rather than how well the optimizer did its job.

your table ──fit──▶ fingerprint.dfp ──generate──▶ 10 rows … 10 million rows
                         │                               │
                         ├──compare──▶ drift report      └──validate──▶ evidence report
                         └──mutate / merge──▶ what-if scenarios

Quickstart

pip install ectype-data

The package is published on PyPI as ectype-data. You import it as ectype, and the command is ectype.

import polars as pl
import ectype

df = pl.read_csv("customers.csv")

fp = ectype.fit(df)                                  # learn the fingerprint, with the defaults
fp.save("customers.dfp")                             # a small file of statistics, no raw rows

synthetic = ectype.Generator.from_fingerprint("customers.dfp").generate(1_000_000, seed=42)

print(ectype.validate(fp, synthetic).summary())      # calibration | sealed | holdout, never merged
ectype.report(fp).to_html("profile.html")            # one page that describes the table

The defaults fit the closest model within a work budget. ectype.fit(df, effort="fast") fits in the shortest time, and effort="best" fits in full however wide the table is.

Or with no code at all:

ectype profile customers.csv -o customers.dfp
ectype report customers.dfp -o profile.html          # the profile report
ectype generate customers.dfp --rows 1000000 -o synthetic.parquet
ectype validate customers.dfp synthetic.parquet --html report.html

The Quickstart walks through the same loop on a sample table, with every output shown.

Features

🧬 A fingerprint, not a black box

  • One portable .dfp file: JSON plus NumPy arrays plus checksums.
  • Loading never executes code. No pickle and no eval; it fails closed on tampering and on oversized or malformed archives.
  • Inspect it, diff it and keep it in version control.
  • Read it as a one-page profile report (ectype report): every column, how columns move together and what the policy did, drawn from the fingerprint alone. Give it two fingerprints to see what drifted between them.
  • A published JSON Schema, so any language can read it.

🎯 Honest validation

  • Targets are split into calibration (what the optimizer sees) and sealed (hash-committed evidence it never sees).
  • An optional real holdout adds row-level checks, including nonlinear classifier two-sample tests.
  • Reports never collapse into one flattering score.
  • A shareable HTML report, plus exit codes for CI.

📈 Real statistical modeling

  • Marginals selected by held-out fit (parametric families or policy-limited empirical).
  • Mixed types, nulls and categories modeled jointly, with rank-matched latent correlations that stay accurate for tied and discrete data.
  • A chain model of sequential conditional trees is the default, for the closest match; copula, mixture, vine and forest models are a keyword away, and joint="auto" compares them by measured fit. effort="fast" | "balanced" | "best" if you think in time, not models.
  • Conditional tables for category-to-category structure, and an optional neural model for shapes a copula can't express.

🔒 Privacy by default

  • Every fingerprint is fitted under a disclosure policy (strict, standard or research). The policy pools rare categories, coarsens quantiles and keeps exact extremes out of the fingerprint, even on small tables.
  • Combinations of values held by fewer rows than the policy's minimum (10 under standard) are not stored, in pairwise tables or in the chain model's trees.
  • Columns that look personal (names, phone numbers, e-mail and postal addresses) are pseudonymised by default: modeled as categories and generated as stand-in tokens, with no real value in the fingerprint or the output.
  • Unique keys are regenerated in the same shape, never copied: an id, or a column with one e-mail address per row. Keys that point to another record (a parent record, an order number on its lines) come out as fresh keys with the source's repeat structure.
  • A built-in attack suite: membership inference, distance-to-closest-record and attribute inference, gated against null distributions.
  • DP building blocks (analytic Gaussian mechanism) with a privacy-budget accountant.

📏 Rules your data obeys

  • Declare constraints (start <= end) and derived columns (total = qty * price).
  • Relationships found for you: dates that stay in order, weekday and year columns that agree with their date, parts that add up to their total, and working-week patterns.
  • Inferred constraints are suggestions (bounds, comparisons between columns), with multiplicity-aware confidence; none binds until you confirm it. A relationship that holds on every row, such as a column computed from another, is applied for you and listed by ectype inspect.
  • Generated values follow the fitted distribution, so a few can fall outside the observed range; declare a bound (age <= 100) to hold them inside one.
  • Enforcement by derivation, rejection or repair, with exact row counts.
  • Calibration corrects the distortion that enforcement introduces, and says so when a target can't be reached.

🕰️ Time, tables and scenarios

  • Time series: trend, seasonality and AR models; panels of entities; event streams (Poisson and Hawkes processes).
  • Multi-table schemas with 100% referential integrity.
  • What-if scenarios: shift a mean, widen a spread, change category shares, add drift or mix populations, whatever the joint model. Setting a correlation directly takes a fingerprint fitted with effort="fast".
  • Scenarios are plain, reviewable requests, and each one reports what it achieved against what you asked for.

🔍 Drift detection

  • Compare two fingerprints with no data and no generation, and pinpoint which columns and pairs moved.
  • Comparisons fail closed: an inconclusive comparison never passes as "no drift".
  • Drop ectype compare --fail-on-drift into CI to catch silent data changes.

⚙️ Built for real workflows

  • A complete CLI and Python API.
  • Read from CSV, Parquet, Arrow, pandas, Polars or SQL through DuckDB, with read-only guards.
  • Out-of-core profiling with mergeable sketches, and parallel generation that is byte-identical to sequential.
  • Fully local: no cloud, GPU or LLM required.

What people use it for

Anywhere real data is needed but hard to use: it is locked down, it holds personal details, there is not enough of it, or it does not exist yet.

By the job to be done

Job Examples
Build and test software Lifelike test databases, load tests at 100 times your volume, migration rehearsals, reproducible bug reports, test data in CI
Develop analytics and models Prototype before access is granted, share a working sample with a vendor, tutorial data that runs for everyone
Share across a boundary Between teams, with partners and auditors, with researchers and students, across regions where rows must stay put
Watch for change Month-over-month drift checks, pipeline gates, acceptance checks on vendor deliveries
Explore what could happen What-if scenarios, more of the rare cases, data for a table that does not exist yet
Teach, demonstrate and sell Product demos, training environments, classroom datasets, hackathons

By industry

Industry Examples
Banking and payments Transactions for testing fraud rules; loan applications for credit-model development
Insurance Policies and claims for pricing prototypes; shareable samples for reinsurers
Healthcare and life sciences Encounter and claims tables for health IT testing; teaching datasets; trial-style tables
Retail and e-commerce Orders, baskets and returns; store-by-day sales series for forecasting
Telecommunications Usage records for billing tests; subscriber tables for churn analysis
Manufacturing Sensor logs for maintenance software; inspection tables for quality dashboards
Energy and utilities Meter readings for billing and forecasting; outage and work-order tables
Logistics and transportation Shipments and delivery events; fleet and ridership tables
Government Permits, inspections and service requests; shareable versions of administrative tables
Education and research Course datasets; companion data for publications that cannot release the original
Human resources Employee and payroll tables for software testing; workforce scenarios
Marketing and customer analytics Campaign and survey tables for building reports before fieldwork ends
Software and SaaS Seed data for demos, trials and sandboxes
Cybersecurity and IT operations Log and event tables for testing detection rules; training exercises
Real estate and construction Listings, permits and bids for analysis and estimating tools
Nonprofits and development Beneficiary and survey tables for case-management tools and analyst training

The full list has more examples for each, and the cases Ectype is not designed for.

How well does it work?

Closer to real data than every deep-learning synthesizer we tested, on a CPU, in seconds.

A head-to-head on nine public datasets with five seeds each: every method at its library defaults, every score taken on held-out real rows that no method saw.

Method Classifier AUC (0.5 = cannot tell from real) Mean rank Quality Utility kept Worst-case membership AUC Median fit
Sequential trees (CART) 0.596 1.0 0.980 98.3% 0.533 2 s, CPU
Ectype (chain model) 0.700 2.6 0.975 97.8% 0.508 10 s, CPU
Diffusion (Synthcity TabDDPM) 0.744 3.4 0.908 97.3% 0.505 6.4 min, GPU
Deep autoregressive (MOSTLY AI SDK) 0.790 3.7 0.966 96.3% 0.507 2.3 min, GPU
Adversarial random forest (ARF) 0.941 6.8 0.922 97.0% 0.517 3.9 min, CPU
VAE (SDV TVAE) 0.975 8.0 0.896 89.9% 0.505 2.9 min, GPU
GAN (SDV CTGAN) 0.976 8.1 0.882 88.5% 0.505 6.5 min, GPU
Gaussian copula (SDV) 0.994 9.3 0.869 86.8% 0.506 6 s, CPU
  • Second of ten methods at passing for real data, and ahead of every deep-learning model tested.
  • 97.8% of real-data predictive score kept by models trained on Ectype's rows (median).
  • Membership-inference attacks score at chance: at most 0.508 on any dataset. Sequential trees rank first on fidelity by emitting values sampled from real rows, and they have the highest worst-case membership score of any method (0.533).
  • Beyond the benchmark: run on 29 further public government, health and finance tables, from 184 rows to 60,000-row samples and up to 287 columns, with no failures. It fits a 2.4-million-row, 78-column table on a desktop CPU.

Every number, every method and every dataset, including where others lead, is in the benchmark report. Ectype's chain model was tuned on two of the nine datasets; the diffusion model failed on 2 of its 45 runs.

Why Ectype?

Ectype
Saved model A declarative .dfp file: inspectable, diffable, and safe to load (no code runs)
Fidelity evidence Sealed targets the generator never saw, plus an optional real holdout, reported separately
Privacy A disclosure policy on every fit, stand-ins for personal columns, and a built-in attack suite
Useful without generating Profile reports and drift comparisons straight from the fingerprint
Rules Declared or confirmed constraints hold on every generated row
Runs where A laptop, CI or an air-gapped server: CPU only, no network

Install

pip install ectype-data                 # core: polars, numpy, scipy, pyarrow, pydantic
pip install "ectype-data[temporal]"     # time-series models
pip install "ectype-data[sql]"          # DuckDB sources
pip install "ectype-data[pandas]"       # pandas in and out
pip install "ectype-data[llm]"          # optional: draft scenarios from plain English
pip install "ectype-data[all]"          # all of the above

The PyPI name is ectype-data; the import name and the command are both ectype. Python 3.11, 3.12 and 3.13 on Linux, macOS and Windows. Installation has the details.

Documentation

The user guide runs from installation and a five-minute walkthrough to time series, multi-table data, privacy, drift checks in CI and the full CLI and Python API reference. A test executes every example in the guide.

Status

Version 0.1.1, covered by 2,758 automated tests, including one that runs every example in the user guide. The fingerprint format is 0.4.0, versioned separately from the package: a newer engine reads every fingerprint written by an older one of the same major format version, and the repository keeps a saved fingerprint of each released format that every test run loads. Versions and compatibility has the full set of promises.

Contributing

Contributions are welcome. See CONTRIBUTING.md; contributors sign the CLA on their first pull request. Three rules matter most:

  • format changes need an ADR;
  • no pickle or eval;
  • fidelity claims must come from sealed targets or a real holdout.

License

Licensed under Apache-2.0. Copyright 2026 ZeroPoint Holdings LLC. "Ectype" is a trademark of ZeroPoint Holdings LLC.

Metadata

Release files for ectype-data 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ectype-data 0.1.1
File Size Uploaded Provenance Actions
ectype_data-0.1.1.tar.gz 2.0 MB With provenance Details for ectype_data-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ectype-data 0.1.1
File Interpreter ABI Platform Actions
ectype_data-0.1.1-py3-none-any.whl Python 3 none any Details for ectype_data-0.1.1-py3-none-any.whl

Total release size: 2.8 MB

Release files / ectype_data-0.1.1.tar.gz

Download URL ectype_data-0.1.1.tar.gz
Size 2.0 MB
Tags Source
SHA-256 checksum
How to use checksums
bb2cca23fa8ab086582de920d3b65266cca1ca00e84ec32b943e9f247f95becc
BLAKE2b-256 checksum
How to use checksums
b5d10e570a87cb5c9499131cd8d53d9b4dda41581376b0fec2aa670f93215abf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Release files / ectype_data-0.1.1-py3-none-any.whl

Download URL ectype_data-0.1.1-py3-none-any.whl
Size 787.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f6ea9c8261f26278d622df5ce1e1a3afb5d49fd89b668e9765bb0acee9d0a6da
BLAKE2b-256 checksum
How to use checksums
5cd5a34c2b22f33cdd6a5490f1d2f08ac300200f3a8554b7a9e18509b278ee95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 27, 2026.

Transparency log

Security for ectype-data 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.

Select from 2 files

Attestation for ectype_data-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 Nov 27, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page