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.1.tar.gz (25.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.1-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: decision_trace-0.1.1.tar.gz
  • Upload date:
  • Size: 25.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.1.tar.gz
Algorithm Hash digest
SHA256 4dbb8b0a6206ee508d7c3c514c6901f5992095552eb899fd74d7cccce5cbfcc2
MD5 27bd600161786be9a8a8844b50d3756e
BLAKE2b-256 92213be3ccdd66f6ed04842a94fe6375be6768554f53514090e0b1967d516591

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: decision_trace-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3122f84c8aefe1160f9f72cfb9df8589d33580a72488e9683e4c4667cf179297
MD5 5fd53b8e85e055e3eaf11a4209663270
BLAKE2b-256 31be0fee4f1f4ccbb8fb0e2437fb018ad68f39870366848fa6431c3172210cd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for decision_trace-0.1.1-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