element_51.serverΒΆ

Serve the editor page, its WASM files and the websocket.

Functions

asgi_app(app[, theme])

Return an ASGI app that serves the editor for app.

reply_to(app, text)

Act on a message from the browser and say how it went.

serve(app[, port, open_browser, theme])

Run the editor on this machine only, until interrupted.

Classes

Connection()

One open page: a queue of messages waiting to go out.

Hub()

The pages that are open now.

NoReply(*values)

What reply_to returns when the message was fine and needs no answer.

PageServer(config, *, url)

A uvicorn server that can open the editor page once it is listening.

Sender(*args, **kwargs)

Anything that can send text to one browser page.