Skip to main content

ShapeWitness

CI PyPI Python 3.10+ MIT license Runtime dependencies: 0

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.

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.2

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

Source distribution (sdist)

Source distribution for shapewitness 0.1.2
File Size Uploaded
shapewitness-0.1.2.tar.gz 78.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for shapewitness 0.1.2
File Interpreter ABI Platform
shapewitness-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 92.2 kB

Release files / shapewitness-0.1.2.tar.gz

Download URL shapewitness-0.1.2.tar.gz
Size 78.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b221864c86e38da4813a2ee7d1686e4487b1ac61ab0057c169424e5de197321c
BLAKE2b-256 checksum
How to use checksums
98401d89acb1339ee4c9fe99aeeb056e59496bfe1ca79ba235c43e4f31c7b783
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.2-py3-none-any.whl

Download URL shapewitness-0.1.2-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6e1ae4afefed80fc370f843592eeebbfa68dd885c3c2a7224c5ac9461ccfadde
BLAKE2b-256 checksum
How to use checksums
315835f26e85e8066592c27148e3026c4a7681544ee8205726e184a1675b57ed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

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