> ## 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.

# Registry

[View source](https://github.com/wandb/wandb/blob/main/wandb/apis/public/registries/registry.py#L36)

## Class wandb.apis.public.Registry

A single registry in the Registry.

```python theme={"system"}
(service_api: 'ServiceApi',
organization: 'str',
entity: 'str',
name: 'str',
attrs: 'RegistryFragment | None' = None)
```

## Args

**service\_api** `ServiceApi`

No description provided.

**organization** `str`

No description provided.

**entity** `str`

No description provided.

**name** `str`

No description provided.

**attrs** `RegistryFragment | None`

No description provided.

## Properties

**allow\_all\_artifact\_types** `bool`

Return whether all artifact types are allowed in the registry.

If `True`, artifacts of any type can be added. If `False`, artifacts are
restricted to the types listed in `artifact_types`.

**artifact\_types** `AddOnlyArtifactTypesList`

Returns the artifact types allowed in the registry.

If `allow_all_artifact_types` is `True` then `artifact_types` reflects the
types previously saved or currently used in the registry.
If `allow_all_artifact_types` is `False` then artifacts are restricted to the
types in `artifact_types`.

Note:
Previously saved artifact types cannot be removed.

**created\_at** `str`

Timestamp of when the registry was created.

**description** `str | None`

Description of the registry.

**entity** `str`

Organization entity of the registry.

**full\_name** `str`

Full name of the registry including the `wandb-registry-` prefix.

**id** `str`

The unique ID for this registry.

**internal\_id** `str | None`

The GraphQL `internalId` for this registry's backing project, if fetched.

This is a base64-encoded global ID. When decoded, it looks like
`Project:123` or `ProjectInternalId:123`.

**name** `str`

Name of the registry without the `wandb-registry-` prefix.

**organization** `str`

Organization name of the registry.

**path** `list[str]`

No description provided.

**updated\_at** `str | None`

Timestamp of when the registry was last updated.

**visibility** `The visibility level.`

Visibility of the registry.

## Methods

### method Registry.add\_members()

```python theme={"system"}
self, *members: 'User | UserMember | Team | TeamMember | str'
```

Adds users or teams to this registry.

##### Arguments

**members** `User | UserMember | Team | TeamMember | str`

The users or teams to add to the registry. Accepts `User` objects, `Team` objects, or their string IDs.

##### Raises

* `TypeError`: If no members are passed as arguments.
* `ValueError`: If unable to infer or parse the user or team IDs.

##### Examples

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

api = wandb.Api()

# Fetch an existing registry
registry = api.registry(name="my-registry", organization="my-org")

user1 = api.user(username="some-user")
user2 = api.user(username="other-user")
registry.add_members(user1, user2)

my_team = api.team(name="my-team")
registry.add_members(my_team)
```

### method Registry.collections()

```python theme={"system"}
self,
filter: 'dict[str, Any] | None' = None,
order: 'str | None' = None,
per_page: 'PositiveInt' = 100,
start: 'str | None' = None
```

Returns the collections belonging to this registry.

##### Arguments

**filter** `dict[str, Any] | None`

Optional mapping of filters to apply to the collections query.

**order** `str | None`

Optional string to specify the order of the results. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending.

**per\_page** `PositiveInt`

The number of results to fetch per page. Usually there is no reason to change this.

**start** `str | None`

Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute.

### method Registry.create()

```python theme={"system"}
api: 'Api',
organization: 'str',
name: 'str',
visibility: "Literal['organization', 'restricted']",
description: 'str | None' = None,
artifact_types: 'list[str] | None' = None
```

Create a new registry.

The registry name must be unique within the organization.
This function should be called using `api.create_registry()`

##### Arguments

**api** `Api`

The W\&B API instance.

**organization** `str`

The name of the organization.

**name** `str`

The name of the registry (without the `wandb-registry-` prefix).

**visibility** `Literal['organization', 'restricted']`

The visibility level ('organization' or 'restricted').

**description** `str | None`

An optional description for the registry.

**artifact\_types** `list[str] | None`

An optional list of allowed artifact types.

##### Raises

* `ValueError`: If a registry with the same name already exists in the organization or if the creation fails.

### method Registry.delete()

```python theme={"system"}
self
```

Delete the registry. This is irreversible.

### method Registry.load()

```python theme={"system"}
self
```

Load registry attributes from the backend.

### method Registry.members()

```python theme={"system"}
self
```

Returns the current members (users and teams) of this registry.

### method Registry.remove\_members()

```python theme={"system"}
self, *members: 'User | UserMember | Team | TeamMember | str'
```

Removes users or teams from this registry.

##### Arguments

**members** `User | UserMember | Team | TeamMember | str`

The users or teams to remove from the registry. Accepts `User` objects, `Team` objects, or their string IDs.

##### Raises

* `TypeError`: If no members are passed as arguments.
* `ValueError`: If unable to infer or parse the user or team IDs.

##### Examples

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

api = wandb.Api()

# Fetch an existing registry
registry = api.registry(name="my-registry", organization="my-org")

user1 = api.user(username="some-user")
user2 = api.user(username="other-user")
registry.remove_members(user1, user2)

old_team = api.team(name="old-team")
registry.remove_members(old_team)
```

### method Registry.save()

```python theme={"system"}
self
```

Save registry attributes to the backend.

### method Registry.team\_members()

```python theme={"system"}
self
```

Returns the current member teams of this registry.

### method Registry.update\_member()

```python theme={"system"}
self,
member: 'User | UserMember | Team | TeamMember | str',
role: 'MemberRole | str'
```

Updates the role of a member (user or team) within this registry.

##### Arguments

**member** `User | UserMember | Team | TeamMember | str`

The user or team to update the role of. Accepts a `User` object, `Team` object, or their string ID.

**role** `MemberRole | str`

The new role to assign to the member. May be one of:

* "admin"
* "member"
* "viewer"
* "restricted\_viewer" (if supported by the W\&B server)

##### Raises

* `ValueError`: If unable to infer the user or team ID.

##### Examples

Make all users in the registry admins

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

api = wandb.Api()

# Fetch an existing registry
registry = api.registry(name="my-registry", organization="my-org")

for member in registry.user_members():
    registry.update_member(member.user, role="admin")
```

### method Registry.user\_members()

```python theme={"system"}
self
```

Returns the current member users of this registry.

### method Registry.versions()

```python theme={"system"}
self,
filter: 'dict[str, Any] | None' = None,
order: '_VersionOrder | None' = None,
per_page: 'PositiveInt' = 100,
start: 'str | None' = None
```

Returns the artifact versions belonging to this registry.

##### Arguments

**filter** `dict[str, Any] | None`

Optional mapping of filters to apply to the artifact versions query.

**order** `_VersionOrder | None`

Optional string to specify the order of the results. Order can be `created_at`, `artifact_size`, or `linked_at`. If prefixed with '+', sorts ascending (default). If prefixed with '-', sorts descending.

**per\_page** `PositiveInt`

The number of results to fetch per page. Usually there is no reason to change this.

**start** `str | None`

Pagination cursor for resuming a past query, captured from a previous paginator's `.cursor` attribute.
