Skip to main content

DriftGate Python SDK (sync client) for headless governance runtime APIs.

Project description

DriftGate Python SDK

Canonical V4 envelope SDK for Python.

See canonical envelope docs: docs/sdk/response-envelope.md.

Install

pip install driftgate-sdk

Hello World (2 lines)

session = client.session.start(agent="refund-agent")
session.execute(input={"orderId": "123"})

Full Example

from driftgate_sdk import DriftGateClient

client = DriftGateClient(
    base_url="https://api.driftgate.ai",
    bearer_token="token",
)

session = client.session.start(
    agent="refund-agent",
    policy={"ref": "refund", "version": "2026-02"},
    route={"provider": "openai", "model": "gpt-4.1-mini", "region": "us-east-1"},
    risk={"decision": "review"},
)

response = session.execute(input={"orderId": "123"})
print(response.meta.request_id, response.meta.execution_id)

Legacy v1 Surface (Backward Compatible)

  • run(...)
  • status(run_id)
  • events(run_id)
  • wait_for_terminal(run_id, timeout_seconds=..., poll_interval_seconds=...)
  • approvals_list(workspace_id, status=None)
  • approve(approval_id)
  • deny(approval_id)

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

driftgate_sdk-0.1.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

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

driftgate_sdk-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for driftgate_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 081833a39c7134a825ed17c1a8470757ac6e02eb6cbdebb2ceac96cf10d54ddd
MD5 c3e6aba4e4336d1261a73a35dad4c7b2
BLAKE2b-256 ff18bbc2663dc52c8a7d71a36d68984577231fa833fbbccc398420e5692935fe

See more details on using hashes here.

Provenance

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

Publisher: publish-python-sdk-public.yml on driftgate/driftgate

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

File details

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

File metadata

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

File hashes

Hashes for driftgate_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a773de535797d445d70b1d215a6d22c7b479dd10ef9b583e3e533f499ebc42e
MD5 d7ba4296c656bc4b597c350f11b45abc
BLAKE2b-256 1462a585900833f920478735cde08d2098395be3902b6e6cf1109036b939351e

See more details on using hashes here.

Provenance

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

Publisher: publish-python-sdk-public.yml on driftgate/driftgate

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