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.3.tar.gz (37.9 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.3-cp39-abi3-win_amd64.whl (342.2 kB view details)

Uploaded CPython 3.9+Windows x86-64

actra-0.7.3-cp39-abi3-win32.whl (321.7 kB view details)

Uploaded CPython 3.9+Windows x86

actra-0.7.3-cp39-abi3-manylinux_2_28_x86_64.whl (409.7 kB view details)

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

actra-0.7.3-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.3.tar.gz.

File metadata

  • Download URL: actra-0.7.3.tar.gz
  • Upload date:
  • Size: 37.9 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.3.tar.gz
Algorithm Hash digest
SHA256 9b582db12f5325de2de36b63b4431e9ecdd3ededab606d6984a1c8bf9a019629
MD5 3662d686b50d9f61a8a2a3427c419843
BLAKE2b-256 ceab6baa53948d5b9c2868f7634bf017ec043fcee9e0a375e436dc792fe8605c

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.3.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.3-cp39-abi3-win_amd64.whl.

File metadata

  • Download URL: actra-0.7.3-cp39-abi3-win_amd64.whl
  • Upload date:
  • Size: 342.2 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.3-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 c39de31c0f8835097bb9d085604dc4ee6f929921c022839f1a018b549ad021ce
MD5 592f3415a484314fe19c133e90a4121e
BLAKE2b-256 9c0f53b580097d3431f28503828a240a9a8de4e14f47c626a6bf46f3b21a63f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.3-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.3-cp39-abi3-win32.whl.

File metadata

  • Download URL: actra-0.7.3-cp39-abi3-win32.whl
  • Upload date:
  • Size: 321.7 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.3-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 7c5760f8fff3b926ea4e20c9e83f0cedc5609c674d445eebb19013152e605833
MD5 5b11dd766b1b795eabff9e9805cbc526
BLAKE2b-256 dfd5f3d28c3f946eccf2404cd6ac6ea25b05c3de9ded5be2713b883f4a8e457f

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.3-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.3-cp39-abi3-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for actra-0.7.3-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 652fc236568d62f5fa4e5ebf9e9936e405947f15751205aada001320b84bf71b
MD5 cf2824559e806467a7793f25957d6176
BLAKE2b-256 32f6ff261824525affe7a09be257052b9e3cde1a7467c9032babd06cbea1b7bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.3-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.3-cp39-abi3-macosx_10_12_universal2.whl.

File metadata

  • Download URL: actra-0.7.3-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.3-cp39-abi3-macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 94ffbd4548fbd5fdf9e7f0c6b734205390ca0b55d00688b8a4215295456946ed
MD5 df73d63aaefdb547a06d0cdbcfd42d07
BLAKE2b-256 a6d6ed8d005bf77ef90019bd2812c640cad69e57b8a5b426de4e1823989815d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for actra-0.7.3-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