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.6.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for amqp_helper-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bb6edb417f8f1050728605611f8460cce6b311a6887d6410ddb964331c063a6 |
|
MD5 | 3888678a70045d6a1baeab18feca5ce4 |
|
BLAKE2b-256 | df3804da09dd42fee052eb6dbadb2a9a4a0fd5abd3b8bfbeb2b86c61c690baf4 |