bokeh.application.handlers.server_lifecycle¶
Bokeh Application Handler to look for Bokeh server lifecycle callbacks in a specified Python module.
- class ServerLifecycleHandler(*, filename: Union[str, os.PathLike[str]], argv: List[str] = [], package: Optional[module] = None)[source]¶
Load a script which contains server lifecycle callbacks.
Public Data Attributes:
If the handler fails, may contain a related error message.
If the handler fails, may contain a traceback or other details.
Trueif the lifecycle callbacks failed to executeInherited from : py: class:LifecycleHandler
safe_to_forkInherited from : py: class:Handler
If the handler fails, may contain a related error message.
If the handler fails, may contain a traceback or other details.
Trueif the lifecycle callbacks failed to executesafe_to_forkPublic Methods:
__init__(*, filename[, argv, package])- keyword filename
path to a module to load lifecycle callbacks from
url_path()The last path component for the basename of the path to the callback module.
Inherited from : py: class:LifecycleHandler
__init__(*, filename[, argv, package])- keyword filename
path to a module to load lifecycle callbacks from
modify_document(doc)This handler does not make any modifications to the Document.
on_server_loaded(server_context)Execute on_server_unloaded` from the configured module (if it is defined) when the server is first started.
on_server_unloaded(server_context)Execute
on_server_unloadedfrom the configured module (if it is defined) when the server cleanly exits.on_session_created(session_context)Execute
on_session_createdfrom the configured module (if it is defined) when a new session is created.on_session_destroyed(session_context)Execute
on_session_destroyedfrom the configured module (if it is defined) when a new session is destroyed.Inherited from : py: class:Handler
__init__(*, filename[, argv, package])- keyword filename
path to a module to load lifecycle callbacks from
modify_document(doc)This handler does not make any modifications to the Document.
on_server_loaded(server_context)Execute on_server_unloaded` from the configured module (if it is defined) when the server is first started.
on_server_unloaded(server_context)Execute
on_server_unloadedfrom the configured module (if it is defined) when the server cleanly exits.on_session_created(session_context)Execute
on_session_createdfrom the configured module (if it is defined) when a new session is created.on_session_destroyed(session_context)Execute
on_session_destroyedfrom the configured module (if it is defined) when a new session is destroyed.process_request(request)Processes incoming HTTP request returning a dictionary of additional data to add to the session_context.
static_path()Return a path to app-specific static resources, if applicable.
url_path()The last path component for the basename of the path to the callback module.
- __init__(*, filename: Union[str, os.PathLike[str]], argv: List[str] = [], package: Optional[module] = None) None[source]¶