Skip to content

python-trio/trio-amqp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Jan 18, 2023
9a57230 · Jan 18, 2023
Jan 18, 2023
Jan 3, 2021
Jan 18, 2023
Jun 7, 2021
Jun 7, 2021
Jan 5, 2023
Jan 3, 2021
Feb 11, 2020
Jan 4, 2019
Feb 13, 2018
Feb 14, 2018
Jun 7, 2021
Jan 3, 2021
Jan 3, 2021
Oct 31, 2020
Jan 3, 2021
May 19, 2014
Jan 5, 2023
Jan 3, 2021
Nov 28, 2018
Jan 3, 2021
Jan 3, 2021
Jan 5, 2023
Jun 7, 2021

Repository files navigation

Join chatroom Documentation Status Automated test status Test coverage

async_amqp

The async_amqp library is a pure-Python implementation of the AMQP 0.9.1 protocol.

Built on top of anyio, it provides an API based on coroutines, making it easy to write highly concurrent applications.

Bug reports, patches and suggestions welcome! Just open an issue or send a pull request.

Status

The code works. Porting code that uses aioamqp (or even plain python-amqp) should be reasonably straightforward.

All tests from aioamqp have been ported and succeed.

async_amqp was renamed from asyncamqp, but that was taken on pypi. asyncamqp was renamed from trio_amqp but anyio support was deemed to be a good idea. trio_amqp in turn was forked from aioamqp.

tests

To run the tests, you'll need to install the Python test dependencies:

pip install -r ci/requirements_dev.txt

Tests require an instance of RabbitMQ. You can start a new instance using docker:

docker run -d --log-driver=syslog -e RABBITMQ_NODENAME=my-rabbit --name rabbitmq -p 5672:5672 -p 15672:15672 rabbitmq:3-management

RabbitMQ requires a "guest" user (password "guest") with admin privileges.

You can run the tests with make test (requires pytest).

tests using docker-compose

Start RabbitMQ using docker-compose up -d rabbitmq. When RabbitMQ has started, start the tests using docker-compose up --build aioamqp-test

Future work

  • Add coverage reporting. Increase coverage (duh).
  • Try restarting a failed AMQP connection instead of cancelling everything.