Skip to main content

class wandb.apis.public.Registry

A single registry in the Registry.

Args

  • service_api:
  • organization:
  • entity:
  • name:
  • attrs:

Properties

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 description

Description of the registry.

property entity

Organization entity of the registry.

property full_name

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

property id

The unique ID for this registry.

property name

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

property organization

Organization name of the registry.

property path

property updated_at

Timestamp of when the registry was last updated.

property visibility

Visibility of the registry.

Methods

method Registry.add_members()

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

method Registry.collections()

Returns the collections belonging to this registry.
Arguments
  • filter: Optional mapping of filters to apply to the collections query.
  • order: Optional string to specify the order of the results. If prefixed with ’+’, sorts ascending (default). If prefixed with ’-’, sorts descending.
  • per_page: The number of results to fetch per page. Usually there is no reason to change this.
  • start: Pagination cursor for resuming a past query, captured from a previous paginator’s .cursor attribute.

method Registry.create()

Create a new registry. The registry name must be unique within the organization. This function should be called using api.create_registry()
Arguments
  • api: The W&B API instance.
  • 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.
Raises
  • ValueError: If a registry with the same name already exists in the organization or if the creation fails.

method Registry.delete()

Delete the registry. This is irreversible.

method Registry.load()

Load registry attributes from the backend.

method Registry.members()

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

method Registry.remove_members()

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

method Registry.save()

Save registry attributes to the backend.

method Registry.team_members()

Returns the current member teams of this registry.

method Registry.update_member()

Updates the role of a member (user or team) 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

method Registry.user_members()

Returns the current member users of this registry.

method Registry.versions()

Returns the artifact versions belonging to this registry.
Arguments
  • filter: Optional mapping of filters to apply to the artifact versions query.
  • per_page: The number of results to fetch per page. Usually there is no reason to change this.
  • start: Pagination cursor for resuming a past query, captured from a previous paginator’s .cursor attribute.