Web & Protocols · zero-dependency · MIT

larzsse

Server-Sent Events.

A Server-Sent Events broadcaster and client for simple one-way realtime streams — live updates without the weight of WebSockets.

larzscript pkg install sse
View on GitHub →Learn the stack

What you get

Try it

import "sse" as sse
print(sse.format("update", "{\"x\":1}", "42"))
let received = []
let b = sse.broadcaster()
sse.subscribe(b, fn(chunk) { received.push(chunk) })
sse.publish(b, "update", "{\"x\":1}")
print(len(received))
Output
id: 42
event: update
data: {"x":1}


1

Why it's in the Larz Stack

larzsse is a real Larzscript package (larzscript pkg install sse) - money-native, zero dependencies, the same language as the rest of the estate, not a separate Python runtime. It composes with the rest of the Larz Stack and the Larz framework.