Skip to main content

fid for Python

How much a stored fact can still be trusted, from Python. The scoring, envelopes, registries and calibration all run in fid's Rust library; this package gives them a Python shape.

fidelity = baseline + (source × ∏(1 − noise) − baseline) × 0.5^(age / half_life)

See the fid repository for the model and the results it was calibrated on.

Install

pip install fidmeter          # then: import fid

Build from source

pip install maturin
cd bindings/python
maturin develop --release     # into the active virtualenv
python -m unittest discover -s tests

Use

import fid
from datetime import timedelta

# Score and gate
artifact = fid.stamp({"ceo": "Ada"}, source="registry", source_class="database",
                     half_life="5.8y")
fid.check(artifact, floor=0.7).status          # Status.SIGNAL (== 0, the CLI exit code)
fid.expires_at(artifact, floor=0.7)            # datetime when it falls below the floor

# Pipelines: stamping a stamped artifact appends a transform step
step = fid.stamp(artifact, source="summarize.py", noise=0.15)
print(fid.chain(step))

# Measured values from registries
half_life, baseline = fid.half_life("half-lives.yaml", "vessel_position", "underway")
noise = fid.noise("noise-model.yaml", "flight_leg", "previous_leg_late")

# The formula on its own
fid.fidelity(0.97, timedelta(hours=1), "2.9h", baseline=0.73)
fid.time_to_floor(0.97, "7d", 0.70, baseline=0.2)   # timedelta, or None if never

# Calibrate from facts you re-checked: (entity, age, still correct?, [state])
cal = fid.calibrate(rows, "policy_claim")
open("half-lives.yaml", "w").write(cal.yaml)
print(cal.report)
Function Returns
stamp(content, *, source, source_class, noise, half_life, baseline, type, state, condition, upstream, now) stamped dict {"fid": …, "content": …}
check(stamped, floor, *, now) Assessment with status (Status.SIGNAL / NOISE / UNKNOWN), fidelity, age, …
expires_at(stamped, floor) datetime, or None if it never falls below; IndeterminateError for an unknown source
chain(stamped, floor, *, now) the fid chain report
fidelity(source, age, half_life, *, noise, baseline) float
time_to_floor(fidelity, half_life, floor, *, baseline) timedelta, or None for never
half_life(path, type, state) / noise(path, transform, condition) registry lookups
calibrate(rows, type) Calibration with yaml, report, fits

Durations are strings ("30d", "6h"), seconds, or timedelta. Times must be timezone-aware. Errors raise ValueError.

Metadata

Release files for fidmeter 0.1.1

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

Source distribution (sdist)

Source distribution for fidmeter 0.1.1
File Size Uploaded Provenance Actions
fidmeter-0.1.1.tar.gz 92.4 kB With provenance Details for fidmeter-0.1.1.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fidmeter 0.1.1
File Actions
fidmeter-0.1.1-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for fidmeter-0.1.1-cp39-abi3-win_amd64.whl
fidmeter-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for fidmeter-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fidmeter-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for fidmeter-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fidmeter-0.1.1-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for fidmeter-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
fidmeter-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for fidmeter-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 3.0 MB

Release files / fidmeter-0.1.1.tar.gz

Download URL fidmeter-0.1.1.tar.gz
Size 92.4 kB
Tags Source
SHA-256 checksum
How to use checksums
859298cdbd23b76703d022224e479f0474d5325d4452e5eea68b3032ec06f84c
BLAKE2b-256 checksum
How to use checksums
2f624b4d805bcd7e081705ccf441e0861a84db088786ebf57106c3b3db5edb1a
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 Oct 17, 2026.

Transparency log

Release files / fidmeter-0.1.1-cp39-abi3-win_amd64.whl

Download URL fidmeter-0.1.1-cp39-abi3-win_amd64.whl
Size 483.2 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
4bb31f91cb92b5e21434c8dd6888372a3b624b9cc7bfc2a5a3f71d42c9afc99e
BLAKE2b-256 checksum
How to use checksums
d4fb57e99a3332920eb97cf11278357d71768e7d83d7a9d61d7f6c92af6705f1
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 Oct 17, 2026.

Transparency log

Release files / fidmeter-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fidmeter-0.1.1-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 645.2 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
b63fb71d9a83d02f736d387b26e9b6131ac98e31884da989273f6f28fff79b02
BLAKE2b-256 checksum
How to use checksums
b8bb058e37d25bee8371562ede4724c95f58c3854d4a07768a27119f4bcf76ea
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 Oct 17, 2026.

Transparency log

Release files / fidmeter-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fidmeter-0.1.1-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 622.6 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
d0341f6fdd8663a68bb3df2a6b7760422ce73f60403c41107c12c1d104a78688
BLAKE2b-256 checksum
How to use checksums
f668733508a01e2c5771107a45b1aa0b80ce6e9b19fae78ba0564671bca82af1
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 Oct 17, 2026.

Transparency log

Release files / fidmeter-0.1.1-cp39-abi3-macosx_11_0_arm64.whl

Download URL fidmeter-0.1.1-cp39-abi3-macosx_11_0_arm64.whl
Size 571.0 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
e88b8f0fb95f23848411419e74ad848bf153163f721029f0eed1518706107738
BLAKE2b-256 checksum
How to use checksums
a3870ae31edec794aca93b5f0f190005c8a924e8473493d40f0c17e1a91ea031
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 Oct 17, 2026.

Transparency log

Release files / fidmeter-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl

Download URL fidmeter-0.1.1-cp39-abi3-macosx_10_12_x86_64.whl
Size 584.9 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
0a2933992f86ee50d8f73b6ef94995be11e6e6b93c63eb66320358da74cdb454
BLAKE2b-256 checksum
How to use checksums
a0cfa30f941617258c1acb71c35954289992357ed3b5c1be2d0f734462e30e6b
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 Oct 17, 2026.

Transparency log

Security for fidmeter 0.1.1

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 6 files in this release have been uploaded with provenance metadata.

Select from 6 files

Attestation for fidmeter-0.1.1.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 Oct 17, 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