Metadata-Version: 2.4
Name: driftgate-sdk
Version: 0.1.0rc1
Summary: DriftGate Python SDK (sync client) for headless governance runtime APIs.
Author: DriftGate
License-Expression: Apache-2.0
Project-URL: Homepage, https://docs.driftgate.ai
Project-URL: Documentation, https://docs.driftgate.ai/sdk
Project-URL: Repository, https://github.com/driftgate/driftgate-sdk
Project-URL: Issues, https://github.com/driftgate/driftgate-sdk/issues
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0.0; extra == "dev"

# DriftGate Python SDK

Canonical V4 envelope SDK for Python.

See canonical envelope docs: [`docs/sdk/response-envelope.md`](/Users/jordandavis/Documents/Code/DriftGateAI/driftgate-v4-sdk-wt/docs/sdk/response-envelope.md).

## Install

```bash
pip install driftgate-sdk
```

## Hello World (2 lines)

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

## Full Example

```python
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)`
