bokeh.application.handlers.notebook#

Provide a Bokeh Application Handler to build up documents by running the code from Jupyter notebook (.ipynb) files.

This handler is configured with the filename of a Jupyter notebook. When a Bokeh application calls modify_doc, the code from all the notebook cells is collected and executed to process a new Document for a session. When the notebook code is executed, the Document being modified will be available as curdoc, and any optionally provided args will be available as sys.argv.

class NotebookHandler(*, filename: str | PathLike[str], argv: list[str] = [], package: ModuleType | None = None)[source]#

A Handler that uses code in a Jupyter notebook for modifying Bokeh Documents.

__init__(*, filename: str | PathLike[str], argv: list[str] = [], package: ModuleType | None = None) None[source]#
Keywords:

filename (str) : a path to a Jupyter notebook (“.ipynb”) file