Skip to main content

An AsyncIO RabbitMQ Client Library

Project description

aiorabbit is an AsyncIO RabbitMQ client for Python 3.

Version Build Status Coverage License

Project Goals

  • To create a simple, robust RabbitMQ client library for AsyncIO development in Python 3

  • To make use of new features and capabilities in Python 3.7+

  • To abstract away the AMQP channel and use it only as a protocol coordination mechanism inside the client

  • To provide built-in support for multiple brokers and automatic reconnection

Example Use

The following demonstrates an example of the intended behavior for the library:

import time
import uuid

import aiorabbit

RABBITMQ_URL = 'amqps://guest:guest@localhost:5672/%2f'

async def main():
    client = await aiorabbit.connect(RABBITMQ_URL)
    await client.confirm_select()

    response = await client.publish(
        'exchange', 'routing-key', 'message-body', app_id='example',
        message_id=str(uuid.uuid4()), timestamp=int(time.time()),

    if not response.ok:
        print('Publishing failure: {!r} {!r}'.format(
            response.error, response.message))

if __name__ == '__main__':




Python Versions Supported


Project details

Download files

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

Source Distribution

aiorabbit-0.1.0a1.tar.gz (14.0 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page