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.4.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for amqp_helper-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbbf580b29056b7536aca4aeb28522d6f553f05c366a400390b24c2c55c40a84 |
|
MD5 | 7dfcf09d301908cdec572ef3fadedf89 |
|
BLAKE2b-256 | c4fad645a8e1978e7c5cfb4f33f75ce6fd36dd88d7218a8cebbcf3d13a7e2eb3 |