Flask Multithreading with Python Flask Multithreading with Python flask flask

Flask Multithreading with Python


Yes you can. You just need to import the threading module.

import threadingdef function1():    # your code heredef function2():   # your code here

You start threads like this:

threading.Thread(target=function1).start()threading.Thread(target=function2).start()

Both will live at the same time

You can find nice tutorial over there for further explanations :)