Skip to main content

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


Download files

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

Source Distribution

actra-0.7.7.tar.gz (38.0 kB view details)

Uploaded Source

Built Distributions

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

actra-0.7.7-cp39-abi3-win_amd64.whl (342.3 kB view details)

Uploaded CPython 3.9+Windows x86-64

actra-0.7.7-cp39-abi3-win32.whl (321.8 kB view details)

Uploaded CPython 3.9+Windows x86

actra-0.7.7-cp39-abi3-manylinux_2_28_x86_64.whl (409.3 kB view details)

Uploaded CPython 3.9+manylinux: glibc 2.28+ x86-64

actra-0.7.7-cp39-abi3-macosx_10_12_universal2.whl (730.2 kB view details)

Uploaded CPython 3.9+macOS 10.12+ universal2 (ARM64, x86-64)

File details

Details for the file actra-0.7.7.tar.gz.

File metadata

  • Download URL: actra-0.7.7.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

Hashes for actra-0.7.7.tar.gz
Algorithm Hash digest
SHA256 5f1ea5117fcc509199216e04a836457cd7c6245f571b6005f23aa4f54355f582
MD5 ec930d4a355251176c527bd5ca6c3a5f
BLAKE2b-256 51a481f702971f92dad695a243a3e84cf8331cd17f4eb569f8f14ef91529075b

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.7.tar.gz:

Publisher: py-sdk-build-publish.yml on getactra/actra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file actra-0.7.7-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: actra-0.7.7-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 342.3 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

Hashes for actra-0.7.7-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 417ab781a5810c2afaba80cd7107258290479850efd90082e89bff3bee5a1b48
MD5 bc148777299560d12d61e31846efbf8c
BLAKE2b-256 ff8ac9c301f19ee8cdcc13d63d8593f67d78b80dda66d5e7cd864da6df76bfe3

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.7-cp39-abi3-win_amd64.whl:

Publisher: py-sdk-build-publish.yml on getactra/actra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file actra-0.7.7-cp39-abi3-win32.whl.

File metadata

  • Download URL: actra-0.7.7-cp39-abi3-win32.whl
  • Upload date:
  • Size: 321.8 kB
  • Tags: CPython 3.9+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for actra-0.7.7-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 dff75dbe7c822e14e1c6637827253c0d87ad3543c2f5d4b9cf2489157850bec4
MD5 2e4292cf049a69dafda0e1edf7fcf58f
BLAKE2b-256 a60817a186c43ab114e295820904205c3f90c7393a6bc7298b672f532bc29efa

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.7-cp39-abi3-win32.whl:

Publisher: py-sdk-build-publish.yml on getactra/actra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file actra-0.7.7-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for actra-0.7.7-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b3bc6eb13a00774368a9e423df9824832e0df3c792a5529c516be3cc2f468ad2
MD5 36ca8ffc6638843e039aff105014a6c8
BLAKE2b-256 a082ad2f1b7e22a62c4cd5aa9cacfbe94fee8b7f18c73d254642263be678b101

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.7-cp39-abi3-manylinux_2_28_x86_64.whl:

Publisher: py-sdk-build-publish.yml on getactra/actra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file actra-0.7.7-cp39-abi3-macosx_10_12_universal2.whl.

File metadata

  • Download URL: actra-0.7.7-cp39-abi3-macosx_10_12_universal2.whl
  • Upload date:
  • Size: 730.2 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

Hashes for actra-0.7.7-cp39-abi3-macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 8582707f005e255c4f887f53f0c6d8f119c2ac697a37c044bcd32c38ee15f595
MD5 f7ea9f401692f8b6875c072e1c2dae57
BLAKE2b-256 6720e6274bff04afc28cdb0e86fdc971143d1c92d7435265bd125f58348f720c

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.7-cp39-abi3-macosx_10_12_universal2.whl:

Publisher: py-sdk-build-publish.yml on getactra/actra

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page