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.3.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for sparta_rabbit-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2e33aa102f1d9edfd8eee228b50bc8548e46ae3f145e8edd5a526e06d0a4390 |
|
MD5 | 6b38ee6ed19990467d4bf0297385f4de |
|
BLAKE2b-256 | ab98ee2fb7e810a7829e8d99ee9b235e047eeee9629df93e178f9827a1902661 |