Sometimes, we want to serve multiple clients using just Python Flask app.run() as standalone.
In this article, we’ll look at how to serve multiple clients using just Python Flask app.run() as standalone.
How to serve multiple clients using just Python Flask app.run() as standalone?
To serve multiple clients using just Python Flask app.run() as standalone, to set the threaded
argument to False
.
For instance, we write
if __name__ == '__main__':
app.run(threaded=False, processes=3)
to call app.run
with threaded
set to False
and `proceses set to 3 to spawn 3 processes.
Conclusion
To serve multiple clients using just Python Flask app.run() as standalone, to set the threaded
argument to False
.