Metadata-Version: 2.4
Name: trigguard
Version: 0.2.2
Summary: TrigGuard product SDK — authorize, verify, receipt, explain via POST /v1/authorize
Home-page: https://github.com/TrigGuard-AI/TrigGuard
Author: TrigGuard AI
License-Expression: MIT
Project-URL: Homepage, https://www.trigguardai.com
Project-URL: Repository, https://github.com/TrigGuard-AI/TrigGuard
Project-URL: Documentation, https://github.com/TrigGuard-AI/TrigGuard/blob/main/docs/adoption/PYTHON_FIRST_10_MINUTES.md
Keywords: trigguard,authorization,execution,receipts,ai-governance
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: cryptography>=41.0.0
Dynamic: home-page
Dynamic: requires-python

# TrigGuard (Python)

Same product as `npm install trigguard`. Different language.

```bash
pip install trigguard
```

```python
from trigguard import authorize, verify, receipt, explain, create_client

result = authorize(surface="deploy.release", actor="agent-1")
if result["decision"] == "PERMIT":
    # caller executes
    pass
```

Decisions: `PERMIT | DENY | ESCALATE | SILENCE`. This package does **not** evaluate policy. It calls the TrigGuard gateway.

## Product API (parity with Node)

| Concept | Python | JavaScript |
|---------|--------|------------|
| Authorize | `authorize()` | `authorize()` |
| Verify | `verify()` | `verify()` |
| Receipt | `receipt` | `receipt` |
| Explain | `explain()` | `explain()` |
| Client | `create_client()` | `createClient()` |
| Agent helper | `create_trigguard()` then `authorize()` | `createAgent()` |

## Runtime

```
authorize() → TrigGuard Gateway → compiled policy → PERMIT | DENY | ESCALATE | SILENCE → caller executes
```

AuthGraph is a separate companion (`pip install authgraph`). This SDK does not import it.

**Python 3.9+** · `cryptography` for offline Ed25519 verify only.
