Skip to main content

OA Python SDK

oapython is the native Python distribution for the Rust OA runtime. It installs the oa import package and mirrors Rust's public module structure:

python -m pip install oapython
import oa

engine = oa.Engine()
one = oa.matrix.ones(engine, [2, 3])
two = oa.matrix.full(engine, [2, 3], 2.0)
total = oa.matrix.add(one, two)

assert total.shape == [2, 3]
assert total.to_list() == [3.0] * 6

image = oa.Image.new_from_matrix(oa.matrix.ones(engine, [3, 2, 2]), "chw", "rgb")
flipped = oa.image.flip(image, horizontal=True, vertical=False)

Python mirrors Rust module ownership: root value aliases remain concise, stateless operations live in oa.matrix, and the runtime owner is explicit. Callers may use ordinary local abbreviations such as import oa.matrix as oam or import oa.core as oac; OA does not publish duplicate alias modules. Host observation through read_f32() or to_list() is the synchronization boundary.

The canonical PyO3 implementation lives in ../../src/py/pyo3. Root ../../pyproject.toml and ../../uv.lock own packaging and environment metadata; this SDK directory owns the importable package, PyO3 crate, and tutorials.

Build from the repository root with:

python3 tool/build/workflow.py --profile debug --python-only

The workflow creates or reuses the root .venv, rebuilds the native extension, then verifies package imports and native/distribution version agreement in a fresh Python process. Re-run it after changing native exports; an older installed extension does not gain renamed classes from edits to the Python wrappers.

Tests are located in the repository test/py/ directory and run with:

.venv/bin/python -m unittest discover -s test/py -v

Build the portable Python 3.10+ Linux wheel with:

.venv/bin/pip install ziglang
PATH="$PWD/.venv/bin:$PATH" ZIG_COMMAND=python-zig .venv/bin/maturin build --release --zig

The explicit Zig build prevents a developer workstation's newer glibc symbols from leaking into a wheel labeled for PyPI.

The Rust-first preview exposes runtime ownership and logging, explicit events, typed dense matrices, Matrix and ML functional operations, Image values/codecs/transforms, Audio values/codecs/DSP/capture/playback, cryptography, vision metrics, and the current Video surface.

Neural-network modules, optimizers, training sessions and programs, callbacks, reinforcement-learning trainers, flow matching, and SDK NLP recipes remain experimental. Python targets compute, ML, media, Plot, and Viewer preview; low-level Vulkan and UI construction remain Rust-only. Capability admission and hardware qualification are separate from binding availability.

Metadata

Release files for oapython 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for oapython 0.10.0
File Interpreter ABI Platform Actions
oapython-0.10.0-cp310-abi3-manylinux_2_38_x86_64.whl CPython 3.10 abi3 Linux glibc 2.38+ x86-64 Details for oapython-0.10.0-cp310-abi3-manylinux_2_38_x86_64.whl

Release files / oapython-0.10.0-cp310-abi3-manylinux_2_38_x86_64.whl

Download URL oapython-0.10.0-cp310-abi3-manylinux_2_38_x86_64.whl
Size 18.3 MB
Tags CPython 3.10 Linux glibc 2.38+ x86-64 abi3
SHA-256 checksum
How to use checksums
7c5c711825d333bc22ea5e97a8b79b3df32f560035bb4bebe517b9fb43c18bab
BLAKE2b-256 checksum
How to use checksums
5e83d880edd2ad90180b999cfc85d71e5a6c6a30953e8f2965d272a68f15b361
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for oapython 0.10.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for oapython-0.10.0-cp310-abi3-manylinux_2_38_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page