Streaming API Patterns

•
69
•

Implements production-ready real-time data streaming using Server-Sent Events (SSE), WebSockets, and ReadableStream APIs.

This skill provides specialized implementation patterns for building high-performance real-time applications. It focuses on the most common streaming use cases, including LLM token streaming for ChatGPT-style interfaces, live data feeds, and bidirectional communication. The skill covers critical production concerns such as backpressure management, connection lifecycle handling, and resource cleanup—specifically highlighting the aclosing() pattern for Python async generators to prevent memory leaks and dangling connections.

主要功能

01LLM-specific streaming patterns for token-by-token response rendering.
02Exponential backoff reconnection strategies for resilient connections.
03Bidirectional WebSocket patterns for real-time collaboration and chat.
04Python async generator cleanup using the aclosing() context manager.
05Server-Sent Events (SSE) for efficient server-to-client notifications.
0669 GitHub stars

使用场景

01Developing progress indicators for long-running server-side tasks.
02Building AI chat interfaces with real-time response streaming.
03Creating live financial tickers or real-time analytics dashboards.