Skip to main content

aioartemis

CI PyPI Python

asyncio-native AMQP 1.0 client for ActiveMQ Artemis, built for running behind load balancers and failing over between nodes.

  • Reconnects to the next node on any connection loss, with jittered exponential backoff, and re-attaches senders and subscriptions.
  • At-least-once delivery with explicit outcomes: ambiguous sends raise SendOutcomeUnknown with the message_id to retry with; accept, nack, release and reject map to what Artemis does.
  • Built on Qpid Proton, whose event loop runs on a thread of its own, so heartbeats keep flowing while your event loop is busy.

Installation

pip install aioartemis

Python 3.12 or newer. aioartemis is pure Python, but its AMQP engine, python-qpid-proton, is published only as a source distribution and compiles against the system's OpenSSL, so install the build dependencies first, e.g. on Debian/Ubuntu:

apt-get install build-essential pkg-config libssl-dev

Without the OpenSSL headers it still installs, silently without TLS. See Installation for other systems and how to check.

Usage

import asyncio
from contextlib import suppress

from aioartemis import Client, DeliveryLost


async def main() -> None:
    urls = ["amqp://artemis-1:5672", "amqp://artemis-2:5672"]
    async with Client(urls, user="app", password="secret") as client:
        await client.send("orders", {"id": 42})

        async with client.subscribe("orders", prefetch=10) as orders:
            async for message in orders:
                print(message.body)
                # The connection dropped since the message arrived: the broker
                # redelivers it, so there is nothing left to settle.
                with suppress(DeliveryLost):
                    await message.accept()


asyncio.run(main())

For Litestar, pip install "aioartemis[litestar]" adds ArtemisPlugin, which runs the client for the application's lifetime, injects it into handlers and answers broker errors a retry can cure with 503; see Litestar.

Documentation

https://smirnoffmg.dev/aioartemis/

Examples

examples/ has runnable scripts for retrying ambiguous sends, an idempotent consumer, graceful shutdown, failover, topics and Litestar applications, with a Docker Compose file for two local nodes.

License

Apache License 2.0, see LICENSE.

Contributing

See CONTRIBUTING.md.

Metadata

Release files for aioartemis 0.5.0

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

Source distribution (sdist)

Source distribution for aioartemis 0.5.0
File Size Uploaded Provenance Actions
aioartemis-0.5.0.tar.gz 45.5 kB With provenance Details for aioartemis-0.5.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aioartemis 0.5.0
File Interpreter ABI Platform Actions
aioartemis-0.5.0-py3-none-any.whl Python 3 none any Details for aioartemis-0.5.0-py3-none-any.whl

Total release size: 76.0 kB

Release files / aioartemis-0.5.0.tar.gz

Download URL aioartemis-0.5.0.tar.gz
Size 45.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b6515a580cb3977126aee11540db33362a5f96666aeb22cec5169c58b9e6777a
BLAKE2b-256 checksum
How to use checksums
f3e5fe2be5c6b122430aa570a7a620e8a177a5fc22fa4b2944c59bc44958a373
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 28, 2026.

Transparency log

Release files / aioartemis-0.5.0-py3-none-any.whl

Download URL aioartemis-0.5.0-py3-none-any.whl
Size 30.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbc355c95290edea644295bcb386df11afd0d0a2801866d88fbeaf7cccbb1a4d
BLAKE2b-256 checksum
How to use checksums
44123ec4348a7a3c38f9eb2dfb23166e307bafe639871114babeeaa9e6c6ef99
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 28, 2026.

Transparency log

Security for aioartemis 0.5.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for aioartemis-0.5.0.tar.gz

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 28, 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