Web & Protocols · zero-dependency · MIT

larzws

WebSocket server & client (RFC 6455).

A synchronous RFC 6455 WebSocket server and client — framing, masking, fragmentation and ping/pong — with no async required.

larzscript pkg install ws
View on GitHub →Learn the stack

What you get

Try it

import "ws" as ws
let frame = ws.encode_frame(ws.OP_TEXT, ws.text_to_bytes("hi"), false)
let decoded = ws.decode_frame(frame, 0)
print(ws.bytes_to_text(decoded["payload"]))
print(decoded["fin"], decoded["opcode"])
Output
hi
true 1

Why it's in the Larz Stack

larzws is a real Larzscript package (larzscript pkg install ws) - 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.