Decision Trace Python SDK
The Python SDK provides the core tracing API, CLI, examples, and local collector workflow for Decision Trace.
Install
pip install decision-trace
Install the optional local collector dependencies if you want the bundled FastAPI collector and decision-trace dev workflow:
pip install "decision-trace[collector]"
Quickstart
from decision_trace import decision
with decision("loan.approval", actor={"type": "system", "id": "risk_engine"}) as d:
d.evidence("credit_score", 720)
d.policy_check("min_score_700", "pass")
d.outcome("approved")
Local Collector
Start the local collector:
decision-trace dev
This binds a local-only example collector on 127.0.0.1:8711 and writes events to ./data/events.jsonl.
Development
pip install -e ".[collector,test]"
pytest
Docs And Examples
Metadata
Release files for decision-trace 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| decision_trace-0.1.1.tar.gz | 25.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| decision_trace-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.7 kB
Release files / decision_trace-0.1.1.tar.gz
| Download URL | decision_trace-0.1.1.tar.gz |
|---|---|
| Size | 25.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4dbb8b0a6206ee508d7c3c514c6901f5992095552eb899fd74d7cccce5cbfcc2
|
|
BLAKE2b-256 checksum How to use checksums |
92213be3ccdd66f6ed04842a94fe6375be6768554f53514090e0b1967d516591
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 21, 2026.
Transparency logRelease files / decision_trace-0.1.1-py3-none-any.whl
| Download URL | decision_trace-0.1.1-py3-none-any.whl |
|---|---|
| Size | 30.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3122f84c8aefe1160f9f72cfb9df8589d33580a72488e9683e4c4667cf179297
|
|
BLAKE2b-256 checksum How to use checksums |
31be0fee4f1f4ccbb8fb0e2437fb018ad68f39870366848fa6431c3172210cd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 21, 2026.
Transparency log