Is there a way to combine Flask-SocketIO with uWSGI without monkey patching? #1949
-
Hi there, My problem is that this does not work with async endpoints:
So my question is: Is there a way to avoid monkey-patching? Or do you have an idea how I can fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
What you are doing is mixing several concurrency styles in one application and that is a recipe for trouble. I suggest that you go with a single type of concurrency and then choose your dependencies based on your selection. Flask-SocketIO does not work with asyncio, but you can use the python-socketio package (a dependency) in asynchronous applications. Of course it goes without say that if you do choose that route you will also have to drop Flask, which is also not fully supportive of asynchronous applications. |
Beta Was this translation helpful? Give feedback.
What you are doing is mixing several concurrency styles in one application and that is a recipe for trouble. I suggest that you go with a single type of concurrency and then choose your dependencies based on your selection. Flask-SocketIO does not work with asyncio, but you can use the python-socketio package (a dependency) in asynchronous applications. Of course it goes without say that if you do choose that route you will also have to drop Flask, which is also not fully supportive of asynchronous applications.