Module tripleblind.user

User API

This module allows an organization owner to interact with the TripleBlind Router manage users.

Classes

class User

User()

Static methods

def get_all(allow_cached: bool = True, session: Optional[Session] = None) -> List[dict]

Retrieve a list of users in the organization (only available to owners)

Args

allow_cached : bool, optional
description. Defaults to True.
session : Optional[Session], optional
description. Defaults to None.

Returns

List[dict]
A list of Users, keyed on user-id. E.g.: [{'2be23c27-4618-4d03-a439-24dc999748e5': { 'email': '[email protected]', 'first_name': 'Calvin', 'last_name': 'Trillin', 'username': 'democo-admin', }}]
def get_all_known(team_id: Optional[int] = None, allow_cached: bool = True, session: Optional[Session] = None) -> List[dict]

Retrieve a list of users known to the current user.

Args

team_id : int, optional
The team ID to get users for. If not given, users from all teams the user is a member of are returned.
allow_cached : bool, optional
When True, allow usage of a previously cached list of users. Set to False to force retrieving from the Router. Defaults to True.
session : Session, optional
A connection session. If not specified the default session is used.

Returns

List[dict]
A list of Users, keyed on user-id. E.g.: [{'2be23c27-4618-4d03-a439-24dc999748e5': { 'email': '[email protected]', 'first_name': 'Calvin', 'last_name': 'Trillin', 'username': 'democo-admin', 'teams': [{'id': 3, 'name': 'DemoCo Pilot', 'member': True, 'owner': False, 'admin': True}], }}]