Skip to content

minrk/jupyterhub-client

Repository files navigation

jupyterhub-client

Build Status

Example Python client(s) for the JupyterHub REST API. There's a synchronous client implemented with Requests, and an async client using tornado coroutines.

sync example

export JPY_API_TOKEN=`jupyterhub token`
import os
from jupyterhub_client import JupyterHubClient

hub = JupyterHubClient(os.environ['JPY_API_TOKEN'])
users = hub.list_users()

async example

export JPY_API_TOKEN=`jupyterhub token`
import os
from jupyterhub_client.async import AsyncJupyterHubClient
from tornado import gen

@gen.coroutine
def stuff():
    hub = AsyncJupyterHubClient(os.environ['JPY_API_TOKEN'])
    users = yield hub.list_users()
    yield hub.stop_server('bonk')

About

JupyterHub REST API client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages