Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.


Pyroxide

Pyroxide

Python tasks, isolated processes, WebAssembly, and C ABI shared libraries.
One embedded engine. One task API.

Release 1.0.0rc1 Python 3.10+ Rust 1.86+ CI MIT or Apache-2.0

Read the user manual »
API reference · Examples · Report a bug · Request a feature


Run work in the background without Redis, worker daemons, or another service to operate. Start with a Python decorator; choose threads, isolation, WASM, or native execution for each workload.

Why Pyroxide?

  • Nothing else to deploy. The task engine lives in your application. There is no broker, separate worker service, or network hop for local work.
  • Choose the boundary per task. Keep ordinary work lightweight, move CPU-bound Python into another interpreter, run portable plugins in Wasmtime, or call a reviewed C ABI shared library without holding the GIL.
  • One lifecycle to operate. Bounded admission, batches, async results, cancellation rules, statistics, fork safety, and explicit shutdown are part of the same engine.
  • Move toward native speed without redesigning the caller. A task can start as Python and later move behind a WASM or native boundary while keeping the submit-and-result workflow.

Free-threaded CPython can also run pure-Python @task work in parallel. On regular CPython, use isolation for parallel CPU-bound Python.

Four execution modes

Mode Reach for it when you need
@task Lightweight background work inside the application
@task(isolated=True) CPU-bound Python or process crash containment
@wasm_task Portable guest code with memory and execution-time limits
@dylib_task GIL-free calls into trusted native libraries

Where it fits

Choose When
Pyroxide Work belongs to one application and benefits from different execution boundaries
ThreadPoolExecutor or ProcessPoolExecutor A basic local thread or process pool is enough
Celery, RQ, or another durable queue Jobs must survive application failure, run on schedules, retry durably, or move across hosts
Ray or Dask The workload needs a distributed compute runtime

Pyroxide does not try to turn local work into a distributed system. Its strength is putting several useful local execution models behind one small API. The comparison guide covers the trade-offs, and the benchmark study publishes reproducible results, including workloads where the standard library wins.

Quick start

Install the pyro3 package and import it as pyroxide:

pip install pyro3

Python task

from pyroxide import task

@task
def square(value: int) -> int:
    return value * value

handle = square(12)
print(handle.result())  # 144

Inside an event loop, use await handle.result_async() instead of blocking the loop. See Concurrency and asyncio.

Isolated Python

Add isolated=True when CPU-bound Python needs another interpreter or when a trusted native crash must not take down the main application. Workers are reused, bounded, and recycled rather than spawned for every task.

tasks.py:

from pyroxide import task

@task(isolated=True)
def calculate(value: int) -> int:
    return sum(i * i for i in range(value))

app.py:

from tasks import calculate

print(calculate(1_000_000).result())

WebAssembly

Register a precompiled .wasm module when plugin code needs a portable application boundary. Pyroxide supplies no host imports and applies memory and epoch-time limits to each call.

from pathlib import Path
from pyroxide import load_wasm, register_wasm, wasm_task

register_wasm("codec", Path("codec.wasm").read_bytes())

@wasm_task("codec", "compress")
def compress(payload: bytes) -> bytes:
    pass

@wasm_task("codec", "decompress")
def decompress(payload: bytes) -> bytes:
    pass

compressed = compress(b"data").result()

codec = load_wasm("codec")
restored = codec.decompress(compressed).result()
handles = codec.compress.batch([b"first", b"second"])

A module can export many functions. Bind each export with its own @wasm_task decorator, or use one load_wasm() proxy and call exports as methods such as codec.compress() and codec.decompress(). Proxy methods also support .batch(...).

Native shared library

Compatible shared libraries may be written in C, Rust, Zig, or another language using Pyroxide's supported byte-buffer C ABI. Register a reviewed precompiled library:

from pyroxide import dylib_task, load_dylib, register_dylib

register_dylib("codec", "./libcodec.so")

@dylib_task("codec", "compress")
def compress(payload: bytes) -> bytes:
    pass

@dylib_task("codec", "decompress")
def decompress(payload: bytes) -> bytes:
    pass

compressed = compress(b"data").result()

codec = load_dylib("codec")
restored = codec.decompress(compressed).result()
handles = codec.compress.batch([b"first", b"second"])

A library can export many functions. Bind each export with its own @dylib_task decorator, or use one load_dylib() proxy and call exports as methods. Decorators and proxy methods both support .batch(...).

No custom Python extension wrapper is required. During development, compile_c(), compile_rust(), and compile_zig() can build and register trusted source. Production can load a reviewed .so, .dylib, or .dll.

The manual documents serialization, ABI ownership, guest limits, and failure semantics before you cross any of these boundaries.

Performance Benchmarks

These Apple M1 Pro reference runs report median complete batch time. The Python executor table used four workers. Lower is better.

Python tasks and isolation

CPython and workload ThreadPoolExecutor Pyroxide @task ProcessPoolExecutor Pyroxide isolated
3.14, 32 CPU tasks 65.20 ms 55.49 ms 17.79 ms 19.22 ms
3.14t, 32 CPU tasks 18.91 ms 18.03 ms 13.31 ms 15.88 ms
3.14, 1,000 trivial tasks 6.29 ms 18.25 ms 157.46 ms 52.35 ms

Native, WebAssembly, and application workloads

Workload Pyroxide Comparison
Scheduled native call, 1 KiB Rust workload 22.56 µs Direct PyO3, nanobind, CFFI, and ctypes: 7.26-8.59 µs
Warm WebAssembly call, same 1 KiB workload 47.57 µs Direct wasmtime-py host: 80.24 µs
Odoo 19 compute-only, Python 3.13, 8 payloads, 2 workers 30.85 ms ProcessPoolExecutor: 31.77 ms; inline: 60.37 ms

What to expect:

  • @task: Competitive with ThreadPoolExecutor for substantial work. The standard thread pool wins for extremely small tasks.
  • Isolated Python: Close to ProcessPoolExecutor on CPU work, with lower overhead in the small-task batch and the same Pyroxide task workflow.
  • Free-threaded Python: @task can run Python across cores while retaining Pyroxide handles, batching, statistics, and lifecycle controls.
  • Native and WASM: Native scheduling adds overhead compared with a direct binding. In return, it joins compiled code to the task system. WASM provides a portable, resource-limited guest boundary through that same system.

The five-minute RC1 run accounted for all 3,080 accepted operations and recovered after 300 deliberate worker crashes. The full benchmark study contains setup details, confidence intervals, memory results, distributed systems, and workloads where other tools win.

Know the boundaries

1.0.0rc1 is a release candidate. Its API is intended to become 1.0. Start production adoption with a canary and representative failure testing.

  • Pyroxide is embedded, not durable or distributed. Queued work is lost if the application process exits.
  • Pending tasks can be cancelled. Running isolated work can be terminated; running in-process Python, WASM, or native work cannot be safely interrupted.
  • Native libraries have unrestricted access to the host process. Isolation can contain a native crash to a worker process, but it is not an OS security sandbox.
  • Pyroxide gives WASM guests no host imports and applies memory and epoch-time limits. Treat that as an application isolation boundary, not an absolute security promise.

Explore

Development

python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e '.[dev]'
maturin develop
pytest -q

Read CONTRIBUTING.md before submitting a change. Report security issues through SECURITY.md, not a public issue.

License

Choose either the MIT or Apache-2.0 license.

Download files

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

Source Distribution

pyro3-1.0.0rc1.tar.gz (347.8 kB view details)

Uploaded Source

Built Distributions

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

pyro3-1.0.0rc1-cp314-cp314t-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.14tWindows x86-64

pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_x86_64.whl (5.4 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.39+ x86-64

pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_aarch64.whl (4.7 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.39+ ARM64

pyro3-1.0.0rc1-cp314-cp314t-macosx_11_0_arm64.whl (4.3 MB view details)

Uploaded CPython 3.14tmacOS 11.0+ ARM64

pyro3-1.0.0rc1-cp314-cp314t-macosx_10_12_x86_64.whl (4.9 MB view details)

Uploaded CPython 3.14tmacOS 10.12+ x86-64

pyro3-1.0.0rc1-cp310-abi3-win_amd64.whl (4.2 MB view details)

Uploaded CPython 3.10+Windows x86-64

pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_x86_64.whl (4.9 MB view details)

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

pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_aarch64.whl (4.5 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.39+ ARM64

pyro3-1.0.0rc1-cp310-abi3-macosx_11_0_arm64.whl (4.1 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

pyro3-1.0.0rc1-cp310-abi3-macosx_10_12_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

Details for the file pyro3-1.0.0rc1.tar.gz.

File metadata

  • Download URL: pyro3-1.0.0rc1.tar.gz
  • Upload date:
  • Size: 347.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyro3-1.0.0rc1.tar.gz
Algorithm Hash digest
SHA256 f29913e4d06d8b1a0723cc8dfb99b0c15427f36595d4f68524a66a34035f78ac
MD5 0d2901e2a67baf078015ac984985aa8e
BLAKE2b-256 8e6915a9ad23178a7d954fdf980672bd74ea54ac180866b119d5fb1ffaee56c8

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1.tar.gz:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: pyro3-1.0.0rc1-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyro3-1.0.0rc1-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 423f9d4e4d731c917957a791cab2d13b6476751f76a0d6055167a145b80882c3
MD5 57ffe299bc2dcdaf681147bcd79eabde
BLAKE2b-256 07030ad0f290393f9b3ecf886713b9b43e3f2efa6b488973a55620a994f90000

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp314-cp314t-win_amd64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c5f618a612aab217dfb8fe8816ef7720fd1f8a3243c3abdc02da8cc3a3c4a055
MD5 c0f058a930eff13da7d9097233df9b96
BLAKE2b-256 11c6f8120c178cc4f2e5b511f87c607eedbce1b64198b416e8188cf46dd77a48

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_x86_64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 dd2fe0517465ce79d24783335102076aa4ab45a1f7782b2d5e5daedb98b3bce7
MD5 6a3790c638e5511c0416b50b0fd6dfbf
BLAKE2b-256 bc59f802e02b30e9c99313eb0e3480dae359916d6ff61a7ea76cb4f6440e875d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp314-cp314t-manylinux_2_39_aarch64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp314-cp314t-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp314-cp314t-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9a7d8ce0886e44d84c0df60bb2118ba9fb889f169ecb697f5812df43d97365f5
MD5 a0a93399e24607b7b66b20e025daf544
BLAKE2b-256 5baeaf9eb6c673a9bc0dd4e620537071c990568329f7972d2dc319fca7100d7f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp314-cp314t-macosx_11_0_arm64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp314-cp314t-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp314-cp314t-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 2ea9ef0e263964fb95601deaf068af74a1ddcacd2443fb0f7fec9e015ef408ac
MD5 a6a7776bd3bf7b3a729976aad13b64cb
BLAKE2b-256 6ffae79c6e042eaab7a8feb85bf64d59a9e273ca61679ccea3fffa68e0e32e5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp314-cp314t-macosx_10_12_x86_64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: pyro3-1.0.0rc1-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.2 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pyro3-1.0.0rc1-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 92d6ed98a13a490b617c8f70d968d28cafd7bb65e43e3b371bb51efd4cb4d61e
MD5 18dfec9413d1fc3fd12b6e35e00a70c0
BLAKE2b-256 def0b4828ab65a483d5ff0e31b825fb3d248255aa607e121e8395a22c3ffda87

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp310-abi3-win_amd64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 fb127319b7617aef284dccb18a13ff3fe06b5c5a7ed96797dff2d25840c40c54
MD5 c5829edf97708394b91f16ad9d9a3cf2
BLAKE2b-256 98730acb09e00f0c0c22b593a852c27df246ea159451a5f687334f8cae04b2c7

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_x86_64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_aarch64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_aarch64.whl
Algorithm Hash digest
SHA256 57295d30debcdda8d4d4028abdbb0482a7c9aee80a9de27216205bee88d52c37
MD5 b62e329d6ec1eb3053066bf087e963be
BLAKE2b-256 67377ea88b567d65b66f855d805e82cbcd00d886ea91c7bb854166acc8818179

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp310-abi3-manylinux_2_39_aarch64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f44a02be2f7fb106cf031316be550650795e361e1256e6acdd5469e27eedf83f
MD5 ae954f384088da674fb8ee42dd1b25a9
BLAKE2b-256 a6c106b4c7b492dd3929059e569a72e243a2c9f6c4e90cc2a7e8c077572ca9ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

File details

Details for the file pyro3-1.0.0rc1-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for pyro3-1.0.0rc1-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 85078e4724b0a54fa81b6033b6e687b2fcd0a894245c2d0ec8fd0cab50e58a8b
MD5 090e75af08ee94efe3f3ec833d8adcde
BLAKE2b-256 4c865760c1403c9a89528a52258e2bc84267a971e91624f9f4e3b7aced555bf4

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyro3-1.0.0rc1-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on Emivvvvv/pyroxide

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

Release history Release notifications | RSS feed

This release

1.0.0rc1 This release

11 files

0.8.3

6 files

0.8.2

6 files

0.8.1

6 files

0.8.0

6 files

0.7.0

6 files

0.6.1

6 files

0.6.0

6 files

0.5.2

6 files

0.5.1

6 files

0.5.0

6 files

0.4.0

6 files

0.3.3

6 files

0.3.2

4 files

0.3.1

4 files

0.3.0

4 files

0.2.1

4 files

0.2.0

4 files

0.1.3

4 files

0.1.2

4 files

0.1.1

4 files

0.1.0

4 files

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