The JupyterHub API

Users

expand icon

Users

Module: jupyterhub.user

UserDict

class jupyterhub.user.UserDict(db_factory, settings)

Like defaultdict, but for users

Getting by a user id OR an orm.User instance returns a User wrapper around the orm user.

count_active_users()

Count the number of user servers that are active/pending/ready

Returns dict with counts of active/pending/ready servers

User

class jupyterhub.user.User(orm_user, settings=None, **kwargs)
name

The user’s name

server

The user’s Server data object if running, None otherwise. Has ip, port attributes.

spawner

The user’s Spawner instance.

escaped_name

My name, escaped for use in URLs, cookies, etc.