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.2.tar.gz
(4.7 kB
view hashes)
Built Distribution
Close
Hashes for amqp_helper-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ae50a6cff4c7c2ec5f2c0930dbce731b4af82100a897ace85e9254531701110 |
|
MD5 | f15fc82e9a07516c44bbab98891750a6 |
|
BLAKE2b-256 | 452816ceb618418142b68fcc8e273a404162494728b0af6dd200b0d10b85e3dd |