Metadata-Version: 2.1
Name: kuqueue
Version: 0.1.2
Summary: An easy pythonic redis-based MQ
Home-page: https://github.com/yehonatanz/kuqueue
License: MIT
Keywords: rsmq,mq,queue,redis,kuqueue
Author: Yehonatan Zecharia
Author-email: yonti95@gmail.com
Requires-Python: >=3.8,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: System :: Distributed Computing
Requires-Dist: pyrsmq (>=0.4.3,<0.5.0)
Requires-Dist: redis (>=3.5.3,<4.0.0)
Project-URL: Repository, https://github.com/yehonatanz/kuqueue
Description-Content-Type: text/markdown

# kuqueue
[![Build Status](https://travis-ci.org/yehonatanz/kuqueue.svg?branch=main)](https://travis-ci.org/yehonatanz/kuqueue)
[![codecov](https://codecov.io/gh/yehonatanz/kuqueue/branch/main/graph/badge.svg?token=01O6IAXMR2)](https://codecov.io/gh/yehonatanz/kuqueue)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![PyPI version](https://badge.fury.io/py/kuqueue.svg)](https://badge.fury.io/py/kuqueue)

A lightweight, pythonic wrapper around [pyrsmq](https://github.com/mlasevich/PyRSMQ) to expose MQ semantics over vanilla redis

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

### Install
```bash
pip install kuqueue
```

For development, clone this repo and run `make install`.

### Usage example
```python
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
```

