简体   繁体   中英

Flask: receiving asynchronous POST requests?

On the python end, I'm envisioning an HTTP end point written in flask to accept data sent from the javascript (asynchronous POST request).

On receiving the POST request, it will write to an sqlite3 database.

The problem I have is that Flask is not asynchronous so how will it handle many POST requests being fired at it and not run into problems?

One option is to use uWSGI in conjunction with the gevent loop in order to avoid blocking.

Check out the docs: http://uwsgi-docs.readthedocs.org/en/latest/Gevent.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM