w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Using requests module in flask route function

You are running your WSGI app with the Flask test server, which by default uses a single thread to handle requests. So when your one request thread tries to call back into the same server, it is still busy trying to handle that one request.

You'll need to enable threading:

if __name__ == "__main__":

or use a more advanced WSGI server; see Deployment Options.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.