Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/taoget/flask-celery
Celery 3.0+ integration for Flask (Python 3.4+)
https://github.com/taoget/flask-celery
celery flask python
Last synced: 1 day ago
JSON representation
Celery 3.0+ integration for Flask (Python 3.4+)
- Host: GitHub
- URL: https://github.com/taoget/flask-celery
- Owner: taogeT
- License: bsd-2-clause
- Created: 2016-03-27T02:19:32.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-10-10T03:20:35.000Z (over 8 years ago)
- Last Synced: 2025-01-15T14:15:34.652Z (13 days ago)
- Topics: celery, flask, python
- Language: Python
- Homepage: https://pypi.python.org/pypi/Flask-Celery-py3
- Size: 14.6 KB
- Stars: 5
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
=============================
Flask Celery 3.0+ Integration
=============================
.. image:: https://img.shields.io/pypi/v/Flask-Celery-py3.svg
:target: https://pypi.python.org/pypi/Flask-Celery-py3/
.. image:: https://img.shields.io/pypi/l/Flask-Celery-py3.svg
:target: https://pypi.python.org/pypi/Flask-Celery-py3
.. image:: https://img.shields.io/pypi/pyversions/Flask-Celery-py3.svg
:target: https://pypi.python.org/pypi/Flask-Celery-py3/
.. image:: https://img.shields.io/pypi/status/Flask-Celery-py3.svg
:target: https://pypi.python.org/pypi/Flask-Celery-py3/Celery: http://celeryproject.org
Using Flask-Celery
==================You can easily add Celery to your flask application like this:
``app.py``::
from flask_celery import Celery
celery = Celery()
def create_app():
app = Flask(__name__)celery.init_app(app)
return app
@celery.task
def add(x, y):
return x + yTo start the worker you can then launch the ``celery worker`` command
by pointing to your ``celery`` app instance::$ celery -A app:celery worker -l info
If your flask application has complex condition, you can refer to the example https://github.com/taogeT/flask-celery .