Skip to main content

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

raposa-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

raposa-0.1.0-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

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

Hashes for raposa-0.1.0.tar.gz
Algorithm Hash digest
SHA256 888f26d75da51f5256f32ffcae9c324a37d70684df73bd561331f32a9a474e9f
MD5 9600148c27d45aae8b3840a124087bcf
BLAKE2b-256 663056f0a5a1fbbb2924bd8f12a84f648d18de7e36ab45063d521d80c0269b29

See more details on using hashes here.

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

Hashes for raposa-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 63e00a4f0ec2adbfa69ff7c63481045e1972a9097864ee67e0d98d8ea8ec77b3
MD5 3b515a2e3aeec49c95a43d67eff06913
BLAKE2b-256 c22013cab1a47f2c2ba846a4cd6fa9434a61777649e4a2063c365211ef1509ec

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page