A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://jupyterhub.readthedocs.io/en/stable/reference/api/user.html below:

Users — JupyterHub documentation

Users# Module: jupyterhub.user# UserDict#
class jupyterhub.user.UserDict(db_factory, settings)#

Like defaultdict, but for users

Users can be retrieved by:

A User wrapper object is always returned.

This dict contains at least all active users, but not necessarily all users in the database.

Checking key in userdict returns whether an item is already in the cache, not whether it is in the database.

Changed in version 1.2: 'username' in userdict pattern is now supported

add(orm_user)#

Add a user to the UserDict

count_active_users()#

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

Returns dict with counts of active/pending/ready servers

delete(key)#

Delete a user from the cache and the database

get(key, default=None)#

Retrieve a User object if it can be found, else default

Lookup can be by User object, id, or name

Changed in version 1.2: get() accesses the database instead of just the cache by integer id, so is equivalent to catching KeyErrors on attempted lookup.

User#
class jupyterhub.user.User(orm_user, settings=None, db=None)#

High-level wrapper around an orm.User object

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.

property escaped_name#

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


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4