Skip to content Skip to sidebar Skip to footer

Requests Not Able Call Multiple Routes In Same Flask Application

I am not able to successfully use Python Requests to call a second route in the same application using Flask. I know that its best practice to call the function directly, but I nee

Solution 1:

Your code assumes that your app can handle multiple requests at once: the initial request, plus the request that is generated while the initial is being handled.

If you are running the development server like app.run(), it runs in a single thread by default; therefore, it can only handle one request at a time.

Use app.run(threaded=True) to enable multiple threads in the development server.


As of Flask 1.0 the development server is threaded by default.

Post a Comment for "Requests Not Able Call Multiple Routes In Same Flask Application"