Sparta rabbit library
Project description
sparta-rabbit
Sparta rabbit library.
Usage
import sparta.rabbit
conn_provider = sparta.rabbit.RabbitMQConnectionProvider(
host="localhost",
username="guest",
password="guest",
connection_name="some-identifier", # this allows to identify the connection in RabbitMQ dashboard
)
client = sparta.rabbit.RabbitMQClient(conn_provider)
await client.create_queue("hello")
await client.publish_to_queue("hello", "hi there")
await client.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.6.tar.gz
(6.0 kB
view hashes)
Built Distribution
Close
Hashes for sparta_rabbit-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62792b0494e8671ae48e3cff3a6b5540a00be23515bc4221904214cff63f70cf |
|
MD5 | 8b1e9ae3454b15dd290c338ecb1785ec |
|
BLAKE2b-256 | 2970e7b1b7cdce3504bf732bb4bde468ed2b14d5e5b315ff5441d10347b423b6 |