https://github.com/pyapp-org/pyapp.aio-pika
pyApp Extension for AMQP (aio-pika)
https://github.com/pyapp-org/pyapp.aio-pika
Last synced: about 2 months ago
JSON representation
pyApp Extension for AMQP (aio-pika)
- Host: GitHub
- URL: https://github.com/pyapp-org/pyapp.aio-pika
- Owner: pyapp-org
- License: other
- Created: 2019-07-04T01:40:31.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-12-09T23:39:02.000Z (over 6 years ago)
- Last Synced: 2025-03-06T03:15:21.588Z (over 1 year ago)
- Language: Python
- Size: 20.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
################
pyApp - aio-pika
################
*Let us handle the boring stuff!*
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/ambv/black
:alt: Once you go Black...
This extension provides a *client* factory for
`aio-pika `_ to allow connection parameters
to be configured in a pyApp settings file. The extension also provides
`pyApp Messaging `_ implementations
of Message and Pub/Sub queue types.
The extension also provides checks to confirm the settings are correct.
Installation
============
Install using *pip*::
pip install pyapp-aio-pika
Install using *pipenv*::
pipenv install pyapp-aio-pika
Usage
=====
API
===
Messaging Interface
-------------------
The is the abstract interface defined by *pyApp Messaging*. Unless your application
has very specific needs this is likely the best option.
To use the messaging interface use the factories defined by
`pyApp Messaging `_.
Both AsyncIO Message and Pub/Sub queue types are supported.
`pyapp_ext.messaging.asyncio.DirectSender`
Message sender, uses a direct exchange.
`pyapp_ext.messaging.asyncio.FanOutReceiver`
Pub/Sub queue publisher, uses fan-out exchange.
`pyapp_ext.messaging.asyncio.Receiver`
Message receiver, uses a persistent queue linked to an exchange.
`pyapp_ext.messaging.asyncio.FanOutReceiver`
Pub/Sub queue subscriber, uses a exclusive queue linked to an exchange.
Low Level
---------
`pyapp_ext.aio_pika.get_robust_connection(name: str = None) -> Connection`
Get a "robust" connection from AIO Pika
`pyapp_ext.aio_pika.get_connection(name: str = None) -> Connection`
Get a connection from AIO Pika