bokeh.application.handlers.server_lifecycle#

Bokeh Application Handler to look for Bokeh server lifecycle callbacks in a specified Python module.

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

Load a script which contains server lifecycle callbacks.

__init__(*, filename: PathLike, argv: list[str] = [], package: ModuleType | None = None) None[source]#
Keyword Arguments:
  • filename (str) – path to a module to load lifecycle callbacks from

  • argv (list[str], optional) – a list of string arguments to use as sys.argv when the callback code is executed. (default: [])

url_path() str | None[source]#

The last path component for the basename of the path to the callback module.

property error: str | None#

If the handler fails, may contain a related error message.

property error_detail: str | None#

If the handler fails, may contain a traceback or other details.

property failed: bool#

True if the lifecycle callbacks failed to execute