The trio-amqp
library is a pure-Python implementation of the AMQP 0.9.1 protocol.
Built on top of Trio, 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.
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.
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
Then you can run the tests with make test
(requires pytest
).
- Support message reception using async loops instead of callbacks.
- Add coverage reporting. Increase coverage (duh).
- Try restarting a failed AMQP connection instead of cancelling everything.