Skip to main content

sverify

Sverify is a working prototype. Its Lean proofs, its checker and its Python code still need a human audit before anyone relies on their results.

How this project is built says who writes it and what you can check yourself.

Sverify proves a data pipeline's contracts in Lean before it runs, keeps the result up to date from Delta and Iceberg changes, and runs the checked plan on DuckDB, Polars and Spark.

It finds the bugs that tests on sample data miss:

How sverify compares with dbt tests, Great Expectations, Soda and data contracts says what it does not do.

In thirty lines

import pyarrow as pa
import sverify as sv
from ibis import _
from sverify.io import Changes, StaticSource

orders = StaticSource(  # in memory; DeltaSource and IcebergSource work the same way
    pa.table({"id": [1, 2], "customer": ["ada", "bob"], "amount": [30, 5]}), name="orders"
)


# The upper bound on amount keeps `amount * 2` within 64 bits. Leave it out and
# the report names the bound to declare.
@sv.transform(
    requires={"orders": [_.amount >= 0, _.amount < 1_000_000_000, sv.unique("id")]},
    ensures=[_.doubled >= 22, _.doubled.notnull(), sv.unique("id")],
)
def big_orders(orders):
    return orders.filter(orders.amount > 10).select(orders.id, doubled=orders.amount * 2)


big = orders.pipe(big_orders)  # proved here, before any data runs
big.refresh()  # computed, on DuckDB by default
orders.apply(Changes(inserts=[(3, "cy", 50)], deletes=[(1, "ada", 30)]))
big.refresh(engine="polars", route="auto")  # updated from the changes alone, on Polars
assert big.to_arrow().to_pylist() == [{"id": 3, "doubled": 100}]
print(big_orders.report)
# proved
# The output guarantees:
#   doubled ≥ 22
#   doubled is never NULL
#   no two rows share id
# ...

print(big_orders.report.details()) goes on with the evidence for each engine, and sverify check prints the same contract. A postcondition that does not follow is refused before anything runs, with the precondition that would make it hold (Contracts).

Install

# skip: installs software on the reader's machine
pip install 'sverify[duckdb]'      # or: uv add 'sverify[duckdb]'; verifies and runs plans on DuckDB, the default engine
pip install sverify                # verifies only, runs nothing
pip install 'sverify[all]'         # with every engine in the 1.x promise and both table formats

Linux and macOS (Python 3.12 and later); Windows through WSL2. Install has the extras, the wheels and the nightly builds.

In CI, sverify check pipelines/orders.py proves every transform and node in the file and exits 0 when all are proved, 1 when one is not, and 3 when a construct is outside sverify's model; --format sarif writes a report for GitHub's code scanning (the command line).

Go on from here

License

Sverify is licensed under the Mozilla Public License 2.0 (MPL-2.0), file by file: your own code stays yours, and a modified version of sverify's own files stays under the MPL with its source shared. python/src/sverify/ibis_substrait/ is derived from ibis-substrait and stays under the Apache License 2.0.

Metadata

Release files for sverify 0.9.0

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

Source distribution (sdist)

Source distribution for sverify 0.9.0
File Size Uploaded Provenance Actions
sverify-0.9.0.tar.gz 3.7 MB With provenance Details for sverify-0.9.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for sverify 0.9.0
File Interpreter ABI Platform Actions
sverify-0.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for sverify-0.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
sverify-0.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for sverify-0.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
sverify-0.9.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for sverify-0.9.0-py3-none-macosx_11_0_arm64.whl

Total release size: 98.4 MB

Release files / sverify-0.9.0.tar.gz

Download URL sverify-0.9.0.tar.gz
Size 3.7 MB
Tags Source
SHA-256 checksum
How to use checksums
63f5368c730490883dfd98541641b357d6b8920237d1e04bb175f0135a658ca1
BLAKE2b-256 checksum
How to use checksums
a98d3e01f7b491f057fd5534b081852c7284d6fe007124a921e6de6b05d63c92
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 24, 2026.

Transparency log

Release files / sverify-0.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl

Download URL sverify-0.9.0-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
Size 32.5 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b9cd1b227d459ee8b1708808e709a3c11486d5542b0232a11838980c394fb502
BLAKE2b-256 checksum
How to use checksums
b8a6ff09c95cffff6a426485ff6c5fdf3cc3f23c148061b2bdaf6fb737f15d5e
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 24, 2026.

Transparency log

Release files / sverify-0.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl

Download URL sverify-0.9.0-py3-none-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
Size 32.4 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
7062d6e6e4c906d661ca37b606a92e4324ca08563a9466cc2d4ce9a1bc94604c
BLAKE2b-256 checksum
How to use checksums
b4b0cc6566600d2870c903004d242c490c34a15edc5b84533445d2e2397a3d5a
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 24, 2026.

Transparency log

Release files / sverify-0.9.0-py3-none-macosx_11_0_arm64.whl

Download URL sverify-0.9.0-py3-none-macosx_11_0_arm64.whl
Size 29.7 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6426717ca5bd3f263437591d042ab5e28a4ea9f81e9e442467473bae5d373e8c
BLAKE2b-256 checksum
How to use checksums
42097c2e58db662e4bf99812d440607d19d7ba36b69ca82434d2f89f085acaa7
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 24, 2026.

Transparency log

Security for sverify 0.9.0

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

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for sverify-0.9.0.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 24, 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