Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

yanez-agent-authorization (Python)

Async client for requesting verifiable human approval through Yanez, and a verifier for the signed receipts. Import package: yanez_authz.

pip install yanez-agent-authorization   # pre-release: not on PyPI yet; pip install -e packages/python
from yanez_authz import AuthorizationClient, ReceiptVerifier

async with AuthorizationClient(base_url, agent_api_key) as client:
    pending = await client.request_authorization(terms={...})
    result = await client.wait_for_authorization(pending.request_id, 900)

receipt = ReceiptVerifier(base_url, expected_issuer).authorize_action(
    result.artifact, expected_terms, max_age_seconds=900, consume=True,
    expected_sub=account_yid)   # the YID your records tie to the account

wait_for_authorization raises the builtin TimeoutError when the local deadline passes; rejection and expiry are returned as values. expected_issuer is the issuer string your Yanez operator publishes for the deployment.

Docs and the full integration model: https://github.com/yanez-compliance/yanez-agent-authorization

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yanez_agent_authorization-0.1.0a1.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

yanez_agent_authorization-0.1.0a1-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file yanez_agent_authorization-0.1.0a1.tar.gz.

File metadata

File hashes

Hashes for yanez_agent_authorization-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 40b09b8872d92f7247f76ab462581f2e02e1ae309d25d0c18cc2274efb6b0b08
MD5 8fced2fe46f3c03559620ffd450047b7
BLAKE2b-256 820dcb3eda234c27d354600d95d6e3f588024469c947a9a8beea7ef92e73f867

See more details on using hashes here.

File details

Details for the file yanez_agent_authorization-0.1.0a1-py3-none-any.whl.

File metadata

File hashes

Hashes for yanez_agent_authorization-0.1.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 74111c1275fba95a8a0198ff8466d8fb35f3f36a949b1bdfb6099fe48acf0bae
MD5 7e0bf3f4231031e7bc24d8c5ec4df2be
BLAKE2b-256 a1b4be9e035dede31982dec192fe63dc29ee768b5e1ba6ac69bc9d24f87423d8

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0a1 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