Python callbacks on ASGI

BrowserDocument + WebSocketASGI serverUvicorn / Hypercorn / etc.BokehSession + callbacks

Bokeh's ASGI adapter handles documents, static resources, sessions, and WebSockets. These examples run on Uvicorn, but the adapter can also sit inside another ASGI application.

Run locally

Clone, uv run, done.

With Git and uv installed, these commands create the locked environment and start the complete gallery.

git clone https://github.com/bokeh/demo.bokeh.org
cd demo.bokeh.org
uv run --locked uvicorn asgi:application

Open http://127.0.0.1:8000.