Skip to main content

Python client wrapper for the qrusty API.

Project description

qrusty_pyclient

A Python client wrapper for the qrusty API.

Features

  • Connect to a qrusty server
  • Publish, consume, ack, and purge messages
  • List and manage queues

Installation

pip install qrusty_pyclient

Usage

from qrusty_pyclient import QrustyClient

client = QrustyClient(base_url="http://localhost:6784")
client.create_queue(name="orders", ordering="MaxFirst", allow_duplicates=True)
client.publish(queue="orders", priority=100, payload={"order_id": 123})

# Text priorities are also supported for queues with priority_kind="Text"
client.create_queue(name="tags", ordering="MinFirst", priority_kind="Text")
client.publish(queue="tags", priority="alpha", payload={"tag": "first"})
message = client.consume(queue="orders", consumer_id="worker-1")
if message is not None:
    client.ack(queue="orders", message_id=message["id"], consumer_id="worker-1")

Development

Don't forget your ~/.pypirc file if you intend to publish to PyPI.

License

MIT

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

qrusty_pyclient-0.21.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

qrusty_pyclient-0.21.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file qrusty_pyclient-0.21.0.tar.gz.

File metadata

  • Download URL: qrusty_pyclient-0.21.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for qrusty_pyclient-0.21.0.tar.gz
Algorithm Hash digest
SHA256 0a90c33ca0db33c5097b655c6a60500722011526b986edc2eb991dff25476bb8
MD5 fc22c6f7c700ad69cddca3f7633df9eb
BLAKE2b-256 ecf736c0df6aa0006dfcd47f5ace39290d5927ddead525eb3dcfb7601aa66171

See more details on using hashes here.

File details

Details for the file qrusty_pyclient-0.21.0-py3-none-any.whl.

File metadata

File hashes

Hashes for qrusty_pyclient-0.21.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6220a06634638a49e7e1e14e56ce0a3d15c97fd4be3f6bc095889e7629ffbc52
MD5 87b24740cf2178d90544e3754d48ea34
BLAKE2b-256 d6f8c7a85e2ad44cf3b003cb10c9f12300b4a78e4acc9fd1d5f1a1e40ed2669a

See more details on using hashes here.

Supported by

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