Skip to main content

Trust Infrastructure SDK for Enterprise AI - Evidence Packets, Tokenization, and Governance

Project description

DigiTrust SDK

Trust Infrastructure for Enterprise AI — Govern every AI workflow with verifiable Evidence Packets.

Quick Start

pip install digitrust-sdk

3-Line Integration

from digitrust_sdk import DigiTrustClient

client = DigiTrustClient(endpoint="https://controlplane.digitranshq.com")

packet = client.govern(
    workflow="claims-triage",
    model="anthropic.claude-3-5-sonnet",
    payload={"claim_id": "CLM-9921", "patient_note": "Follow-up requested"},
    purpose="Classify insurance claim priority",
    actor="user:analyst@company.com",
)

print(packet.status)        # "complete"
print(packet.packet_hash)   # "sha256:a1b2c3..."
print(packet.decision)      # "allow"

What Happens in Those 3 Lines

  1. Classify — Payload is scanned for sensitive data (PII, PHI, financial)
  2. Decide — Policy engine evaluates risk and determines action
  3. Transform — Sensitive values are tokenized (never sent raw to the model)
  4. Approve — Human review triggered if required by policy
  5. Route — Request routed through approved model path with guardrails
  6. Prove — Evidence Packet sealed with SHA-256 hash chain

The returned packet is a complete, verifiable proof of governance.

Core Operations

Protect Data (Tokenize)

protected = client.protect(
    payload={"name": "Alice Smith", "ssn": "123-45-6789"},  # digitrust:allow-sensitive-pattern-example
    workflow="data-pipeline",
)

print(protected.token_refs)       # ["dtok_a1b2_c3d4_e5f6"]
print(protected.contains_pii)    # True
print(protected.raw_stored)      # False (always)

Verify a Packet

report = client.verify(packet)

print(report.status)             # "verified"
print(report.integrity_valid)    # True
print(report.completeness)       # 100.0

Batch Tokenization

results = client.batch_protect(
    records=[
        {"id": "r1", "payload": {"email": "user@example.com"}},
        {"id": "r2", "payload": {"phone": "555-0100"}},
    ],
    workflow="etl-pipeline",
)

Check Trust Posture

posture = client.posture()

print(posture.status)            # "compliant"
print(posture.compliance_rate)   # 98.5
print(posture.prai_level)        # "L2"

Verification CLI

# Verify a packet from file
digitrust verify evidence-packet.json

# Verify against a remote endpoint
digitrust verify evidence-packet.json --endpoint https://controlplane.digitranshq.com

Evidence Packet Standard

This SDK implements the Evidence Packet Open Standard v1.0. Any tool producing conforming packets is interoperable.

Links

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

digitrust_sdk-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

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

digitrust_sdk-0.1.0-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for digitrust_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 309ffacec2fa6bd812c095bdee6f5df1fc8a4a005f76ab9c5aa27a87b05ca6e1
MD5 e76ff27571915f8d72745df13f034951
BLAKE2b-256 ad42894223741b5e332586eef834176061f095e5b4d7da15573576f3ce2aa4a9

See more details on using hashes here.

Provenance

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

Publisher: publish-sdk.yml on DigiTrans-App/Controle-Plane

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

File details

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

File metadata

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

File hashes

Hashes for digitrust_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 689905f7ec5f5d38b71a88567df5eb1b922a053ae37aec79ef806ee6c64b4e66
MD5 d9414784a22a5588b414dd0ce0e96d67
BLAKE2b-256 2b0ae830fe6e357cd492a504b250ae4ed800e1e090ed61e7ed9e76558946bf12

See more details on using hashes here.

Provenance

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

Publisher: publish-sdk.yml on DigiTrans-App/Controle-Plane

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