Skip to main content

An easy pythonic redis-based MQ

Project description

kuqueue

Build Status codecov Code style: black PyPI version

A lightweight, pythonic wrapper around pyrsmq to expose MQ semantics over vanilla redis

Continuously tested against a recent redis instance and python>=3.8

Install

pip install kuqueue

For development, clone this repo and run make install.

Usage example

from redis import StrictRedis
from kuqueue import create_kuqueue

redis: StrictRedis
kq = create_kuqueue(redis, namespace="your-app-name", qname="name-of-your-queue", default_job_timeout=30)
kq.create()          # ensures the queue exists in your redis
kq.push(b"message")  # push message with raw bytes data
msg = kq.pull()      # pull a message from the queue, blocking
...                  # do some some work
kq.ack(msg.id)       # acknowledge the message, delete it from the queue

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

kuqueue-0.1.2.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

kuqueue-0.1.2-py3-none-any.whl (3.1 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