Server events with Nginx and uWSGI

Is it possible to use server-sent events from a python / Flask application that is behind uWSGI and Nginx?

I found packages that implement SSE in python / Flask, but they seem to do it all with gevent and greenlets.

https://github.com/DazWorrall/flask-sse

Thanks!

+6
source share
2 answers

Can't you just use gevent with uWSGI?

Typically, such technologies should be used with asynchronous motors, since a multi-threaded / multi-process paradigm will be too expensive.

0
source

Recent versions of uWSGI (from version 1.9) have built-in support for websockets / SSE. This article provides excellent guidance:

uWSGI docs: Offloading Web sites and events sent by the server

0
source

All Articles