Flask-Coney

Add Pika support to your Flask application.


Keywords
flask, pika, rabbitmq
License
MIT
Install
pip install Flask-Coney==1.1.4

Documentation

Flask-Coney

PyPi Read the Docs Tests Coverage

Flask-Coney is an extension for Flask that adds support for Pika to your application. It aims to simplify using Pika with Flask by providing useful defaults and extra helpers that make it easier to accomplish common tasks.

Installing

Install and update using pip:

$ pip install -U Flask-Coney

A Simple Example

from flask import Flask
from flask_coney import Coney

app = Flask(__name__)
app.config["CONEY_BROKER_URI"] = "amqp://guest:guest@rabbitmq"
coney = Coney(app)

@coney.queue(queue_name="test")
def test_queue(ch, method, props, body):
    pass


def publish_to_queue():
    coney.publish({"test": 1}, routing_key="test")

Contributing

For guidance on setting up a development environment and how to make a contribution to Flask-Coney, see the contributing guidelines.

Links