Skip to content

Latest commit

 

History

History
46 lines (26 loc) · 1.55 KB

Jupyter_Restart_server.md

File metadata and controls

46 lines (26 loc) · 1.55 KB



Template request | Bug report | Generate Data Product

Tags: #jupyter #server #restart #snippet #operations #naas

Author: Florent Ravenel

Description: This notebook provides instructions on how to restart a Jupyter server.

Input

Import libraries

from naas_drivers import jupyter
from os import environ

Setup your Jupyter

# Jupyter token stored in your env
JUPYTER_TOKEN = environ.get("JUPYTERHUB_API_TOKEN")

# Username => email address linked to your jupyter account
username = "[email protected]"

Model

Restart server

jupyter.connect(JUPYTER_TOKEN).restart_user(username)

Output

Display result