Awesome Open Source
Awesome Open Source
Sponsorship

Flask-RQ2

.. image:: https://readthedocs.org/projects/flask-rq2/badge/?version=latest :target: https://flask-rq2.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status

.. image:: https://travis-ci.org/rq/Flask-RQ2.svg?branch=master :target: https://travis-ci.org/rq/Flask-RQ2 :alt: Test Status

.. image:: https://codecov.io/gh/rq/Flask-RQ2/branch/master/graph/badge.svg :target: https://codecov.io/gh/rq/Flask-RQ2 :alt: Test Coverage Status

.. image:: https://img.shields.io/badge/calver-YY.MINOR.MICRO-22bfda.svg :target: https://calver.org/ :alt: CalVer - Timely Software Versioning

Resources

  • Documentation <https://flask-rq2.readthedocs.io/>_
  • Issue Tracker <https://github.com/rq/flask-rq2/issues>_
  • Code <https://github.com/rq/flask-rq2/>_
  • Continuous Integration <https://travis-ci.org/rq/Flask-RQ2>_

.. snip

A Flask extension for RQ_ (Redis Queue).

This is a continuation of Flask-RQ_ more in spirit than in code. Many thanks to Matt Wright_ for the inspiration and providing the shoulders to stand on.

.. _RQ: http://python-rq.org/ .. _Flask-RQ: https://github.com/mattupstate/flask-rq .. _Matt Wright: https://github.com/mattupstate

Installation

.. code-block:: console

pip install Flask-RQ2

Getting started

To quickly start using Flask-RQ2, simply create an RQ instance:

.. code-block:: python

from flask import Flask
from flask_rq2 import RQ

app = Flask(__name__)
rq = RQ(app)

Alternatively, if you're using the application factory_ pattern:

.. code-block:: python

from flask_rq2 import RQ
rq = RQ()

and then later call init_app where you create your application object:

.. code-block:: python

from flask import Flask

def create_app():
    app = Flask(__name__)

    from yourapplication.jobs import rq
    rq.init_app(app)

    # more here..
    return app

.. _application factory: http://flask.pocoo.org/docs/0.10/patterns/appfactories/

.. snap

For more information see the full documentation <https://flask-rq2.readthedocs.io/>_ on Read The Docs.


Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
python (48,353
redis (864
queue (161
scheduler (122
jobs (64
tasks (43

Find Open Source By Browsing 7,000 Topics Across 59 Categories