You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Flask-SocketIO currently doesn’t support async def event listeners, async methods in class-based namespaces, or async/await syntax. This limits developers from fully utilizing async functionality within the framework, leading to workarounds and increased complexity.
Describe the solution you'd like
I propose adding support for:
async def event listeners.
Async methods in class-based namespaces.
Full async/await syntax support for event handling in Flask-SocketIO.
This would allow Flask-SocketIO users to write clean, async code directly within the framework.
Describe alternatives you've considered
I’ve considered using Flask with the async extra and python-socketio separately, but this requires additional setup and increases complexity. Adding async support to Flask-SocketIO would provide a seamless solution within the existing framework.
Additional context
Enabling async support in Flask-SocketIO would make it more powerful and scalable for real-time applications, making the framework more appealing to developers looking for async solutions.
The text was updated successfully, but these errors were encountered:
I am open to merging a PR that adds this, but fair warning, this isn't going to be as great as you seem to think it will be.
Full async/await syntax support for event handling in Flask-SocketIO.
Full async support is not possible, in the same way it isn't possible for Flask.
I’ve considered using Flask with the async extra and python-socketio separately
This would not work, sadly. Flask remains synchronous internally and cannot integrate with pure async code.
Adding async support to Flask-SocketIO would provide a seamless solution within the existing framework.
The Flask async support is not "seamless", as it has important limitations. See the discussion on performance and background tasks in the Flask docs if you are not familiar with the issues.
But as I said above, a simple PR that adds support for async views is fine, I have no problem with that.
Is your feature request related to a problem? Please describe.
Flask-SocketIO currently doesn’t support async def event listeners, async methods in class-based namespaces, or async/await syntax. This limits developers from fully utilizing async functionality within the framework, leading to workarounds and increased complexity.
Describe the solution you'd like
I propose adding support for:
This would allow Flask-SocketIO users to write clean, async code directly within the framework.
Describe alternatives you've considered
I’ve considered using Flask with the async extra and python-socketio separately, but this requires additional setup and increases complexity. Adding async support to Flask-SocketIO would provide a seamless solution within the existing framework.
Additional context
Enabling async support in Flask-SocketIO would make it more powerful and scalable for real-time applications, making the framework more appealing to developers looking for async solutions.
The text was updated successfully, but these errors were encountered: