Overview of Datastar Python SDK
developThe datastar-py package is a Python SDK for Datastar, a framework that uses Server-Sent Events (SSE) to send responses from the backend to the browser.
Key capabilities include:
- Generating SSE events (patching elements or signals).
- Creating framework-specific response helpers (Django, FastAPI, FastHTML, Litestar, Quart, Sanic, and Starlette).
- Reading the current state of frontend signals via
read_signals. - Generating
data-*HTML attributes with type checking and IDE completion.
Framework-specific helpers are located in sub-packages, such as datastar_py.quart or datastar_py.fastapi.