Skip to main content

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)

Uploaded Source

Built Distribution

sparta_rabbit-0.0.4-py3-none-any.whl (5.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page