Today in #DevOpsClock:

Implemented timezone data lookup, so now you configure the device with the timezone name instead of the UTC offset. Also implemented caching data in non-volatile memory, so startup is faster.

Next up is actually implementing SSE (Event Source) and getting back to the actual point of this whole project.

Oh good, I did manage to find some previous server-sent event implementations.

I should generalize them better and make a gist out of them. Maybe even a series of packages.

Ok, anyone who cares about #ServerSentEvents / #EventSource in #Python, have a gist

https://gist.github.com/AstraLuma/bd340e1ba20613ce5c1f1b5ff552ebfb

I think I also have an old Tornado implementation I could pull out, but I honestly do not care about Tornado.

Python Server-Sent Events/EventSource Implementations

Python Server-Sent Events/EventSource Implementations - channels.py

Gist
@astraluma Is there a reason to use SSE instead of WebSockets?

@meejah It's much simpler, which is valuable in some situations, primarily if there isn't a WebSocket implementation in your current tech stack. (It's formalized longpoll instead of a whole new implementation.)

In my current application, the client is CircuitPython, which has a reduced version of requests and only one dev's experiment for WebSockets.