raposa (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/
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file raposa-0.1.0.tar.gz.
File metadata
- Download URL: raposa-0.1.0.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
888f26d75da51f5256f32ffcae9c324a37d70684df73bd561331f32a9a474e9f
|
|
| MD5 |
9600148c27d45aae8b3840a124087bcf
|
|
| BLAKE2b-256 |
663056f0a5a1fbbb2924bd8f12a84f648d18de7e36ab45063d521d80c0269b29
|
File details
Details for the file raposa-0.1.0-py3-none-any.whl.
File metadata
- Download URL: raposa-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.2.0 CPython/3.9.25
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63e00a4f0ec2adbfa69ff7c63481045e1972a9097864ee67e0d98d8ea8ec77b3
|
|
| MD5 |
3b515a2e3aeec49c95a43d67eff06913
|
|
| BLAKE2b-256 |
c22013cab1a47f2c2ba846a4cd6fa9434a61777649e4a2063c365211ef1509ec
|