Shape
Shape by SQLLocks — Shape as Code: a portable, executable description of how data behaves, not merely its schema.
Early access. Profiling is available now; data generation and pipeline integration are in progress. See
docs/plans/COMPLETION_PLAN.md.
Install with pip install sqllocks-shape. Python imports use import shape, the
command is shape, and artifacts use the .shape extension.
Quick start
import shape
p = shape.profile("customers.csv") # also: Parquet, JSONL, Delta tables, pandas, pyarrow
shape.save(p, "customers.shape")
print(p.summary()) # small JSON-safe summary per column
result = shape.check(p, {"columns": {"customer_id": {"unique": True, "nullable": False}}})
print(result.passed, result.violations)
drift = shape.diff(shape.load("customers.shape"), shape.profile("customers_next.csv"))
print(drift.drifted, drift.changes)
shape profile customers.csv -o customers.shape --html report.html --json summary.json
shape check customers.shape contract.json # exit code 1 if the contract fails
shape diff customers.shape customers_next.shape --fail-on-drift
What a .shape file contains
A profile keeps real values from your data, as Spindle's profiler does: up to the 500
most frequent values per column with their counts, and each column's minimum and maximum.
Treat a .shape file, its HTML report and its JSON summary as you would the source data,
and don't share one from a sensitive table. A privacy-safe profile, with rare values
suppressed, is planned.
Design principles
- evidence carries provenance and algorithm parameters
- deterministic generation and replay
- offline by default: no network access or cloud service is required
.shapereaders fail closed on unsafe or corrupt containers
See docs/PRODUCT_ARCHITECTURE.md and docs/specs/.
License
MIT. See LICENSE and THIRD_PARTY_NOTICES.md.
Metadata
Release files for sqllocks-shape 0.9.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 | |
|---|---|---|---|
| sqllocks_shape-0.9.0.tar.gz | 427.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sqllocks_shape-0.9.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 584.2 kB
Release files / sqllocks_shape-0.9.0.tar.gz
| Download URL | sqllocks_shape-0.9.0.tar.gz |
|---|---|
| Size | 427.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cbd1177305224576e83af34c43a3e4cafefb1d06166b9c1a549a511c17596193
|
|
BLAKE2b-256 checksum How to use checksums |
b7ee76fb710312764f3fb48518abba8adff67bbb572542cb558f090df49bb9e0
|
| 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 Sep 30, 2026.
Transparency logRelease files / sqllocks_shape-0.9.0-py3-none-any.whl
| Download URL | sqllocks_shape-0.9.0-py3-none-any.whl |
|---|---|
| Size | 157.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a32fece5d7127fbef9d124fb295fc85739c9d40605ad62e943d0923778a9aa9e
|
|
BLAKE2b-256 checksum How to use checksums |
9afd5093e23807ec33e752559e138b15c25370ffa3f5b431502e1bf9003ce2b7
|
| 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 Sep 30, 2026.
Transparency log