Metadata-Version: 2.4
Name: chox-sdk
Version: 0.1.0
Summary: Python SDK for Chox — AI governance proxy
Author-email: Chox <founders@chox.ai>
License-Expression: MIT
Project-URL: Homepage, https://github.com/Deogan7/Chox
Keywords: chox,ai,governance,proxy,agent,sdk
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"

# chox-sdk

Python SDK for [Chox](https://chox.ai) — AI governance proxy.

## Install

```bash
pip install chox-sdk
```

## Quickstart

```python
from chox import ChoxClient

chox = ChoxClient(base_url="https://chox.example.com", token="chox_token_...")

verdict = chox.evaluate(tool="stripe.create_charge", arguments={"amount": 5000})
if verdict.verdict == "allow":
    pass  # proceed
```

## Config

| Parameter | Type | Default | Description |
|---|---|---|---|
| `base_url` | `str` | required | Chox gateway base URL |
| `token` | `str` | required | Admin key (`chox_admin_...`) or caller token (`chox_token_...`) |
| `fail_open` | `bool` | `True` | Return allow verdict on network errors instead of raising |
| `timeout` | `float` | `5.0` | Request timeout in seconds |

## Resources

```python
# Evaluate a tool call
chox.evaluate(tool, arguments=None, caller_token=None, context=None)

# Projects
chox.projects.create(name=..., slug=...)
chox.projects.get()

# Callers (AI systems)
chox.callers.create(name=..., description=...)
chox.callers.list()
chox.callers.delete(id)

# Integrations
chox.integrations.create(name=..., integration_type=..., destination_url=...)
chox.integrations.list()
chox.integrations.delete(id)

# Logs
chox.logs.list(caller_id=None, integration=None, action_type=None, start=None, end=None, limit=None, offset=None)
chox.logs.get(id)

# Stats
chox.stats.actions(start=None, end=None)
chox.stats.hourly(start=None, end=None)
chox.stats.integrations(start=None, end=None)
chox.stats.total()
```

## License

MIT
