Actra - Deterministic admission control engine for automated system actions.
Project description
Actra Python SDK
Action Admission Control for Automated Systems
Deterministic policy engine that decides whether automated actions are allowed before they execute.
The Actra Python SDK provides a simple interface for loading policies and evaluating decisions using the Actra engine written in Rust.
Runtime Admission Control
The SDK also provides a runtime layer for protecting functions using Actra policies.
If a policy blocks the operation, the function will not execute and a PermissionError will be raised.
Installation
Install from PyPI:
pip install actra
The package includes a compiled Rust engine, so no Rust toolchain is required during installation.
Quick Start
@actra.admit()
def refund(amount):
...
The rule lives in policy:
rules:
- id: block_large_refund
when:
subject:
domain: action
field: amount
operator: greater_than
value:
literal: 1000
effect: block
Result:
refund(200) > allowed
refund(1500) > blocked by policy
Actra evaluates the policy before the function executes and blocks refunds greater than 1000.
Design Goals
The Python SDK focuses on:
- simple developer ergonomics
- deterministic policy evaluation
- minimal runtime overhead
- seamless integration with the Rust engine
The heavy lifting is performed by the core engine, ensuring fast and consistent evaluations.
Architecture
flowchart LR
subgraph User Code
U[User Code]
end
subgraph SDK Layer
S[Python SDK]
end
subgraph Native Bindings
N[Rust bindings<br/>actra]
end
subgraph Core Engine
C[Actra Engine]
end
U --> S --> N --> C
The SDK provides a Python-friendly interface while the core engine handles compilation and evaluation.
License
Apache License 2.0
Project
Actra is designed for systems requiring explicit, reproducible control over state-changing operations in automated environments.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
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 actra-0.7.8.tar.gz.
File metadata
- Download URL: actra-0.7.8.tar.gz
- Upload date:
- Size: 38.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e502425640dfdf042d9074a91455f3942f0b46a3678fb21a5407908f254ddef8
|
|
| MD5 |
88547f48b5c56553564f79a555ed248f
|
|
| BLAKE2b-256 |
a420601a6da4e7131a41beeb1603e22683e9b007ec9d4ada84dc967ae4803366
|
Provenance
The following attestation bundles were made for actra-0.7.8.tar.gz:
Publisher:
py-sdk-build-publish.yml on getactra/actra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
actra-0.7.8.tar.gz -
Subject digest:
e502425640dfdf042d9074a91455f3942f0b46a3678fb21a5407908f254ddef8 - Sigstore transparency entry: 1233991332
- Sigstore integration time:
-
Permalink:
getactra/actra@c08e584572bafebdec465ed0c114abcd311b0ded -
Branch / Tag:
refs/tags/v0.7.8 - Owner: https://github.com/getactra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-sdk-build-publish.yml@c08e584572bafebdec465ed0c114abcd311b0ded -
Trigger Event:
push
-
Statement type:
File details
Details for the file actra-0.7.8-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: actra-0.7.8-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 342.6 kB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c4ae5dab99d6fe549d29fbf7666e839eec7428ddbfa531f06b86647149c04a8
|
|
| MD5 |
78cf413ece3f4e36e5a161b41a825153
|
|
| BLAKE2b-256 |
533c9c6d960cd4eb2a3f97c5f989e01d428abd6376716bf53e7e056aac2099eb
|
Provenance
The following attestation bundles were made for actra-0.7.8-cp39-abi3-win_amd64.whl:
Publisher:
py-sdk-build-publish.yml on getactra/actra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
actra-0.7.8-cp39-abi3-win_amd64.whl -
Subject digest:
7c4ae5dab99d6fe549d29fbf7666e839eec7428ddbfa531f06b86647149c04a8 - Sigstore transparency entry: 1233991395
- Sigstore integration time:
-
Permalink:
getactra/actra@c08e584572bafebdec465ed0c114abcd311b0ded -
Branch / Tag:
refs/tags/v0.7.8 - Owner: https://github.com/getactra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-sdk-build-publish.yml@c08e584572bafebdec465ed0c114abcd311b0ded -
Trigger Event:
push
-
Statement type:
File details
Details for the file actra-0.7.8-cp39-abi3-win32.whl.
File metadata
- Download URL: actra-0.7.8-cp39-abi3-win32.whl
- Upload date:
- Size: 321.5 kB
- Tags: CPython 3.9+, Windows x86
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c805f4adaffef54b26aa5ae818f2d1daefe5479120429ecf276a85af431598d2
|
|
| MD5 |
b9b2e2da5ed58ab5609ccb1f1654a50f
|
|
| BLAKE2b-256 |
f98ec4b6070e393a4ec6442e3521b53370a67844fdb460fa39cde152aba337bc
|
Provenance
The following attestation bundles were made for actra-0.7.8-cp39-abi3-win32.whl:
Publisher:
py-sdk-build-publish.yml on getactra/actra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
actra-0.7.8-cp39-abi3-win32.whl -
Subject digest:
c805f4adaffef54b26aa5ae818f2d1daefe5479120429ecf276a85af431598d2 - Sigstore transparency entry: 1233991453
- Sigstore integration time:
-
Permalink:
getactra/actra@c08e584572bafebdec465ed0c114abcd311b0ded -
Branch / Tag:
refs/tags/v0.7.8 - Owner: https://github.com/getactra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-sdk-build-publish.yml@c08e584572bafebdec465ed0c114abcd311b0ded -
Trigger Event:
push
-
Statement type:
File details
Details for the file actra-0.7.8-cp39-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: actra-0.7.8-cp39-abi3-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 408.8 kB
- Tags: CPython 3.9+, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c63dd4978ceb69d3718960e4a521d8a4468c167f9ddf7bd95d0bd548a7b86770
|
|
| MD5 |
ce7de58aafaea5a1dabb904d69f35f31
|
|
| BLAKE2b-256 |
54173a4170e3d3072c9a96cbb47ed5c9f83b2314ab23bba05bd59fda8357a26e
|
Provenance
The following attestation bundles were made for actra-0.7.8-cp39-abi3-manylinux_2_28_x86_64.whl:
Publisher:
py-sdk-build-publish.yml on getactra/actra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
actra-0.7.8-cp39-abi3-manylinux_2_28_x86_64.whl -
Subject digest:
c63dd4978ceb69d3718960e4a521d8a4468c167f9ddf7bd95d0bd548a7b86770 - Sigstore transparency entry: 1233991571
- Sigstore integration time:
-
Permalink:
getactra/actra@c08e584572bafebdec465ed0c114abcd311b0ded -
Branch / Tag:
refs/tags/v0.7.8 - Owner: https://github.com/getactra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-sdk-build-publish.yml@c08e584572bafebdec465ed0c114abcd311b0ded -
Trigger Event:
push
-
Statement type:
File details
Details for the file actra-0.7.8-cp39-abi3-macosx_10_12_universal2.whl.
File metadata
- Download URL: actra-0.7.8-cp39-abi3-macosx_10_12_universal2.whl
- Upload date:
- Size: 730.5 kB
- Tags: CPython 3.9+, macOS 10.12+ universal2 (ARM64, x86-64)
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e6192518ded2fc04f953246815faeb21706b15f5bb828a60c3d4b7a9e32ab06
|
|
| MD5 |
95b6ddaec7f3cb1d7de1a2184d0b7ccc
|
|
| BLAKE2b-256 |
08ea2f5b4c04593a230821969fa833fd13d9a06652c30a2d603ec42c30da95df
|
Provenance
The following attestation bundles were made for actra-0.7.8-cp39-abi3-macosx_10_12_universal2.whl:
Publisher:
py-sdk-build-publish.yml on getactra/actra
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
actra-0.7.8-cp39-abi3-macosx_10_12_universal2.whl -
Subject digest:
9e6192518ded2fc04f953246815faeb21706b15f5bb828a60c3d4b7a9e32ab06 - Sigstore transparency entry: 1233991506
- Sigstore integration time:
-
Permalink:
getactra/actra@c08e584572bafebdec465ed0c114abcd311b0ded -
Branch / Tag:
refs/tags/v0.7.8 - Owner: https://github.com/getactra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
py-sdk-build-publish.yml@c08e584572bafebdec465ed0c114abcd311b0ded -
Trigger Event:
push
-
Statement type: