Skip to content

webknossos.client.user

#   class User:

Represents a user of a webknossos instance. You can get users via get_current_user and get_all_managed_users.

#   User( id: str, email: str, organization: str, first_name: str, last_name: str, created: int, last_activity: int, teams: list[webknossos.client.user.Team], experiences: Dict[str, int], is_active: bool, is_admin: bool, is_dataset_manager: bool )

Method generated by attrs for class User.

#   id: str
#   email: str
#   organization: str
#   first_name: str
#   last_name: str
#   created: int
#   last_activity: int
#   experiences: Dict[str, int]
#   is_active: bool
#   is_admin: bool
#   is_dataset_manager: bool
#   def get_logged_times(self) -> list[webknossos.client.user.LoggedTime]:

Get the logged times of this user. Returns a list of LoggedTime objects where one represents one month.

#  
@classmethod
def get_current_user(cls) -> webknossos.client.user.User:

Returns the current user from the authentication context.

#  
@classmethod
def get_all_managed_users(cls) -> list[webknossos.client.user.User]:

Returns all users of whom the current user is admin or team-manager.

#   class Team:
#   Team(id: str, name: str)

Method generated by attrs for class Team.

#   id: str
#   name: str
#   class LoggedTime:
#   LoggedTime(duration_in_seconds: int, year: int, month: int)

Method generated by attrs for class LoggedTime.

#   duration_in_seconds: int
#   year: int
#   month: int
Back to top