Settings

Theme

Show HN: A minimal wrapper for stable FastAPI WebSockets

github.com

1 points by yuu1ch13 a month ago · 0 comments · 1 min read

Reader

I built a small Python library to improve WebSocket connection stability in FastAPI apps. fastapi-websocket-stabilizer wraps FastAPI’s native WebSocket with automatic heartbeat (ping/pong) handling to reduce unexpected disconnects caused by idle timeouts or unstable networks. It’s lightweight, easy to integrate, and focused only on keeping long-lived WebSocket connections reliable—no full real-time framework, no extra abstractions. I built this after repeatedly reimplementing keepalive logic across multiple FastAPI projects. The goal is to encapsulate that logic in a minimal, reusable way. Removal is straightforward if you decide not to use it later. GitHub: https://github.com/yuuichieguchi/fastapi-websocket-stabilize... PyPI: https://pypi.org/project/fastapi-websocket-stabilizer/ Feedback welcome, especially from people running WebSocket-heavy FastAPI services.

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection