Skip to main content

Group Objects

class Group()
Represents a group of users within an organization. Groups can be granted access to projects, datasets, ontologies, and storage folders, and are a convenient way to manage permissions for several users at once. Obtain instances of this class via create_group(), get_group(), or list_groups().

group_hash

@property
def group_hash() -> UUID
Get the group unique identifier (UUID). Returns:
  • UUID - The group UUID.

name

@property
def name() -> str
Get the group name. Returns:
  • str - The group name.

description

@property
def description() -> str
Get the group description. Returns:
  • str - The group description.

created_at

@property
def created_at() -> datetime
Get the group creation timestamp. Returns:
  • datetime - The timestamp when the group was created.

update_group

def update_group(name: Optional[str] = None,
                 description: Optional[str] = None) -> None
Update the group’s name and/or description. At least one of name or description must be provided. Fields left as None are not modified. Arguments:
  • name - The new name for the group.
  • description - The new description for the group.

list_users

def list_users() -> Iterator[GroupUser]
List the users belonging to the group. Returns:
  • Iterator[GroupUser] - The users that belong to the group.

add_users

def add_users(user_emails: List[str]) -> List[GroupUser]
Add users to the group by email address. Emails that do not yet belong to the organization are invited to it. Arguments:
  • user_emails - The email addresses of the users to add.
Returns:
  • List[GroupUser] - The full list of users in the group after the addition.

remove_users

def remove_users(user_emails: List[str]) -> None
Remove users from the group by email address. Emails that are not in the group are ignored. Arguments:
  • user_emails - The email addresses of the users to remove.