All Projects → matthieugouel → python-flask-celery-example

matthieugouel / python-flask-celery-example

Licence: MIT license
Flask Rest API with the use of Celery

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to python-flask-celery-example

metroid
Metroid - Metro for Django (An async Azure Service Bus receiver, triggering task in Celery/RQ)
Stars: ✭ 27 (-34.15%)
Mutual labels:  celery
celery-beatx
Modern fail-safety scheduler for Celery
Stars: ✭ 46 (+12.2%)
Mutual labels:  celery
LazyBlacksmith
EVE Online Industry app written in python (flask) for backend, html / css / js for frontend
Stars: ✭ 44 (+7.32%)
Mutual labels:  celery
UpSnap
A simple wake on lan app written with Django, Django-Channels (websockets), Celery, Redis and nmap.
Stars: ✭ 65 (+58.54%)
Mutual labels:  celery
cyme
Celery Instance Manager
Stars: ✭ 50 (+21.95%)
Mutual labels:  celery
leek
Celery Tasks Monitoring Tool
Stars: ✭ 77 (+87.8%)
Mutual labels:  celery
docker-compose-django-postgresql-redis-example
Django + Postgres + Redis + Celery + Celery Beat + WebSocket server
Stars: ✭ 158 (+285.37%)
Mutual labels:  celery
IATI.cloud
The open-source IATI datastore for IATI data with RESTful web API providing XML, JSON, CSV output. It extracts and parses IATI XML files referenced in the IATI Registry and powered by Apache Solr.
Stars: ✭ 35 (-14.63%)
Mutual labels:  celery
python-asynchronous-tasks
😎Asynchronous tasks in Python with Celery + RabbitMQ + Redis
Stars: ✭ 37 (-9.76%)
Mutual labels:  celery
sarjitsu
dockerized setup for visualizing System Activity Report (SAR) data.
Stars: ✭ 20 (-51.22%)
Mutual labels:  celery
celery-kubernetes-example
Small Flask app with scalable, asynchronous backend workers deployed on Kubernetes.
Stars: ✭ 79 (+92.68%)
Mutual labels:  celery
antinex-core
Network exploit detection using highly accurate pre-trained deep neural networks with Celery + Keras + Tensorflow + Redis
Stars: ✭ 19 (-53.66%)
Mutual labels:  celery
celery-serverless
AWS Lambda running a Celery worker. Should be compatible with Google Functions and friends via Serverless too.
Stars: ✭ 29 (-29.27%)
Mutual labels:  celery
kubernetes django
Deploying django application on kubernetes
Stars: ✭ 22 (-46.34%)
Mutual labels:  celery
flickr to google photos migration
A tool for migrating your photo library from Flickr to Google Photos
Stars: ✭ 39 (-4.88%)
Mutual labels:  celery
Final-Senior-Year-Project-
My College Final(Senior) Year Project
Stars: ✭ 98 (+139.02%)
Mutual labels:  celery
Hot-Food
Fully open-source online food delivery website built using Python, Django web framework, Bootstrap4, Vanilla Javascript, and more...
Stars: ✭ 122 (+197.56%)
Mutual labels:  celery
lightflow
A lightweight, distributed workflow system
Stars: ✭ 67 (+63.41%)
Mutual labels:  celery
flask-docker-compose
Flask application development skeleton with docker-compose
Stars: ✭ 22 (-46.34%)
Mutual labels:  celery
django-learning-pathway
(Currently in development) Learning pathways for learning Django.
Stars: ✭ 35 (-14.63%)
Mutual labels:  celery

Python3 Flask Rest API with Celery example

Build Status Coverage Status license

This project is an example of using Flask-restful and celery to perform asynchronous tasks.

Installation

Note : The installation into a virtualenv is heavily recommended.

If you want to install the package :

pip install .

For development purposes, you can install the package in editable mode with the dev requirements.

pip install -e . -r requirements-dev.txt

Usage

To start the application, you can use the file run.py :

python run.py

Moreover, to be able to play with celery, you have to first start Redis, then start a celery worker like this :

celery -A run.celery worker --loglevel=info

Note : It's cleaner to use docker-compose to start the whole application (see the section below).

Usage with Docker Compose

In order to start the whole system easily, we can use docker-compose :

docker-compose up

It will start three docker containers :

  • Redis
  • Flask API
  • Celery Worker

Then, you can access to the API in localhost :

curl -X GET -H "Content-Type: application/json" localhost:5000/api/bye/test

Syntax

You can check the syntax using flake8 (you must have flake8 package installed first) :

flake8 api

You can also use tox (you must have tox package installed first) :

tox -e lint

Test coverage

To execute the test coverage, you must install the package with the dev requirements (see installation section).

You can run the coverage with the following command :

coverage run --source api -m py.test

You can also use tox (you must have tox package installed first) :

tox -e test
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].