// the find
miguelgrinberg/python-socketio
Python Socket.IO server and client
A Python implementation of the Socket.IO protocol, covering both server and client sides. It supports sync (eventlet/gevent) and async (asyncio) modes and integrates with Flask, Django, FastAPI, aiohttp, Tornado, and Sanic. This is the de facto choice if you need Socket.IO in Python.
The sync/async split is properly handled — there are parallel class hierarchies rather than bolting async onto a sync core. Pub/sub managers for Redis, RabbitMQ, Kafka, Kombu, and ZMQ mean you can scale horizontally without changing your event handler code. The protocol version compatibility table in the README is honest about what works with what JavaScript version — you won't be left guessing when things break across versions. Test coverage is high and split meaningfully between common, async, and sync variants.
The sync mode still depends on eventlet or gevent monkey-patching, which is a trap that breaks things like psycopg2, certain logging setups, and SSL in subtle ways that aren't always obvious until production. The multi-server model pushes message brokering to external infrastructure (Redis etc.) with no built-in fallback, so your Socket.IO layer inherits the failure modes of your message bus. The SimpleClient abstraction added in v5 is convenient but paper-thin — if you hit any edge case around reconnection or acknowledgements, you'll end up rewriting against the full Client anyway. Documentation is complete but aging in style; the async patterns in the examples are written for Python 3.7-era idioms.