python-socketio

Python implementation of the Socket.IO realtime protocol for both servers and clients.

Library
PyPI
v5.17.0
4,371 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
82 /100 Excellent
Development Activity 72
Maintenance 76
Community 80
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
79 /100 Good
Architecture 84
Code Quality 82
Innovation 76
Learning Curve 75

python-socketio is a Python implementation of the Socket.IO realtime communication protocol, providing both server and client APIs that support synchronous and asyncio-based usage. It integrates with WSGI and ASGI web servers (Flask, aiohttp, Sanic, Tornado, FastAPI via ASGI) and can scale across multiple processes using Redis, Kafka, or RabbitMQ-backed pub/sub managers, making it suitable for anything from a single-process prototype to a horizontally scaled realtime backend.

The library closely tracks the official JavaScript Socket.IO implementation’s protocol revisions, with an explicit compatibility chart mapping package versions to Socket.IO and Engine.IO protocol versions so Python servers and clients can interoperate with JavaScript ones. Namespaces, rooms, event acknowledgements, and binary payloads are all supported, giving Python applications the same feature set developers expect from the JavaScript ecosystem.

What You Get

  • Synchronous and asyncio Server/Client classes for building realtime applications in either style
  • WSGI and ASGI middleware for integrating with Flask, aiohttp, Sanic, Tornado, and other Python web frameworks
  • Pub/sub manager backends (Redis, Kafka, RabbitMQ/Kombu, ZeroMQ) for scaling a Socket.IO server across multiple worker processes
  • Namespaces, rooms, event acknowledgements, and binary payload support matching the JavaScript Socket.IO feature set
  • A documented protocol compatibility chart mapping this package’s versions to Socket.IO/Engine.IO protocol revisions

Common Use Cases

  • Adding realtime bidirectional events (chat, live dashboards, notifications) to a Flask or FastAPI/ASGI application
  • Building a Python backend that must interoperate with an existing JavaScript Socket.IO client in the browser
  • Scaling a Socket.IO server horizontally across multiple worker processes using a Redis- or Kafka-backed manager
  • Prototyping realtime multiplayer or collaborative features with rooms and namespaces

Under The Hood

Architecture - The package splits cleanly into synchronous (server.py, client.py, manager.py, namespace.py) and asyncio-native (async_server.py, async_client.py, async_manager.py, async_namespace.py) implementations that share common base classes (base_server.py, base_client.py, base_manager.py, base_namespace.py). Scaling across processes is handled by pluggable manager backends (redis_manager.py, kafka_manager.py, kombu_manager.py, zmq_manager.py, pubsub_manager.py) that broadcast events between server instances, and asgi.py/middleware.py adapt the core server to WSGI and ASGI runtimes.

Tech Stack - Pure Python (99.97% of the codebase), depending on bidict for bidirectional session-id mappings and python-engineio (the same author’s lower-level transport package) for the underlying long-polling/WebSocket transport. Optional extras add requests/websocket-client for the sync client, aiohttp for the asyncio client, and framework-specific manager backends are opt-in via extras.

Code Quality - 31 test files under tests/ cover both sync and async server/client/manager code paths, run via tox across supported Python versions per tox.ini. The codebase is long-lived (created 2015, 786 total commits) and maintained solely by Miguel Grinberg with a consistent module-per-concern layout that keeps sync and async implementations parallel and easy to cross-reference.

API Design - The Server/Client classes mirror the JavaScript Socket.IO API closely (@sio.event, sio.emit(), namespaces, rooms), which makes the library approachable for anyone coming from the JS ecosystem, while the separate AsyncServer/AsyncClient classes keep the sync/async split explicit rather than overloading one API with both behaviors.

Used by 8 apps in this directory

Python
79%
Apache 2.0

changedetection.io

Monitoring

34,605

Self-hosted website change detection with AI-powered smart alerts, browser automation, price tracking, and 85+ notification channels.

View details
91
Repo Health
80
Technical
68
Dependency
Built with
Python 79%
Updated 1 weeks ago
TypeScript
50%
Other

Dify

AI Development · Design Tools · Developer Tools

157,364

Visual LLM workflow platform with RAG pipelines, agent capabilities, and model management for building production AI applications.

View details
92
Repo Health
85
Technical
66
Dependency
Built with
TypeScript 50%
Python 47%
Updated 5 days ago
Python
83%
MIT

Gemma Multimodal Fine-Tuner

AI Development

1,503

An Apple-Silicon-native LoRA fine-tuning tool for Gemma on text, image, and audio data — with a wizard CLI, live browser-based training visualizer, and streaming from GCS/BigQuery for datasets too large for local disk.

View details
65
Repo Health
68
Technical
72
Dependency
Built with
Python 83%
Updated 1 weeks ago
TypeScript
55%
Other

Jaaz

AI Agents · AI Design Tools

6,670

Open-source AI creative agent that turns visual sketches and canvas gestures into images and videos — no text prompts required.

View details
48
Repo Health
59
Technical
71
Dependency
Built with
TypeScript 55%
Python 34%
JavaScript 10%
Updated 7 months ago
Python
37%
Other

Open WebUI

AI Agents · AI Assistants

153,390

The extensible, privacy-first AI platform that runs Ollama, OpenAI, and any LLM backend behind a polished, feature-packed web interface.

View details
91
Repo Health
75
Technical
66
Dependency
Built with
Python 37%
Svelte 34%
JavaScript 21%
Updated 5 days ago
TypeScript
95%
Other

OpenHands

AI Code Assistants · AI Development

89,328

The self-hosted developer control center for running AI coding agents — locally, in Docker, on VMs, or across cloud backends — with automation workflows for GitHub, Slack, and more.

View details
91
Repo Health
82
Technical
67
Dependency
Built with
TypeScript 95%
Updated 6 days ago
Python
75%
AGPL 3.0

OpenViking

AI Development · AI Memory · Databases

38,819

An open-source context database that gives AI agents a unified filesystem for memory, resources, and skills with hierarchical tiered retrieval.

View details
85
Repo Health
75
Technical
64
Dependency
Built with
Python 75%
Rust 12%
Updated 5 days ago
Python
99%
Apache 2.0

Rasa Open Source

AI Assistants · AI Development · Voice AI

21,332

Rasa Open Source is a Python machine learning framework for building contextual, multi-turn chatbots and voice assistants that understand natural language and maintain conversation state.

View details
64
Repo Health
78
Technical
63
Dependency
Built with
Python 99%
Updated 2 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers