Skip to main content

Documentation Index

Fetch the complete documentation index at: https://wb-21fd5541-sdk-testing.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Description

A single registry in the Registry.

Args

  • client: The API client used to query W&B.
  • organization:
  • entity: The entity which owns the registry.
  • name: The name of the registry (without the wandb-registry- prefix).
  • attrs: The attributes of the registry, typically obtained from a GraphQL response.
  • service_api:

Properties

property id

The unique ID for this registry.

property full_name

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

property name

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

property entity

Organization entity of the registry.

property organization

Organization name of the registry.

property description

Description of the registry.

property allow_all_artifact_types

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.

property artifact_types

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.

property created_at

Timestamp of when the registry was created.

property updated_at

Timestamp of when the registry was last updated.

property path

Returns the path of the registry.

property visibility

Visibility of the registry.

Methods

method add_members

self, *members: 'User | UserMember | Team | TeamMember | str'
Adds users or teams to this registry.
Arguments
  • members: 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
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 collections

self,
filter: 'dict[str, Any] | None' = None,
per_page: 'PositiveInt' = 100,
start: 'str | None' = None
Returns the collections belonging to the registry.
Arguments
  • filter:
  • per_page:
  • start:

method create

Create a new registry. The registry name must be unique within the organization. This function should be called using api.create_registry()
Arguments
  • client: Legacy GraphQL client retained for API compatibility.
  • organization: The name of the organization.
  • name: The name of the registry (without the wandb-registry- prefix).
  • visibility: The visibility level (‘organization’ or ‘restricted’).
  • description: An optional description for the registry.
  • artifact_types: An optional list of allowed artifact types.
  • service_api: Interface to the wandb-core service that performs W&B API calls for the created registry.
Raises
  • ValueError: If a registry with the same name already exists in the organization or if the creation fails.

method delete

self
Delete the registry. This is irreversible.

method load

self
Load registry attributes from the backend.

method members

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

method remove_members

self, *members: 'User | UserMember | Team | TeamMember | str'
Removes users or teams from this registry.
Arguments
  • members: 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
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 save

self
Save registry attributes to the backend.

method team_members

self
Returns the current member teams of this registry.

method update_member

self,
member: 'User | UserMember | Team | TeamMember | str',
role: 'MemberRole | str'
Updates the role of a member within this registry.
Arguments
  • member: The user or team to update the role of. Accepts a User object, Team object, or their string ID.
  • role: 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
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 user_members

self
Returns the current member users of this registry.

method versions

self,
filter: 'dict[str, Any] | None' = None,
per_page: 'PositiveInt' = 100,
start: 'str | None' = None
Returns the versions belonging to the registry.
Arguments
  • filter:
  • per_page:
  • start: