Jupyter
Interact with Jupyter app
Project Jupyter
Website

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
https://app.naas.ai/hub/token
app.naas.ai

Connect to Jupyter instance

1
token = "*****"
2
jp = naas_drivers.jupyter.connect(token)
Copied!

Get info

Get my profile

1
me = jp.get_me()
Copied!

🔑 Admin

Only Naas admin can do it.

Get Users

1
users = jp.get_users()
Copied!

Get one User

2
user = jp.get_user(email)
Copied!

Create

2
password = "****"
3
user = jp.create_user(email, password)
Copied!

Get Authorize

Get one Authorization for user.
2
is_authorize = jp.get_authorize_user(email)
Copied!

Authorize

Authorize one user.
2
is_authorize = True
3
user = jp.change_authorize_user(email, is_authorize)
Copied!

Active

check if user has running server
2
active = jp.is_user_active(email)
Copied!

Change password

change password of one user
2
newPassowrd = "*****"
3
user = jp.change_password_user(email, newPassowrd)
Copied!

Server uptime

2
uptime = jp.get_server_uptime(email)
Copied!

Stop user

2
jp.stop_user(email)
Copied!

Start user

2
jp.start_user(email)
Copied!

Restart user

2
jp.restart_user(email)
Copied!

Official documentation

Using JupyterHub’s REST API — JupyterHub 1.4.2 documentation