class Registry
A single registry in the Registry.
method Registry.__init__
property Registry.allow_all_artifact_types
Return whether all artifact types are allowed in the registry. IfTrue, artifacts of any type can be added. If False, artifacts are restricted to the types listed in artifact_types.
Returns:
bool: The allow_all_artifact_types property value.
property Registry.artifact_types
Returns the artifact types allowed in the registry. Ifallow_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.Example:
AddOnlyArtifactTypesList: The artifact_types property value.
property Registry.created_at
Timestamp of when the registry was created. Returns:str: The created_at property value.
property Registry.description
Description of the registry. Returns:str | None: The description property value.
property Registry.entity
Organization entity of the registry. Returns:str: The entity property value.
property Registry.full_name
Full name of the registry including thewandb-registry- prefix.
Returns:
str: The full_name property value.
property Registry.id
The unique ID for this registry. Returns:str: The id property value.
property Registry.name
Name of the registry without thewandb-registry- prefix.
Returns:
str: The name property value.
property Registry.organization
Organization name of the registry. Returns:str: The organization property value.
property Registry.path
property Registry.updated_at
Timestamp of when the registry was last updated. Returns:str: The updated_at property value.
property Registry.visibility
Visibility of the registry. Returns:Literal["organization", "restricted"]: The visibility level.- “organization”: Anyone in the organization can view this registry. You can edit their roles later from the settings in the UI.
- “restricted”: Only invited members via the UI can access this registry. Public sharing is disabled.
Literal['organization', 'restricted']: The visibility property value.
method Registry.add_members
members: The users or teams to add to the registry. AcceptsUserobjects,Teamobjects, or their string IDs.
TypeError: If no members are passed as arguments.ValueError: If unable to infer or parse the user or team IDs.
method Registry.collections
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.cursorattribute.
classmethod Registry.create
api.create_registry()
Args:
api: The W&B API instance.organization: The name of the organization.name: The name of the registry (without thewandb-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.
Registry: The newly created Registry object.
ValueError: If a registry with the same name already exists in the organization or if the creation fails.
method Registry.delete
method Registry.load
method Registry.members
method Registry.remove_members
members: The users or teams to remove from the registry. AcceptsUserobjects,Teamobjects, or their string IDs.
TypeError: If no members are passed as arguments.ValueError: If unable to infer or parse the user or team IDs.
method Registry.save
method Registry.team_members
method Registry.update_member
member: The user or team to update the role of. Accepts aUserobject,Teamobject, 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)
ValueError: If unable to infer the user or team ID.
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.versions
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.cursorattribute.