This release is a pre-release and may not be stable for production use.
fairmind (Python SDK)
A small typed client for the FairMind API: read the release gate, run fairness tests, record monitoring snapshots and attestations. One dependency, httpx.
pip install ./apps/sdk # from a checkout; or: uv add ./apps/sdk
export FAIRMIND_API_URL=https://fairmind.example.com
export FAIRMIND_API_KEY=... # minted at POST /api/v1/auth/api-keys
from fairmind import FairMind, FairMindError
fm = FairMind() # reads FAIRMIND_API_URL and FAIRMIND_API_KEY
system = fm.systems()[0]["id"]
run = fm.run_fairness(system, "predictions.csv", outcome="repaid", prediction="approved", attributes=["gender", "region"])
gate = run["gate"]
print(gate["verdict"], gate["confidence"])
for check in gate["checks"]:
print(check["label"], check["state"])
Methods
| Method | Endpoint |
|---|---|
systems() |
GET /systems |
gate(system_id) |
GET /systems/{id}/gate |
clause_map(system_id, frameworks=None) |
GET /systems/{id}/clause-map; frameworks (for example ["EUAIA", "ISO42001"]) filters the result |
seals(system_id) |
GET /systems/{id}/seals |
inspect_csv(system_id, path) |
POST /systems/{id}/fairness-runs/inspect |
run_fairness(system_id, path, *, outcome, attributes, prediction=None, score=None, favorable_label=None) |
POST /systems/{id}/fairness-runs |
fairness_runs(system_id) |
GET /systems/{id}/fairness-runs |
run_monitoring(system_id, path, *, attributes, prediction=None, score=None, favorable_label=None) |
POST /systems/{id}/monitoring-runs |
monitoring_runs(system_id) |
GET /systems/{id}/monitoring-runs |
attest(system_id, check, statement, reference=None) |
POST /systems/{id}/attestations |
evaluations(query=None, pillar=None) |
GET /api/v1/packs/evaluations |
evaluation_engine(evaluation_id) |
GET /api/v1/packs/evaluations/{id}/engine: the files and params it takes |
run_evaluation(system_id, evaluation_id, files=None, params=None, live=False, source="upload") |
POST /api/v1/packs/evaluations/{id}/runs; waits for behaviour-test jobs and returns the stored run |
evaluation_runs(evaluation_id, system_id=None) |
GET /api/v1/packs/evaluations/{id}/runs |
The evaluation methods act in the organisation from FAIRMIND_ORG_ID, or the key's first organisation when it is unset.
attributes is a list or a comma-separated string. run_fairness and run_monitoring need prediction (a 0/1 column) or score (a 0 to 1 column). Responses are plain dicts typed with TypedDicts (Gate, GateCheck, ClauseMap, FairnessRun, MonitoringRun, ...).
Every failure raises FairMindError with status_code (None when the server could not be reached) and message (the server's detail when it sent one).
Tests
cd apps/sdk && uv run --with pytest pytest -q -p no:cacheprovider tests
Metadata
Release files for fairmind 0.3.1a0
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 |
|---|---|---|---|---|
| fairmind-0.3.1a0.tar.gz | 9.9 kB | With provenance | Details for fairmind-0.3.1a0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fairmind-0.3.1a0-py3-none-any.whl | Python 3 | none | any | Details for fairmind-0.3.1a0-py3-none-any.whl |
Total release size: 17.0 kB
Release files / fairmind-0.3.1a0.tar.gz
| Download URL | fairmind-0.3.1a0.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
864be2b03863870708b5a18a1018f6ae3d8c92b85d2da3bab79486cdef9419af
|
|
BLAKE2b-256 checksum How to use checksums |
a85545d76266367583aeab7330dfd316151f1444b095c619d2150bdd7300c5d2
|
| 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 8, 2026.
Transparency logRelease files / fairmind-0.3.1a0-py3-none-any.whl
| Download URL | fairmind-0.3.1a0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3380a8a01148655ce64383c624ef3129638f8e0147c59c2cb75aff195b1587be
|
|
BLAKE2b-256 checksum How to use checksums |
543868da0c267c36b04eeafd23e4f3f595ad007f4331d22238e628f9c0a4ed32
|
| 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 8, 2026.
Transparency logSecurity for fairmind 0.3.1a0
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
Both files in this release have been uploaded with provenance metadata.
Attestation for fairmind-0.3.1a0.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 8, 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.