# SSE URL: /chirp/docs/examples/sse/ Section: examples Tags: examples, sse, eventstream, realtime -------------------------------------------------------------------------------- What It Teaches Use this example when updates happen after the page is loaded. EventStream opens a long-lived SSE response and the generator yields values over time: plain strings, structured SSEEvent payloads, or rendered Fragment(...) payloads. This is intentionally not a Suspense example. Suspense is for initial render; SSE is for post-load updates. Run It PYTHONPATH=src python examples/standalone/sse/app.py Open http://127.0.0.1:8000/. Test It pytest examples/standalone/sse/ Contract Surface SSE examples exercise the per-event boundary: a bad fragment should not casually kill a stream intended to stay open. They also exercise template block cross-references between yielded Fragment(...) values and htmx sse-swap targets. Source app.py README.md Next Server-Sent Events SSE Patterns Testing Assertions -------------------------------------------------------------------------------- Metadata: - Word Count: 109 - Reading Time: 1 minutes