simple Helper library to configure AMQP communication
Project description
Introduction
amqp_helper
aims to be a simple Helper library to configure AMQP communication via other librarys like aio-pika
or pika
.
To achieve this goal this Library provides the AMQPConfig
class which enables us to configure the connection Parameters for other librarys in a unified way.
Installation
amqp_helper
can be installed in multiple ways. The easiest Solution is to install it with pip
.
via pip
python3 -m pip install amqp-helper
from source
git clone https://github.com/bad-microservices/amqp_helper.git
cd amqp_helper
python3 -m pip install .
Example (aio-pika)
import asyncio
from amqp_helper import AMQPConfig
from aio_pika import connect_robust
amqp_config = AMQPConfig(username="test",password="testpw",vhost="testvhost")
async def main():
connection = await connect_robust(**amqp_config.aio_pika())
# do some amqp stuff
if __name__ == "__main__":
asyncio.run(main())
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
amqp_helper-0.0.3.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for amqp_helper-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61d2712362bfcc2cc567ac443c3366364578683635ca6e4a7aaa35598e5cbf80 |
|
MD5 | 741128686eb61725bdcae661e9daa5ba |
|
BLAKE2b-256 | 798dfffde8957fb38e66c0de7e6663db9af560716023db4ff471e9ff02dd19bb |