Embed Bokeh app in Jupyter server extension

Jupyter server extensions are basically Tornado handlers, but looking at the tornado embedding example it looks like that actually embeds Tornado handlers in a Bokeh Tornado Application.

Is there a way to embed a Bokeh app as a Tornado handler rather than a whole Application? Or what would be the best way to integrate the two?

I don’t want to run Bokeh in a notebook, I want to deploy it as a full fledged application with access to JupyterLab.

https://jupyter-server.readthedocs.io/en/latest/developers/extensions.html#authoring-a-configurable-extension-application

For now I’ve ended up doing something more like the Flask integration, except sharing the Tornado IOLoop. Both servers are running on different ports, and then server_document just connects to the Bokeh server. It works quite nicely once you set allow_websocket_origin.

Jupyter app extensions looks interesting but AFAIK no one has ever looked into it. It’s definitely not something that will fit into my own bandwidth envelope any time soon, so if you already have some expertise, I’d encourage you to try to look into it (I’m happy to answer any technical questions). As you have noted a Bokeh server is basically just a collection of handlers that need to be installed on an IOLoop somehow.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.