Skip to main content

A persistent multi-producer multi-consumer gevent queue

Project description

gevent-queue is a lightweight, stateful multi-producer and multi-consumer queue. It was designed to work inside gevent-based web apps (especially Flask) so that you only need a single process. If you later wish to scale, you can easily spawn separate worker processes.

gevent-queue supports Redis to persist enqueued messages.

Installing

Install and update using pip:

pip install -U gevent-queue

Usage Example

import redis
import gevent-queue

r = redis.Redis()
q = gevent_queue.Queue(r, "myqueue")

q.put("foo")
q.put("bar")

print(q.get())
q.task_done()

print(q.get())
q.task_done()

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

gevent-queue-0.1.0.tar.gz (5.2 kB view hashes)

Uploaded Source

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