python-socketio + FastAPI
The standard Python Socket.IO server is python-socketio. It supports asgi, integrates with FastAPI, and ships a Redis manager for horizontal scaling. The pattern: build the FastAPI app for your REST endpoints, build a Socket.IO server with AsyncServer, wrap both in ASGIApp, and uvicorn serves the lot.
Auth in connect
Socket.IO's connect handler receives an auth dict separately from query string and headers — the client passes it via the SDK's auth option. Validate; if invalid, raise ConnectionRefusedError and the client never sees the connection succeed. Save user identity to sio.save_session(sid, ...) for use in later handlers.