Jupyter API

Interact with Jupyter app

Connect

You must Connect before any other methods

You should get your token here :

In Naas cloud you can connect without any argument it will find your token alone

Connect to Jupyter instance

token = "*****"
jp = naas_drivers.jupyter.connect(token)

Get info

Get my profile

me = jp.get_me()

πŸ”‘ Admin

Only Naas admin can do it.

Get Users

users = jp.get_users()

Get one User

user = jp.get_user(email)

Create

password = "****"
user = jp.create_user(email, password)

Get Authorize

Get one Authorization for user.

is_authorize = jp.get_authorize_user(email)

Authorize

Authorize one user.

is_authorize = True
user = jp.change_authorize_user(email, is_authorize)

Active

check if user has running server

active = jp.is_user_active(email)

Change password

change password of one user

newPassowrd = "*****"
user = jp.change_password_user(email, newPassowrd)

Server uptime

uptime = jp.get_server_uptime(email)

Stop user

jp.stop_user(email)

Start user

jp.start_user(email)

Restart user

jp.restart_user(email)

Official documentation