JupyterLabSessionManager#
- class rubin.nublado.client.JupyterLabSessionManager(*, username, jupyter_client, kernel_name='lsst', notebook_name=None, max_websocket_size, websocket_open_timeout=datetime.timedelta(seconds=60), logger)#
Bases:
objectManage JupyterLab sessions.
A context manager providing an open WebSocket session. The session will be automatically deleted when exiting the context manager. Objects of this type should be created by calling
NubladoClient.lab_session.- Parameters:
username (
str) – User the session is for.jupyter_client (
JupyterAsyncClient) – HTTP client used to talk to JupyterLab.kernel_name (
str, default:'lsst') – Name of the kernel to use for the session.notebook_name (
str|None, default:None) – Name of the notebook we will be running, which is passed to the session and might influence logging on the lab side. If set, the session type will be set tonotebook. If not set, the session type will be set toconsole.max_websocket_size (
int|None) – Maximum size of a WebSocket message to allow.websocket_open_timeout (
timedelta, default:datetime.timedelta(seconds=60)) – Timeout for opening a WebSocket.logger (
BoundLogger) – Logger to use.