> ## Documentation Index
> Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Team

[View source](https://github.com/wandb/wandb/blob/main/wandb/apis/public/teams.py#L61)

## Class wandb.apis.public.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.

```python theme={"system"}
(service_api: 'ServiceApi',
name: 'str',
attrs: 'Mapping[str, Any] | None' = None)
```

## Args

**service\_api** `ServiceApi`

The service API instance to use for querying W\&B.

**name** `str`

The name of the team

**attrs** `Mapping[str, Any] | None`

Optional dictionary of team attributes

## Examples

Look up a team and invite a member.

```python theme={"system"}
import wandb

api = wandb.Api()
team = api.team("my-team")
team.invite("user@example.com")
```

Create a team and add a service account.

```python theme={"system"}
import wandb

api = wandb.Api()
team = api.create_team("my-team")
team.create_service_account("CI service account")
```

## Methods

### method Team.create()

```python theme={"system"}
api: 'Api',
team: 'str',
admin_username: 'str | None' = None
```

Create a new team.

##### Arguments

**api** `Api`

(`Api`) The api instance to use

**team** `str`

(str) The name of the team

**admin\_username** `str | None`

(str) optional username of the admin user of the team, defaults to the current user.

### method Team.create\_service\_account()

```python theme={"system"}
self,
description: 'str'
```

Create a service account for the team.

##### Arguments

**description** `str`

(str) A description for this service account

### method Team.invite()

```python theme={"system"}
self,
username_or_email: 'str',
admin: 'bool' = False
```

Invite a user to a team.

##### Arguments

**username\_or\_email** `str`

(str) The username or email address of the user you want to invite.

**admin** `bool`

(bool) Whether to make this user a team admin. Defaults to `False`.
