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.5.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.5-cp39-abi3-win_amd64.whl (342.3 kB view details)

Uploaded CPython 3.9+Windows x86-64

actra-0.7.5-cp39-abi3-win32.whl (321.6 kB view details)

Uploaded CPython 3.9+Windows x86

actra-0.7.5-cp39-abi3-manylinux_2_28_x86_64.whl (409.5 kB view details)

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

actra-0.7.5-cp39-abi3-macosx_10_12_universal2.whl (730.4 kB view details)

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

File details

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

File metadata

  • Download URL: actra-0.7.5.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.5.tar.gz
Algorithm Hash digest
SHA256 37137c7237399ea5610dddef9aa150f87adf9a94a173b02e0b5395cdff44bbcb
MD5 cd8f8623662dcdafb164c5734cf7f8f6
BLAKE2b-256 5852163c548fba2c59ff62a7a9995214cc79c676ef39085d5e570649f0fd0d29

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: actra-0.7.5-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.5-cp39-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 8b87656198151491e3c9ee233b1c3fc49d61a705ed7a195b4b3a102717781533
MD5 1f8320cf7f26eb8a0833357164a2cefa
BLAKE2b-256 27e896b629c56b888e87c61d6b4861e25e391642e8edd274d856eb103518576d

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: actra-0.7.5-cp39-abi3-win32.whl
  • Upload date:
  • Size: 321.6 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.5-cp39-abi3-win32.whl
Algorithm Hash digest
SHA256 e076a2c60bfdd9dfaf070f85cf4a4d03273b59ebe3ad4c774e4682c5e8652386
MD5 f2345aa943370322a879bbec1ef93bf2
BLAKE2b-256 a6998336fcda4373d9cdda333fedcfc10bc86bcccdde14d8f92a27010208c475

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for actra-0.7.5-cp39-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 54be4e5258184ee3b16280992f35d85e447871f43788833173e0118691727d3a
MD5 23770dd8d08f053285b1378fb8ec33e0
BLAKE2b-256 1e3b2a5d2a9138797ebdc7c093ff9397cdf9a26152ff785214e3bd47a88f95e3

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: actra-0.7.5-cp39-abi3-macosx_10_12_universal2.whl
  • Upload date:
  • Size: 730.4 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.5-cp39-abi3-macosx_10_12_universal2.whl
Algorithm Hash digest
SHA256 8cd80349fa657d304afd04438823194d41c614890497851d10d7cd143f50dcd2
MD5 ecc0ad625ac80129d550a9c77b6421a8
BLAKE2b-256 77dedd7a82dcd473cf248ac41daa04dac8dace0eb22f9f2d5513876b9d3b28b9

See more details on using hashes here.

Provenance

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