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 |
registry(path, type, state) |
{half_life, baseline, source_fidelity}, ready for stamp(**…) |
calibrate(rows, type, max_spread=2.5) |
Calibration with yaml, report, fits (each fit has 95% ranges) |
Durations are strings ("30d", "6h"), seconds, or timedelta. Times
must be timezone-aware. Errors raise ValueError.
Metadata
Release files for fidmeter 0.2.0
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 |
|---|---|---|---|---|
| fidmeter-0.2.0.tar.gz | 164.1 kB | With provenance | Details for fidmeter-0.2.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| fidmeter-0.2.0-cp39-abi3-win_amd64.whl | CPython 3.9 | abi3 | Windows x86-64 | Details for fidmeter-0.2.0-cp39-abi3-win_amd64.whl |
| fidmeter-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ x86-64 | Details for fidmeter-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| fidmeter-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl | CPython 3.9 | abi3 | Linux glibc 2.17+ ARM64 | Details for fidmeter-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
| fidmeter-0.2.0-cp39-abi3-macosx_11_0_arm64.whl | CPython 3.9 | abi3 | macOS 11.0+ ARM64 | Details for fidmeter-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
| fidmeter-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl | CPython 3.9 | abi3 | macOS 10.12+ x86-64 | Details for fidmeter-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl |
Total release size: 3.8 MB
Release files / fidmeter-0.2.0.tar.gz
| Download URL | fidmeter-0.2.0.tar.gz |
|---|---|
| Size | 164.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b0480ad4c9cb7cb5920414ef07591e89528190caf11756dd919fb694ba26cace
|
|
BLAKE2b-256 checksum How to use checksums |
c69a6d8307daac748c1e1c668adaed4892a0a30290e904293fddcec713e77bbc
|
| 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 16, 2026.
Transparency logRelease files / fidmeter-0.2.0-cp39-abi3-win_amd64.whl
| Download URL | fidmeter-0.2.0-cp39-abi3-win_amd64.whl |
|---|---|
| Size | 634.1 kB |
| Tags | CPython 3.9 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
7ef0ae5603de91a879a7ff8c0172fe88b305f7eae2fc8e851a002d5f6e7d10ff
|
|
BLAKE2b-256 checksum How to use checksums |
69812079f4dc29c94ba3abd7856a00660308e9b9e9a2fc4fc62f19a903e17c3f
|
| 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 16, 2026.
Transparency logRelease files / fidmeter-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | fidmeter-0.2.0-cp39-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 800.1 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
e719bcf516824a84d6ba9d5a477c310d1961d8eab83c2a062941658106aaa836
|
|
BLAKE2b-256 checksum How to use checksums |
6de1cfe2c9ccff55152a8de2b627f1a0a96df191cf403d58ede32a0c39f195fc
|
| 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 16, 2026.
Transparency logRelease files / fidmeter-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl
| Download URL | fidmeter-0.2.0-cp39-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.whl |
|---|---|
| Size | 772.8 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
26cf1bc3bd3582b0bb350cbf111a6145d4f08a29383ecd8834ad1c4eb1e1ef10
|
|
BLAKE2b-256 checksum How to use checksums |
29fb3848551802082883ba176ea79f9361b7bfcd83896431a4da37b56d437373
|
| 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 16, 2026.
Transparency logRelease files / fidmeter-0.2.0-cp39-abi3-macosx_11_0_arm64.whl
| Download URL | fidmeter-0.2.0-cp39-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 713.0 kB |
| Tags | CPython 3.9 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
5aa97c87c3f6b02e8fc591617f24db9acc25657ae467a621419aeb07f972a15b
|
|
BLAKE2b-256 checksum How to use checksums |
16b54bf1867150f1d8c438a85a977195b9ee1025c23754f5fd231a3b8345194f
|
| 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 16, 2026.
Transparency logRelease files / fidmeter-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl
| Download URL | fidmeter-0.2.0-cp39-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 733.2 kB |
| Tags | CPython 3.9 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
f881f2375374c23fa3d0f54995c6b4060e7444a48cf30070a6401b0e2175c1af
|
|
BLAKE2b-256 checksum How to use checksums |
3b917d26e32d26c915339ff7aa06c88229f219cc37bc23ee1c5448fe76e2efc3
|
| 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 16, 2026.
Transparency logSecurity for fidmeter 0.2.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 6 files in this release have been uploaded with provenance metadata.
Attestation for fidmeter-0.2.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 16, 2026.
Transparency logA 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.