Metadata-Version: 2.4
Name: trigguard
Version: 0.2.0
Summary: TrigGuard product SDK — authorize, verify, attest, audit, explain, coach via POST /execute
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)

**Pre-execution authorization for AI and automation** — thin client for `POST /execute`, offline receipt verification, and the six product verbs.

## Install

```bash
pip install trigguard
```

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

## Quick start

```python
import os
from trigguard import TrigGuard

tg = TrigGuard(
    api_key=os.environ["TRIGGUARD_API_KEY"],
    gateway_url=os.environ.get("TRIGGUARD_GATEWAY_URL", "https://api.trigguardai.com"),
)

result = tg.authorize(surface="deploy.release", actor="my-service")
trusted = tg.verify(result["receipt"]) if result.get("receipt") else False
print(result["decision"], trusted)
```

## Product API (parity with Node)

| Verb | Method |
|------|--------|
| Authorize | `tg.authorize(surface=..., actor=..., context=...)` |
| Verify | `tg.verify(receipt)` |
| Attest | `tg.attest(action=..., surface=...)` |
| Audit | `tg.audit(execution_id=...)` |
| Explain | `tg.explain(execution_id)` |
| Coach | `tg.coach(intent=...)` |

Factory: `create_trigguard()` · Legacy: `Client.execute()`

## Adoption

- [Python first 10 minutes](../../docs/adoption/PYTHON_FIRST_10_MINUTES.md)
- [Node first 10 minutes](../../docs/adoption/FIRST_10_MINUTES.md)

## Authority

Canonical PyPI source: **`sdk/python/`** only. See [`docs/infrastructure/PYTHON_SDK_AUTHORITY.md`](../../docs/infrastructure/PYTHON_SDK_AUTHORITY.md).

## PyPI publish

Parity work targets `0.2.0`. **Publish is gated** on at least one Node design partner — build and validate locally until then.
