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()),
        mandatory=True)

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

if __name__ == '__main__':
    asyncio.run(main())

Documentation

http://aiorabbit.readthedocs.org

License

BSD

Python Versions Supported

3.7+

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 details)

Uploaded Source

File details

Details for the file aiorabbit-0.1.0a1.tar.gz.

File metadata

  • Download URL: aiorabbit-0.1.0a1.tar.gz
  • Upload date:
  • Size: 14.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6

File hashes

Hashes for aiorabbit-0.1.0a1.tar.gz
Algorithm Hash digest
SHA256 35befc70077e7499503fd139f624787548a428246f9e16b34e7a705586295ac5
MD5 797f06c2c8bb00baadb845764e882f43
BLAKE2b-256 39d2195c9fa9eae02b1b1572df3c5eba80a4f49f5d714c0a11189f13a5c1ed47

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page