Search code examples
pythonflaskflask-restful

how to handlde multiple concurrent request in flask


I wanted to create a variable which will keep the request object per restful service call during entire slice. I am not sure what is the best way to handle it in Flask. I am using Flask + Mongoengine. The reason for this is because I want to pass the same information to every CRUD operations to record the request.

Will

g

is right option or something else?


Solution

  • You will need to set app.run(threaded=True)) in order to make your Flask application capable of handling multiple concurrent requests.

    You may also like to go through the URL - http://flask.pocoo.org/docs/1.0/tutorial/deploy/.