Skip to main content

Decision Trace v1 SDK

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decision_trace-0.1.0.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decision_trace-0.1.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

Details for the file decision_trace-0.1.0.tar.gz.

File metadata

  • Download URL: decision_trace-0.1.0.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decision_trace-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d589bec137ede6268777e33699d233a9c55f9691105f94a85d15c698bc930110
MD5 5c30e8963a74ef1762ba764874a7bcda
BLAKE2b-256 804af252bf502520e80bb596d75e86e1bca8fef8bd8202a8a1bf9b63912e7da6

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace-0.1.0.tar.gz:

Publisher: publish-python.yml on logicoflife/decision-trace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file decision_trace-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: decision_trace-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decision_trace-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47cd83fcf534d382b9e3c814b121f67c9ff55d7c2085ca4adc03c6b22b8c5b11
MD5 0d12b80b3c3643f40f0a7abd92ead9fb
BLAKE2b-256 2e61e7f521b283b6500b1b0aa675af7e4ae7e179c61c4df4f24e40d684b25f88

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace-0.1.0-py3-none-any.whl:

Publisher: publish-python.yml on logicoflife/decision-trace

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page