I'm going to be on the @talkpython podcast to talk about #dataStar.

Is there anything. you'd like us to talk about?

@_chrismay @talkpython it would be interesting to hear about any production infrastructure and configuration experiences for hosting the SSE and or Websocket server.

@kwiersma @talkpytho Oh yeah, I've done a lot of experimentation with server-sent events, and Datastar's Python's SDK makes it really easy (https://github.com/starfederation/datastar-python). This made my life so much easier than any other framework.

And since SSE is just a text-based HTTP protocol, any Python web app supports SSE. But you'd need an async framework for a long-lived SSE connection.

@_chrismay ah yes hearing more about any experience you have with those async frameworks on production would be great.

@kwiersma What would you like to know? I’ve used Django, FastAPI, and starlette in production, and I’ve tinkered with several other async frameworks.

I have been running them with uvloop behind nginx, caddy, and granian.

For most of my apps, I open a long-lived SSE connection on pages that can benefit from live updates, and I stream the updates as they happen.

I’ve triggered those updates via database triggers or NATS.

@kwiersma For the most part, I’ve not had much issue with async frameworks. The hardest thing is remembering to add `async` or `await` when needed, but `ruff` helps catch those.
@_chrismay those combos are neat to learn about.