·streaming-api-patterns
</>

streaming-api-patterns

yonatangross/orchestkit

使用 SSE、WebSockets 和 ReadableStream 进行实时数据流。在实现流响应、实时数据更新、服务器发送事件、WebSocket 设置、实时通知、推送更新或聊天服务器后端时使用。

24安装·0热度·@yonatangross

安装

$npx skills add https://github.com/yonatangross/orchestkit --skill streaming-api-patterns

SKILL.md

CRITICAL: Async generators can leak resources if not properly cleaned up. Python 3.10+ provides aclosing() from contextlib to guarantee cleanup.

| External API streaming (LLM, HTTP) | ✅ Always | | Database streaming results | ✅ Always | | File streaming | ✅ Always | | Simple in-memory generators | ⚠️ Optional (no cleanup needed) | | Generator with try/finally cleanup | ✅ Always |

| Server-to-Client Streaming | SSE | Simple protocol, auto-reconnect, HTTP/2 compatible | | Bidirectional Communication | WebSockets | Full-duplex, low latency, binary support | | LLM Token Streaming | ReadableStream + SSE | Backpressure control, standard format | | Reconnection Strategy | Exponential Backoff | Prevents thundering herd, graceful recovery |

使用 SSE、WebSockets 和 ReadableStream 进行实时数据流。在实现流响应、实时数据更新、服务器发送事件、WebSocket 设置、实时通知、推送更新或聊天服务器后端时使用。 来源:yonatangross/orchestkit。

查看原文

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/yonatangross/orchestkit --skill streaming-api-patterns
分类
</>开发工具
认证
收录时间
2026-02-01
更新时间
2026-02-18

快速解答

什么是 streaming-api-patterns?

使用 SSE、WebSockets 和 ReadableStream 进行实时数据流。在实现流响应、实时数据更新、服务器发送事件、WebSocket 设置、实时通知、推送更新或聊天服务器后端时使用。 来源:yonatangross/orchestkit。

如何安装 streaming-api-patterns?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/yonatangross/orchestkit --skill streaming-api-patterns 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code 或 Cursor 中使用

这个 Skill 的源码在哪?

https://github.com/yonatangross/orchestkit