Metadata-Version: 2.4
Name: raposa
Version: 0.1.0
Summary: Human approval for AI agents with a signed audit trail — Python client for Raposa Aval.
Project-URL: Homepage, https://raposa.group
Project-URL: Documentation, https://raposa.group/docs/
Project-URL: Source, https://github.com/agentlabbusiness/raposa-sdk
Author-email: DC ESCRYPT SL <contact@raposa.group>
License-Expression: MIT
Keywords: ai-agents,approval,audit,gdpr,human-in-the-loop
Requires-Python: >=3.9
Provides-Extra: test
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# raposa (Python)

```python
from raposa import Raposa, Denied, TimedOut

gate = Raposa()   # reads RAPOSA_API_KEY

def issue_refund(order_id, amount_eur, reason):
    try:
        decision = gate.guard(action="issue_refund",
                              context=f"Order {order_id}, EUR {amount_eur:.2f}. Reason: {reason}",
                              risk="high" if amount_eur >= 100 else "medium",
                              requested_by="support-agent")
    except Denied as exc:
        return f"Refund not issued — a human declined: {exc}"
    except TimedOut as exc:
        return f"Refund not issued — nobody answered in time: {exc}"
    # the real refund goes here, and only here
    return f"Refund issued. Approved by {decision['decided_by']} at {decision['decided_at']}."
```

`guard` returns only when a named person approved. Rejection or expiry raises `Denied`; silence raises
`TimedOut`. Every decision is sealed in a hash-chained audit log you can export (`gate.export_audit()`).

Also: `gate.create(...)` (no waiting, returns the id), `gate.get(id)`, `gate.wait(id)`, `gate.me()`.
Extra request options pass through: `remind_after_sec`, `escalate_to`, `approvers`, `required`, `webhook_url`.

Zero dependencies, Python ≥ 3.9. Free sandbox key: https://raposa.group/start/ · Docs: https://raposa.group/docs/
