ShapeWitness
Small JSONL fixtures that show the shapes your code needs to handle.
head -n 20 often gives you twenty happy-path rows. ShapeWitness keeps the records
with missing fields, nulls, empty collections, and mixed types, then explains why
each row was selected.
- Real records: original bytes, numeric precision, whitespace, and line endings
- Explainable coverage: observed structural features, uncovered gaps, source hashes
- Reproducible and local: deterministic selection, bounded disk spooling, no network calls
Install
Python 3.10+ with SQLite support. Available on PyPI:
python -m pip install shapewitness
# Isolated CLI alternatives:
uvx shapewitness --help
pipx install shapewitness
For a source checkout, use python -m pip install .. Pin a version or reviewed
commit for reproducibility. See release guidance.
Ten-second demo
From a checkout:
shapewitness examples/events.jsonl -n 4 --report coverage.json > fixture.jsonl
# shapewitness: 4/6 rows; 19/19 observed features; complete
Lines 1, 3, 4, and 5 survive. See the input,
selected fixture, and explanation.
Use --require-complete to fail CI when the selected rows leave observed features uncovered.
Opt into --number-mode syntax for integer versus fractional/exponent witnesses;
see the numeric feature model.
Version 0.1.3 also compares baseline/current structural inventories for CI and keeps
known problem rows with SHA-256 checked pins. Try the complete
pytest + GitHub Actions regression case.
Read next
| I want to… | Start here |
|---|---|
| Use the CLI, pipes, or Python API | Usage |
| Build pytest fixtures, test ETL, or reproduce an importer bug | Recipes |
| Inspect a reproducible head/random comparison | Synthetic benchmark |
| Build a wheel or prepare a release | Release readiness |
| Understand null, missing, arrays, and tie-breaking | Feature model |
| Verify selected bytes and coverage explanations | Provenance |
| Check strict input rules, resource limits, and privacy | Limits & privacy |
| Understand the implementation or contribute | Architecture · Development |
| Work on this repository with an agent | Agent guide |
| Compare the scope with JSONLKit and jselect | Related tools |
Know the boundaries: this is greedy structural coverage, not a statistically representative sample, an optimal minimum set, or a schema guarantee. Selected rows retain private data; reports can expose property names. Details.
Documentation index · Contributing · Security · Changelog · MIT license
Metadata
Release files for shapewitness 0.1.3
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 |
|---|---|---|---|---|
| shapewitness-0.1.3.tar.gz | 102.5 kB | Without provenance | Details for shapewitness-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shapewitness-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for shapewitness-0.1.3-py3-none-any.whl |
Total release size: 120.2 kB
Release files / shapewitness-0.1.3.tar.gz
| Download URL | shapewitness-0.1.3.tar.gz |
|---|---|
| Size | 102.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e1b61e8d20096f7175d0f2b6578c9b7af424f2fb516cd950a4b87e5ce371b83
|
|
BLAKE2b-256 checksum How to use checksums |
c0d3a12206abb0b8cbda6bf4df2e0168766807ab0c34f2575c2f86d080f3cd19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / shapewitness-0.1.3-py3-none-any.whl
| Download URL | shapewitness-0.1.3-py3-none-any.whl |
|---|---|
| Size | 17.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e02c8a2667d251f89e19f463036c9c129f58fcdc788140e483aa06c550bb2b5
|
|
BLAKE2b-256 checksum How to use checksums |
a7ff7067998241630c273ea10ff3cdb101c2aa4b3706e599894eb33b88da5c12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for shapewitness 0.1.3
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.