Skip to content

philpep/flasque

Repository files navigation

flasque - HTTP queues

image

flasque is a flask application exposing redis based queues and a client API using requests.

Installation

To install using pip,:

$ pip install git+https://github.com/philpep/flasque

Hello world

launch flasque server:

$ flasque runserver
from flasque.client import Connection

with Connection("http://localhost:5000") as conn:
    producer = conn.Producer("my_queue")
    consumer = conn.Consumer("my_queue")
    producer.put("hello world")
    message = consumer.get()
    print("received " + message)
    # You have to acknowledge the message
    consumer.task_done()