teams
2 minute read
module wandb.apis.public
W&B Public API for managing teams and team members.
This module provides classes for managing W&B teams and their members.
Note:
This module is part of the W&B Public API and provides methods to manage teams and their members. Team management operations require appropriate permissions.
class Member
A member of a team.
Args:
- client(- wandb.apis.internal.Api): The client instance to use
- team(str): The name of the team this member belongs to
- attrs(dict): The member attributes
method Member.__init__
__init__(client, team, attrs)
method Member.delete
delete()
Remove a member from a team.
Returns: Boolean indicating success
class Team
A class that represents a W&B team.
This class provides methods to manage W&B teams, including creating teams, inviting members, and managing service accounts. It inherits from Attrs to handle team attributes.
Args:
- client(- wandb.apis.public.Api): The api instance to use
- name(str): The name of the team
- attrs(dict): Optional dictionary of team attributes
Note:
Team management requires appropriate permissions.
method Team.__init__
__init__(client, name, attrs=None)
classmethod Team.create
create(api, team, admin_username=None)
Create a new team.
Args:
- api: (- Api) The api instance to use
- team: (str) The name of the team
- admin_username: (str) optional username of the admin user of the team, defaults to the current user.
Returns:
A Team object
method Team.create_service_account
create_service_account(description)
Create a service account for the team.
Args:
- description: (str) A description for this service account
Returns:
The service account Member object, or None on failure
method Team.invite
invite(username_or_email, admin=False)
Invite a user to a team.
Args:
- username_or_email: (str) The username or email address of the user you want to invite.
- admin: (bool) Whether to make this user a team admin. Defaults to- False.
Returns:
True on success, False if user was already invited or didn’t exist.
Feedback
Was this page helpful?
Glad to hear it! If you have more to say, please let us know.
Sorry to hear that. Please tell us how we can improve.