Python SDK
Installation
Biometric approval in one line
This is the whole pattern — drop it anywhere you need a human in the loop.client.approve(...) call does three things under the hood: it initiates the CIBA request, sends the push notification to the user’s phone, and polls for the signed token. You never have to touch the two-step protocol directly.
Anywhere a scope fits
| Use case | Scope | Example message |
|---|---|---|
| Deploy | approve:deploy | "Deploy api-gateway@abc123 to prod" |
| Refund | approve:payment | "Refund $29.99 to customer@example.com" |
| DB drop | approve:action | "Drop table users_archive (irreversible)" |
| Admin | approve:action | "Grant admin role to alice@corp" |
| Vault read | approve:action | "Read OPENAI_API_KEY" |
Structured action details
For anything the user should see in detail — amounts, recipients, resources — passaction_details:
Checkout
For e-commerce checkouts, use the higher-levelcheckout_request — it wraps CIBA with checkout-specific fields:
Vault
Request access to a stored secret (triggers biometric approval):Examples
examples/python/agent-checkout— end-to-end checkout flowexamples/python/vault-access— vault secret retrieval with biometric approval