An easy to use Flask wrapper for concurrent.futures
Project description
Flask-Executor
Sometimes you need a simple task queue without the overhead of separate worker processes or powerful-but-complex libraries beyond your requirements. Flask-Executor is an easy to use wrapper for the concurrent.futures
module that lets you initialise and configure executors via common Flask application patterns. It's a great way to get up and running fast with a lightweight in-process task queue.
Installation
Flask-Executor is available on PyPI and can be installed with:
pip install flask-executor
Quick start
Here's a quick example of using Flask-Executor inside your Flask application:
from flask import Flask
from flask_executor import Executor
app = Flask(__name__)
executor = Executor(app)
def send_email(recipient, subject, body):
# Magic to send an email
return True
@app.route('/signup')
def signup():
# Do signup form
executor.submit(send_email, recipient, subject, body)
Documentation
Check out the full documentation at flask-executor.readthedocs.io!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for Flask_Executor-0.6.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c890e2a8a0aab79190edb74cbe519b374438cf447ad1749e7ce0fdd6dea7137c |
|
MD5 | c55cf5a37245cef9cccc5338a933ced5 |
|
BLAKE2b-256 | e38e8fd533f0d0a6681a9b9729a6fec9310996427d88c55815eab9a16f82dcb2 |