ActPass Python SDK
Zero-dependency (stdlib-only) Python client for the ActPass runtime, mirroring
the TypeScript @actpass/sdk surface (spec §14).
Install
pip install actpass
Usage (§14.2)
from actpass import create_actpass
# The API key IS your identity — apk_… (gateway/agent) or apdv_… (developer);
# the server resolves tenant + agent from it.
client = create_actpass(api_key="apk_...")
# Preflight + guarded execution in one call. execute_fn runs ONLY on allow/warn.
result = client.guard(
goal="resolve_refund_request",
tool="stripe.refund.create",
resource="stripe:charge:ch_123",
args={"chargeId": "ch_123", "amount": 14900, "currency": "USD"},
execute_fn=lambda ctx: stripe.Refund.create(charge="ch_123", amount=14900),
)
print(result["decision"]["decision"]) # allow | deny | require_approval | ...
Other methods: preflight(), issue_passport(), verify_passport(),
revoke_passport(), record_evidence(), plus hash_payload() /
sign_payload() helpers for evidence hashing.
Behavior
- Fails closed: any non-2xx (except 401/403, which return the parsed body)
raises
ActPassError; a network failure raises too.guard()only executes your function onallow/warn. - Tenant is a hint: sent as
x-actpass-tenant; the gateway resolves the authoritative tenant from the authenticated principal (§11.2). - Zero dependencies:
urllib/json/hmac/hashlibfrom the stdlib only.
Test
cd packages/sdk-python && python -m unittest discover -s tests
Metadata
Release files for actpass 1.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| actpass-1.1.3.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| actpass-1.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.5 kB
Release files / actpass-1.1.3.tar.gz
| Download URL | actpass-1.1.3.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
13004e67e8b9a8648729674c2d932d8d8cd2b9fd98f0f60bb6f413f3a3f0353d
|
|
BLAKE2b-256 checksum How to use checksums |
e8a7ac45ba3acac77b317645507ec9e510ac5a3c3085640535bf5999f25b47de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Release files / actpass-1.1.3-py3-none-any.whl
| Download URL | actpass-1.1.3-py3-none-any.whl |
|---|---|
| Size | 6.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f2c82fbb790df09f72b5cfe26a5b4290b96063b2ab4ebdfc059f5978e38eb28
|
|
BLAKE2b-256 checksum How to use checksums |
d06c8b01367c50b2dd45a0a5bd5f9706ee3f5f609be4deac0644c2ec34101259
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.9
|
Security for actpass 1.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.