Sparta rabbit library
Project description
sparta-rabbit
Sparta rabbit library.
Usage
import sparta.rabbit
con_data = sparta.rabbit.RabbitMQConnectionData(
host="localhost",
username="guest",
password="guest",
)
publisher = sparta.rabbit.RabbitMQPublisher(con_data)
await publisher.create_queue("hello")
await publisher.publish_to_queue("hello", "hi there")
consumer = sparta.rabbit.RabbitMQConsumer(con_data)
await consumer.listen_to_queue("hello", lambda message: print(f"Received {message}"), timeout=10)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sparta-rabbit-0.0.1.tar.gz
(6.3 kB
view hashes)
Built Distribution
Close
Hashes for sparta_rabbit-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68be3a5691a439b41978e6c76d36287f74defb8df3ade0d52be6ef19bc925fbb |
|
MD5 | f2aa426dd1d1d214dc6a4a8456ac4641 |
|
BLAKE2b-256 | b1ffe3b2383da87abcfbb53654fdec2dfc96b49c136cb77f9ec3a8ba5a095221 |