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.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 fidmeter 0.1.0
File Size Uploaded Provenance Actions
fidmeter-0.1.0.tar.gz 62.2 kB With provenance Details for fidmeter-0.1.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for fidmeter 0.1.0
File Actions
fidmeter-0.1.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for fidmeter-0.1.0-cp39-abi3-win_amd64.whl
fidmeter-0.1.0-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.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
fidmeter-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl CPython 3.9 abi3 Linux glibc 2.17+ ARM64 Details for fidmeter-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
fidmeter-0.1.0-cp39-abi3-macosx_11_0_arm64.whl CPython 3.9 abi3 macOS 11.0+ ARM64 Details for fidmeter-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
fidmeter-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl CPython 3.9 abi3 macOS 10.12+ x86-64 Details for fidmeter-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl

Total release size: 2.9 MB

Release files / fidmeter-0.1.0.tar.gz

Download URL fidmeter-0.1.0.tar.gz
Size 62.2 kB
Tags Source
SHA-256 checksum
How to use checksums
7fa1cb51fd18794bfbecc55c2b1f6a2baba0e1f6139d03eeda566533c307fcb7
BLAKE2b-256 checksum
How to use checksums
cd6fc6c39e735359e4517d2a1323bd0a59691b49150924942caeb56a184d49cc
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.0-cp39-abi3-win_amd64.whl

Download URL fidmeter-0.1.0-cp39-abi3-win_amd64.whl
Size 458.3 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
db04774ad863423fa6d5248d0e0ed6278e8f4f0c0c1e4b4dd914aa2bb0a69173
BLAKE2b-256 checksum
How to use checksums
1bfa856478236fcfe1e6244050ceca9ad59b25897b2f6a5145773b20dec113c5
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.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL fidmeter-0.1.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 619.8 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
6b31997140e0b326d5c4ec560764f3ad77c756306a196e8eadb3fc49af9aeb24
BLAKE2b-256 checksum
How to use checksums
628df770630f511a54cd508ff02be9c90d7758b15f47bd6d505728a3adb80832
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.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

Download URL fidmeter-0.1.0-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Size 601.4 kB
Tags CPython 3.9 Linux glibc 2.17+ ARM64 abi3
SHA-256 checksum
How to use checksums
aa4d9fb7701498f5a5cfedbc1c3a36b89c2b786e833bdcbef97aa5394b0175a3
BLAKE2b-256 checksum
How to use checksums
6884060b2323fcdd7f5f3702e7bea9a8108a7cca82e477d440db0fbdf32336a4
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.0-cp39-abi3-macosx_11_0_arm64.whl

Download URL fidmeter-0.1.0-cp39-abi3-macosx_11_0_arm64.whl
Size 550.3 kB
Tags CPython 3.9 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1a9817bd3d801249e48db85fdacfe895bd6721a69c0e33ac42c54a0f893f44f9
BLAKE2b-256 checksum
How to use checksums
7f4f4d7ed7d41bce3fb3afaa30934284705aa65d9f235f92bfa6537e3a84d62b
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.0-cp39-abi3-macosx_10_12_x86_64.whl

Download URL fidmeter-0.1.0-cp39-abi3-macosx_10_12_x86_64.whl
Size 561.1 kB
Tags CPython 3.9 abi3 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
7e4af313c68afaf688b3e6d9fd0e5e672abfec600a15b0f1d08935ea1a47b6c5
BLAKE2b-256 checksum
How to use checksums
431ccf02db740bd3ed49a9ad959f1587dd75d1ef8eaba93db1705c148e5d72e4
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.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.

Select from 6 files

Attestation for fidmeter-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 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