Skip to main content

tanny

tanny checks Python's temporal typing. temporal-typing declares how a program's state may change, as ordinary Python annotations; tanny reads them from source, without running it, gives each model its meaning in TLA⁺, and model checks it with Manyan, in process. It is written in Rust.

uv tool install tanny   # or: pip install tanny
tanny check examples/
PASS bank_account.py::small_account_model  884 states; deposit.amount ∈ 1..3, withdraw.amount ∈ 1..3; bounded by state_constraint
FAIL die_hard.py::impl_model  invariant not_solved
    1. init: small=0, big=0
    2. fill_big(): small=0, big=5
    3. pour_big_to_small(): small=3, big=2
    ...

Each Model(...) in the files gets one verdict, as the checker specification says: PASS with what was checked, FAIL with its kind (invariant, conformance, refinement, assertion, runtime, ...) and a trace in Python terms, or ERROR with a diagnostic at a file:line. It exits 0 when every verdict is PASS, 1 on a FAIL, 2 on an ERROR; --json gives the verdicts as JSON.

tanny check --root src/ tests/specs/    # search src/ for imports first
tanny check -m impl_model die_hard.py   # one model
tanny translate die_hard.py impl_model  # the TLA⁺ it is checked as

How

Crate Does
tanny the executable: a verdict per model
tanny-cli its command line
tanny-frontend checker.md §1–3, §6: reads the declarations from source with ruff's parser
tanny-translate §4–5: Python, with Python's meaning, as TLA⁺
manyan checks TLA⁺ with Manyan in process, and gives what it found as values
manyan-sys Manyan's C API, built from its source (a submodule)

A method body runs on a record of the state and its locals; a loop is a recursive operator. Every obligation that is not an invariant or property (conformance of a body to its Action, Ensures, the frame, assert, a contract, an index out of range) is an Assert whose message names its kind, so a FAIL says which one failed. A refinement is an INSTANCE of the abstract specification's module under the mapping, checked part by part: init, step, each fairness clause, invariants and properties.

Development

git clone --recursive https://github.com/soasme/tanny
make check        # cargo test, clippy, fmt, and the conformance suite
make conformance  # the verdicts temporal-typing's suite and examples state
uv run tanny check tests/temporal-typing/examples

The conformance suite is temporal-typing's own (tests/checker and examples, a submodule at the release checked against).

License

MIT; see LICENSE.

Metadata

Release files for tanny 0.1.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 tanny 0.1.0
File Size Uploaded Provenance Actions
tanny-0.1.0.tar.gz 394.2 kB With provenance Details for tanny-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for tanny 0.1.0
File Actions
tanny-0.1.0-py3-none-manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.28+ x86-64 Details for tanny-0.1.0-py3-none-manylinux_2_28_x86_64.whl
tanny-0.1.0-py3-none-manylinux_2_28_aarch64.whl Python 3 none Linux glibc 2.28+ ARM64 Details for tanny-0.1.0-py3-none-manylinux_2_28_aarch64.whl
tanny-0.1.0-py3-none-macosx_11_0_x86_64.whl Python 3 none macOS 11.0+ x86-64 Details for tanny-0.1.0-py3-none-macosx_11_0_x86_64.whl
tanny-0.1.0-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for tanny-0.1.0-py3-none-macosx_11_0_arm64.whl

Total release size: 8.0 MB

Release files / tanny-0.1.0.tar.gz

Download URL tanny-0.1.0.tar.gz
Size 394.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0bbf8e0014261875cfd3cb91d79eebd7f02c019c1068c3413df1aec98d04eb94
BLAKE2b-256 checksum
How to use checksums
8f90497dd355b7ce28213d8218c25aa7e7722cae87a8c6202fa4efb45b930c3c
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 29, 2026.

Transparency log

Release files / tanny-0.1.0-py3-none-manylinux_2_28_x86_64.whl

Download URL tanny-0.1.0-py3-none-manylinux_2_28_x86_64.whl
Size 1.9 MB
Tags Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
88b545bde71f32b5556c97e7be2d88047659d1f6b9ac89d2a0bc0c295964d0a2
BLAKE2b-256 checksum
How to use checksums
64a65e9245a08ae8dbe3a9724dad858f11d5a51a817e84040986b129ec3526f7
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 29, 2026.

Transparency log

Release files / tanny-0.1.0-py3-none-manylinux_2_28_aarch64.whl

Download URL tanny-0.1.0-py3-none-manylinux_2_28_aarch64.whl
Size 1.9 MB
Tags Linux glibc 2.28+ ARM64 Python 3
SHA-256 checksum
How to use checksums
85a1b8ebec7bcb81880c879a50cbbe12c25b44a6eab4b0326f8b179d98203118
BLAKE2b-256 checksum
How to use checksums
7f75d6eb45377d3295e7a5eb877eb33e78977f6c6e1a99bc2dff43fa9b9ac5e6
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 29, 2026.

Transparency log

Release files / tanny-0.1.0-py3-none-macosx_11_0_x86_64.whl

Download URL tanny-0.1.0-py3-none-macosx_11_0_x86_64.whl
Size 1.9 MB
Tags Python 3 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
21a2f8b45dbc792a04ba064ad51a34de62f21197c0112fe4a0f16dc688289386
BLAKE2b-256 checksum
How to use checksums
3e549ee946792c761827dd1196cdb5248f7b768fe5369c27355773f89c2bbb7d
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 29, 2026.

Transparency log

Release files / tanny-0.1.0-py3-none-macosx_11_0_arm64.whl

Download URL tanny-0.1.0-py3-none-macosx_11_0_arm64.whl
Size 1.9 MB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
040554c5d7c4a4c0137b408304f8bdcdb5c00edccda85f470245d35d70bf8c78
BLAKE2b-256 checksum
How to use checksums
edce6f27ec9281ba506e1bb3c48079811bdddb7f5092bf2f59c78a1a3420242a
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 29, 2026.

Transparency log

Security for tanny 0.1.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 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for tanny-0.1.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 29, 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

5 release files Full provenance

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