python-socketio

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

Library
PyPI
v5.16.4
4,367stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
86/100Excellent
Development Activity80
Maintenance84
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
79/100Good
Architecture84
Code Quality82
Innovation76
Learning Curve75

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

33,241

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

View details
90
Repo Health
80
Technical
69
Dependency
Built with
Python79%
Updated 3 days ago
TypeScript
50%
Other

Dify

No Code Platforms · AI Development · Developer Tools

152,883

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

View details
92
Repo Health
85
Technical
71
Dependency
Built with
TypeScript50%
Python47%
Updated today
Python
91%
MIT

Gemma Multimodal Fine-Tuner

AI Development

1,498

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
51
Repo Health
68
Technical
76
Dependency
Built with
Python91%
Updated 6 days ago
TypeScript
55%
Other

Jaaz

AI Design Tools · AI Agents

6,552

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

View details
45
Repo Health
59
Technical
71
Dependency
Built with
TypeScript55%
Python34%
JavaScript10%
Updated 5 months ago
Python
37%
Other

Open WebUI

AI Assistants · AI Agents

149,204

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
Python37%
Svelte33%
JavaScript22%
Updated today
TypeScript
94%
Other

OpenHands

AI Code Assistants · AI Development

84,452

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
71
Dependency
Built with
TypeScript94%
Updated today
Python
74%
AGPL 3.0

OpenViking

Databases · AI Development

29,711

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

View details
84
Repo Health
75
Technical
65
Dependency
Built with
Python74%
Rust14%
Updated today
Python
99%
Apache 2.0

Rasa Open Source

AI Assistants · AI Development

21,295

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
67
Repo Health
78
Technical
64
Dependency
Built with
Python99%
Updated 3 weeks 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

Search