Skip to content

async/await support for flask-socketio #2112

Open
@Ashif4354

Description

@Ashif4354

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:

  1. async def event listeners.
  2. Async methods in class-based namespaces.
  3. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions