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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d00aaf808b64ba3c925da77687567f86d92332ae97ad5f33d1d80022ace44ce2
|
|
| MD5 |
b503d7b3d28f0c8498d79c8dcf7c9ad0
|
|
| BLAKE2b-256 |
aebf107bbbe5cea1263c24b21f0d864c9387dfa445a4350f0d9c83bc1c12f9db
|
Provenance
The following attestation bundles were made for driftgate_sdk-0.1.0rc1.tar.gz:
Publisher:
publish-python-sdk-public.yml on driftgate/driftgate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driftgate_sdk-0.1.0rc1.tar.gz -
Subject digest:
d00aaf808b64ba3c925da77687567f86d92332ae97ad5f33d1d80022ace44ce2 - Sigstore transparency entry: 1016881659
- Sigstore integration time:
-
Permalink:
driftgate/driftgate@2a98c1e0e912ebe23e8216b2d604351bdecdc30a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/driftgate
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk-public.yml@2a98c1e0e912ebe23e8216b2d604351bdecdc30a -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file driftgate_sdk-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: driftgate_sdk-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7946d3640eabad0b68f641781f021f924d075c083baf7fdf5c4141e1d2ac8fd5
|
|
| MD5 |
be23b1c38ba4ca3afbcfe31168a88ddf
|
|
| BLAKE2b-256 |
c72deca127c54767393ef51eac704542a41e3b434ca128b2f4493982c4551258
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
driftgate_sdk-0.1.0rc1-py3-none-any.whl -
Subject digest:
7946d3640eabad0b68f641781f021f924d075c083baf7fdf5c4141e1d2ac8fd5 - Sigstore transparency entry: 1016881715
- Sigstore integration time:
-
Permalink:
driftgate/driftgate@2a98c1e0e912ebe23e8216b2d604351bdecdc30a -
Branch / Tag:
refs/heads/main - Owner: https://github.com/driftgate
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-python-sdk-public.yml@2a98c1e0e912ebe23e8216b2d604351bdecdc30a -
Trigger Event:
workflow_dispatch
-
Statement type: