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.4.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for sparta_rabbit-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a31624070aa1241c74bfdf5bcbc545c021c03b5f19b73011457a815b6865ebb |
|
MD5 | bd243682fbf2726ec7f866698b127b75 |
|
BLAKE2b-256 | 62d8f347ae8921ac8654d68e4437e5a21b698180e072217f2cc04ffbb22bc277 |