Skip to main content

Python binding for ara-protocol — typed primitive kernel for governed acts on any compute surface.

Project description

ara-protocol-py

Python binding for ara-protocol — the typed primitive kernel for governed acts on any compute surface.

Built with PyO3 + maturin. Single abi3-py39 wheel covers CPython 3.9+.

Status

Movement 2 adoption layer. First primitive bound: ProtocolAddress. Remaining primitives (anchor, envelope, manifest, signing_authority, peer_identity, …) land behind the same import ara_protocol surface on the same release cadence.

Why this exists

ARQERA backend services (Python) had been parallel-implementing kernel concepts in app/services/substrate_client.py instead of consuming the Rust kernel directly. That violated USCP-v1 (Universal Substrate Citizenship Principle): every layer must consume substrate truth, not re-derive it.

This binding closes the gap. Backend Python imports the kernel crate's exact types, parses + emits the canonical wire form, and inherits the kernel's invariants for free.

Build

cd bindings/python/ara-protocol-py
pip install maturin
maturin develop                  # builds + installs into the active venv
python -c "import ara_protocol; print(ara_protocol.__version__)"

Release wheel:

maturin build --release          # produces target/wheels/ara_protocol-*.whl

Use

from ara_protocol import ProtocolAddress

addr = ProtocolAddress("act", "probe", "cloudflare-1776233934")
assert addr.to_uri() == "arq://act/probe/cloudflare-1776233934"

parsed = ProtocolAddress.parse(addr.to_uri())
assert parsed == addr
assert parsed.address_class == "act"
assert parsed.type == "probe"
assert parsed.ref == "cloudflare-1776233934"

Layout

  • Cargo.toml — cdylib crate, pyo3 + path-dep on ara-protocol-primitives
  • pyproject.toml — maturin backend, abi3-py39 wheel
  • src/lib.rs#[pymodule] exposing kernel types
  • tests/ — pytest suite that mirrors the Rust unit tests

License

BUSL-1.1. Same as the rest of ara-protocol.

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

ara_protocol-0.1.0.tar.gz (172.0 kB view details)

Uploaded Source

Built Distributions

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

ara_protocol-0.1.0-cp310-abi3-win_amd64.whl (840.1 kB view details)

Uploaded CPython 3.10+Windows x86-64

ara_protocol-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl (651.1 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.28+ ARM64

ara_protocol-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (765.5 kB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

ara_protocol-0.1.0-cp310-abi3-macosx_11_0_arm64.whl (642.5 kB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

ara_protocol-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl (702.6 kB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file ara_protocol-0.1.0.tar.gz.

File metadata

  • Download URL: ara_protocol-0.1.0.tar.gz
  • Upload date:
  • Size: 172.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ara_protocol-0.1.0.tar.gz
Algorithm Hash digest
SHA256 69711cb495f54ddb9ccdc79070d652712d1f144af31358d90af14e307f404946
MD5 f65839fe4c9aa69a44bb70d0e3a2e4d5
BLAKE2b-256 15437e468514c28ffca9238ce9cd9e6ac2a4d9c494b6acf386dbd93ffc85b026

See more details on using hashes here.

File details

Details for the file ara_protocol-0.1.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: ara_protocol-0.1.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 840.1 kB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for ara_protocol-0.1.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e7b92177aa22094d8ad60889f709f51f975d61bc26dbcf79e295cae8ffa527a5
MD5 858dc7274d01eaf6d46891bd8dc1181a
BLAKE2b-256 29a4c2923346526f4d16522de0bc49d75334928cc8e38a2480465e6a20cb579a

See more details on using hashes here.

File details

Details for the file ara_protocol-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for ara_protocol-0.1.0-cp310-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7337789fb90bc66cfe6a2a2d038081cefe563a5ae74bd52988498f70ac90e96a
MD5 e2e5f5150809e9473cefe1ca543a08e6
BLAKE2b-256 b42a0006c4221c0a434622fd1c044e61458eefde63d080b710ff23ebb03733c3

See more details on using hashes here.

File details

Details for the file ara_protocol-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for ara_protocol-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 86342b2723b8c7e035b3f1c0c7de5c635005d59c98ee4d229cc184e601c781f0
MD5 e8bf1cb5c33586a30ee6a113540a9aa2
BLAKE2b-256 754fc6a7e84fbbfcc1338daf3c079b84c0421199e1a26c03e7849dc28131a98e

See more details on using hashes here.

File details

Details for the file ara_protocol-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ara_protocol-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 10858b38ae6bd3ec45a4ace4552aea358a408c5b5e3f57eafe4dc38b5882b95e
MD5 71454e4ec1ed67019529256e08ba70ac
BLAKE2b-256 1fe571df394b824973817b6503149950258121c28e6caab1c31d58c091804b42

See more details on using hashes here.

File details

Details for the file ara_protocol-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for ara_protocol-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 7974bbd6023f9da01cd40dffe5c11d7c107824e19fbc4a70bd7fcde25fd38a0e
MD5 584a41c06cc02219d1669bfed4592d71
BLAKE2b-256 55af07f8ce8c4132dfa5531eac2df0d3faac76ecc9fe499aa710d83c7fd9984f

See more details on using hashes here.

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