flask-executor-pde
==============

This is a fork of [flask-executor library](https://github.com/dchevell/flask-executor/tree/bedbc1ee04bb93e886cc6691e79d122155dbbd48) 
The original library [documentation](https://flask-executor.readthedocs.io/) 

Installation
------------

Flask-Executor is available on PyPI and can be installed with:

    pip install flask-executor-pde


The fork includes a new executor's method "map_multiple", that allows running different functions in parallel 
and avoiding [the issue with flask request context](https://github.com/dchevell/flask-executor/issues/53).

Here's a quick example of using flask-executor-pde with "map_multiple":

```python
from flask import Flask
from flask_executor_pde.executor import Executor

app = Flask(__name__)

executor = Executor(app)


def send_email(recipient, subject, body):
    # Magic to send an email
    return True

def do_something_else(arg):
    # Something else
    return 


@app.route('/signup')
def signup():
    # Do signup form
    call_and_args_list = [
        (send_email, (recipient, subject, body)),
        (do_something_else, (1,))
    ]
    executor.map_multiple(call_and_args_list)
```


