skillfed

aio-pika

Wrapper around the aiormq for asyncio and humans

aio-pika v10.0.1 6.1M downloads/30d#1,975 on PyPI1,471
Permissive license Apache-2.0 Active released

What it is and what it does

aio-pika is a Python library that wraps the lower-level aiormq AMQP client to provide a more developer-friendly, object-oriented interface for RabbitMQ messaging in asyncio applications. It handles the complexity of AMQP protocol details while exposing simple methods for declaring exchanges and queues, publishing messages, and consuming from queues. The library includes automatic reconnection with state recovery (via connect_robust), support for publisher confirms and transactions, and complete type hints for modern Python development.

You use aio-pika when you need to integrate RabbitMQ into an async Python service—whether as a message publisher, consumer, or both. It abstracts away protocol-level concerns so you can focus on business logic, and it's designed for Python 3.11+ with support for current and near-future Python versions. The two core dependencies (aiormq for the AMQP protocol implementation and yarl for URL parsing) are lightweight, making installation straightforward.

Use it for:

  • Build async microservices that publish and consume messages from a shared RabbitMQ broker.
  • Implement task queues or job workers that process messages asynchronously from RabbitMQ.
  • Create event-driven architectures where services communicate via RabbitMQ exchanges and queues.
  • Handle message acknowledgment and publisher confirms for reliable message delivery patterns.
  • Recover from connection failures automatically while preserving declared queues and bindings.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

aio-pika is an asyncio-based wrapper around aiormq that provides a high-level, object-oriented API for publishing and consuming messages on RabbitMQ via AMQP.

Yes. aio-pika is actively maintained, has no known vulnerabilities, installs with minimal friction, and is widely used (top 5000 PyPI packages). It's the right choice if you're building asyncio-based services that need RabbitMQ integration. The Apache-2.0 license is permissive for any use case. Only caveat: requires Python 3.11+, so check your project's minimum version.

Install

aio-pika on PyPI

pip

pip install aio-pika

uv

uv add aio-pika

poetry

poetry add aio-pika

Installing aio-pika

Before you install

Low friction: pure Python wheel with only two runtime dependencies (aiormq and yarl). Actively maintained with a recent release (36 days old) and consistent repository activity.

License in practice

Apache-2.0 is permissive; you can use aio-pika in proprietary projects and modify it freely, with minimal obligations beyond attribution.

Quickstart

pip install aio-pika

import asyncio
import aio_pika

async def main():
    connection = await aio_pika.connect_robust("amqp://guest:guest@127.0.0.1/")
    channel = await connection.channel()
    queue = await channel.declare_queue("test_queue")
    await connection.close()

asyncio.run(main())

Requires Python 3.11 or later; a running RabbitMQ server is needed for actual message operations.

Verify before relying

  • Performance characteristics under high message throughput or large cluster deployments.
  • Specific reconnection behavior and recovery guarantees with connect_robust in edge cases.
  • Compatibility with RabbitMQ versions beyond the AMQP 0.9.1 protocol it targets.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4,>=3.11)
Install friction low — pure-Python wheel
Runtime dependencies 2 — aiormq, yarl
Maintenance actively maintained — 36 days since the last release
Last repo commit
First released
Downloads 6,065,468/month — #1,975 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: aio_pika-10.0.1-py3-none-any.whl

Keywords: rabbitmq, asyncio, amqp, amqp 0.9.1, aiormq

Intended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseNatural Language :: EnglishOperating System :: MacOSOperating System :: MicrosoftOperating System :: POSIXProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: InternetTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTyping :: Typed

Tags

rabbitmq async clientamqp asyncio wrapperasync message queue pythonrabbitmq publisher consumeramqp 0.9.1 asyncioasync rabbitmq libraryaiormq high-level api
rabbitmqasync-messagingamqp

More Software Development packages