pyaeron
CPython 3.12–3.15 bindings for the Aeron C client. Implemented against the Python C API (no pybind11).
Offer contract
result = publication.offer(payload)
if result: # True — message was appended
...
elif result is pyaeron.BACK_PRESSURED:
idle.idle()
elif result is pyaeron.NOT_CONNECTED:
...
# ADMIN_ACTION is also a falsy OfferCode (retry)
# PublicationClosed / MaxPositionExceeded are raised
bool(BACK_PRESSURED), bool(NOT_CONNECTED), and bool(ADMIN_ACTION) are
always False. Successful offers return Python True (the new stream position
is on publication.last_position).
Zero copy
| payload | path |
|---|---|
bytes |
pointer into ob_sval |
bytearray |
pointer into the bytearray (PyByteArray_AS_STRING) |
C-contiguous memoryview |
pointer into the view (PyMemoryView_GET_BUFFER) |
ASCII str |
pointer into compact ASCII data (PyUnicode_DATA) |
non-ASCII str |
UTF-8 conversion (PyUnicode_AsUTF8AndSize, cached on the object) |
other bytes-like (array.array, …) |
PEP 3118 PyObject_GetBuffer |
GIL
Idle strategies, await_connected, add_publication / add_subscription
driver waits, and driver/client start-stop drop the GIL. offer and poll
keep it: they are non-blocking shared-memory operations, and poll invokes a
Python fragment handler.
Examples
Runnable scripts in examples/:
python examples/01_ipc_producer_consumer.py # 1 producer, 1 consumer (IPC)
python examples/02_ipc_multicast.py # 1 producer, 2 consumers (IPC fan-out)
python examples/03_ipc_rpc.py # caller waits for a correlated response
python examples/04_offer_status.py # True vs falsy OfferCode enums
python examples/05_polling.py # poll duty cycle, fragment_limit, assemble
python examples/06_channels.py # Aeron URI construction and channel params
python examples/07_streams.py # same channel, two independent stream IDs
python examples/08_exclusive_publication.py # 01 with add_exclusive_publication
python examples/09_buffer_protocol.py # offer() buffer-protocol payloads
python examples/10_lifecycle.py # full session: connect through close
python examples/11_images.py # two Images; poll one session
import pyaeron
with pyaeron.Aeron(embedded=True) as aeron:
sub = aeron.add_subscription(pyaeron.IPC_CHANNEL, 10)
pub = aeron.add_publication(pyaeron.IPC_CHANNEL, 10)
pub.await_connected()
result = pub.offer(b"hello")
if result is True:
def on_fragment(buf, header):
print(bytes(buf), header.session_id)
sub.poll(on_fragment)
embedded=True launches an in-process C media driver in a unique temp
directory. Point dir= at an existing driver if you already run aeronmd.
IPC_CHANNEL is Aeron's URI "aeron:ipc" — shared-memory IPC on one
machine, not a pyaeron invention.
Build
Requires CMake ≥ 3.30, a C11 compiler, and CPython 3.12–3.15.
git submodule update --init --recursive
pip install -e ".[test]"
pytest
Aeron itself is vendored as third_party/aeron (https://github.com/aeron-io/aeron.git).
Benchmarks
One-in-flight RPC (ping/pong) latency for C vs Python and IPC vs localhost UDP:
python benchmarks/run.py --quick
python benchmarks/run.py --net 10g,100g --quick # rain → butterfly, 10GbE and ConnectX-5 100GbE
See benchmarks/README.md.
Metadata
Release files for pyaeron 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyaeron-0.1.0.tar.gz | 481.6 kB | Without provenance | Details for pyaeron-0.1.0.tar.gz |
Built distributions (wheels)
Total release size: 3.1 MB
Release files / pyaeron-0.1.0.tar.gz
| Download URL | pyaeron-0.1.0.tar.gz |
|---|---|
| Size | 481.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65fad0d4ca6926a24620c712fdebe8db8589a4d42a8dc52f15910a868c318af0
|
|
BLAKE2b-256 checksum How to use checksums |
5cb9874a5825dfb33a6ff3dc8705ff6661f4bece2308ab1491ad8dcf3fdff8af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | pyaeron-0.1.0-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 359.7 kB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
4b67461da75974397f17cd99900af5344b7409792c5a2b7db29b0a2314b7e6ae
|
|
BLAKE2b-256 checksum How to use checksums |
dd9ade650ffddd407197e9668295ee6a1d6a3915b9a785f3518bf143da727cc2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp315-cp315-macosx_11_0_arm64.whl
| Download URL | pyaeron-0.1.0-cp315-cp315-macosx_11_0_arm64.whl |
|---|---|
| Size | 290.6 kB |
| Tags | CPython 3.15 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
308f212ef805d6c6ff8ed2d42ce83e6d3e062b48cc635637aaed799a01cdabbe
|
|
BLAKE2b-256 checksum How to use checksums |
3eef707c9d534f954f3e51758b38f6fc4f3f5ebd0cebaf36f50728e0877b1f8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | pyaeron-0.1.0-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 359.8 kB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f839e7c68100ee20b769b73df63a6aaad340b30d62ce43b0614a1636d8cbd22e
|
|
BLAKE2b-256 checksum How to use checksums |
0a66030a9cdbd5b4c4022b3b5ea50dde76ff9050da6b0812bdf5cc2f45882d68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | pyaeron-0.1.0-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 290.5 kB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f62bdd241d78d000bd436e2b9e4047936c5c9c96cc5232200b653265e4db0bce
|
|
BLAKE2b-256 checksum How to use checksums |
ee0383fa3167ff6b3a892aedb8b17911845fc7d2d1673c212238783ebd289e37
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | pyaeron-0.1.0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 359.7 kB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
f0f7a24b75eb74cef556f47b52a863da72bd061beb03f1bd60d4411c431bab0b
|
|
BLAKE2b-256 checksum How to use checksums |
2e9bdbf9b97f7c7242aed656ebff62f9325c0b76cc8a10cd0d6042efbc521f38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | pyaeron-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 290.8 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f43c3a1a7d236d07e9040fcc321f7c3eeed8dcd2fe94687d78bb4cb37ccca72f
|
|
BLAKE2b-256 checksum How to use checksums |
19dcb008706f8a402c824fb92e34632672766634701cec95a77f6d10b9788b2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | pyaeron-0.1.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 359.8 kB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6889d44b2aa2b5e8b653c29123717855cf114edf037490b0679ab7a156d7ec77
|
|
BLAKE2b-256 checksum How to use checksums |
0abd859cc49ab560234e679a39b1cf27cdafcfbbb066ad9d5e8770d0130b09bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / pyaeron-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | pyaeron-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 290.8 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
05b1c05b3f5b0a940c2107587b3c118dc59474ce505cc28b5b42aa829663de0d
|
|
BLAKE2b-256 checksum How to use checksums |
d66a788a8252f22418170937b35fbe9ccaec575cc31a56f6aad4493e9e1ebc32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for pyaeron 0.1.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.