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.0rc1.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.0rc1-py3-none-any.whl (9.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: driftgate_sdk-0.1.0rc1.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.0rc1.tar.gz
Algorithm Hash digest
SHA256 d00aaf808b64ba3c925da77687567f86d92332ae97ad5f33d1d80022ace44ce2
MD5 b503d7b3d28f0c8498d79c8dcf7c9ad0
BLAKE2b-256 aebf107bbbe5cea1263c24b21f0d864c9387dfa445a4350f0d9c83bc1c12f9db

See more details on using hashes here.

Provenance

The following attestation bundles were made for driftgate_sdk-0.1.0rc1.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.0rc1-py3-none-any.whl.

File metadata

File hashes

Hashes for driftgate_sdk-0.1.0rc1-py3-none-any.whl
Algorithm Hash digest
SHA256 7946d3640eabad0b68f641781f021f924d075c083baf7fdf5c4141e1d2ac8fd5
MD5 be23b1c38ba4ca3afbcfe31168a88ddf
BLAKE2b-256 c72deca127c54767393ef51eac704542a41e3b434ca128b2f4493982c4551258

See more details on using hashes here.

Provenance

The following attestation bundles were made for driftgate_sdk-0.1.0rc1-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