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

export const GitHubLink = ({url, compact = false}) => <a href={url} target="_blank" rel="noopener noreferrer" className={compact ? "source-link" : "github-source-link"}>
    {compact ? "View source" : <>
    <svg width="20" height="20" viewBox="0 0 24 24" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
      <path d="M12 0C5.37 0 0 5.37 0 12c0 5.31 3.435 9.795 8.205 11.385.6.105.825-.255.825-.57 0-.285-.015-1.23-.015-2.235-3.015.555-3.795-.735-4.035-1.41-.135-.345-.72-1.41-1.23-1.695-.42-.225-1.02-.78-.015-.795.945-.015 1.62.87 1.845 1.23 1.08 1.815 2.805 1.305 3.495.99.105-.78.42-1.305.765-1.605-2.67-.3-5.46-1.335-5.46-5.925 0-1.305.465-2.385 1.23-3.225-.12-.3-.54-1.53.12-3.18 0 0 1.005-.315 3.3 1.23.96-.27 1.98-.405 3-.405s2.04.135 3 .405c2.295-1.56 3.3-1.23 3.3-1.23.66 1.65.24 2.88.12 3.18.765.84 1.23 1.905 1.23 3.225 0 4.605-2.805 5.625-5.475 5.925.435.375.81 1.095.81 2.22 0 1.605-.015 2.895-.015 3.3 0 .315.225.69.825.57A12.02 12.02 0 0024 12c0-6.63-5.37-12-12-12z" />
    </svg>
    GitHub source
      </>}
  </a>;

<GitHubLink compact url="https://github.com/wandb/wandb/blob/main/wandb/apis/public/registries/registry.py#L36" />

<h2 id="class-wandbapispublicregistry">
  <Badge color="yellow" size="lg" shape="rounded">クラス</Badge> wandb.apis.public.Registry
</h2>

Registry 内の単一の Registry です。

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

<h2 id="args">
  引数
</h2>

<ResponseField name="service_api" type="ServiceApi">
  説明はありません。
</ResponseField>

<ResponseField name="organization" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="entity" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="name" type="str">
  説明はありません。
</ResponseField>

<ResponseField name="attrs" type="RegistryFragment | None">
  説明はありません。
</ResponseField>

<h2 id="properties">
  プロパティ
</h2>

<ResponseField name="allow_all_artifact_types" type="bool">
  Registry ですべてのアーティファクト タイプが許可されているかどうかを返します。

  `True` の場合、任意のタイプのアーティファクトを追加できます。`False` の場合、アーティファクトは
  `artifact_types` にリストされたタイプに制限されます。
</ResponseField>

<ResponseField name="artifact_types" type="AddOnlyArtifactTypesList">
  Registry で許可されているアーティファクト タイプを返します。

  `allow_all_artifact_types` が `True` の場合、`artifact_types` は以前に保存されたか、現在 Registry で使用されているタイプを反映します。
  `allow_all_artifact_types` が `False` の場合、アーティファクトは `artifact_types` のタイプに制限されます。

  注:
  以前に保存されたアーティファクト タイプは削除できません。
</ResponseField>

<ResponseField name="created_at" type="str">
  Registry が作成されたときのタイムスタンプ。
</ResponseField>

<ResponseField name="description" type="str | None">
  Registry の説明。
</ResponseField>

<ResponseField name="entity" type="str">
  Registry の組織 entity。
</ResponseField>

<ResponseField name="full_name" type="str">
  `wandb-registry-` 接頭辞を含む Registry のフルネーム。
</ResponseField>

<ResponseField name="id" type="str">
  この Registry の一意の ID。
</ResponseField>

<ResponseField name="internal_id" type="str | None">
  取得された場合、この Registry の基盤となる project の GraphQL `internalId`。

  これは base64 エンコードされたグローバル ID です。デコードすると
  `Project:123` または `ProjectInternalId:123` のようになります。
</ResponseField>

<ResponseField name="name" type="str">
  `wandb-registry-` 接頭辞を除いた Registry の名。
</ResponseField>

<ResponseField name="organization" type="str">
  Registry の組織名。
</ResponseField>

<ResponseField name="path" type="list[str]">
  説明は提供されていません。
</ResponseField>

<ResponseField name="updated_at" type="str | None">
  Registry が最後に更新されたときのタイムスタンプ。
</ResponseField>

<ResponseField name="visibility" type="The visibility level.">
  Registry の可視性。
</ResponseField>

<h2 id="methods">
  メソッド
</h2>

<h3 id="method-registryadd_members">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.add\_members()
</h3>

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

この Registry にユーザーまたはチームを追加します。

<h5 id="arguments">
  引数
</h5>

<ResponseField name="members" type="User | UserMember | Team | TeamMember | str">
  Registry に追加するユーザーまたはチーム。`User` オブジェクト、`Team` オブジェクト、またはそれらの string ID を受け入れます。
</ResponseField>

<h5 id="raises">
  送出される例外
</h5>

* `TypeError`: メンバーが引数として渡されていない場合。
* `ValueError`: ユーザーまたはチームの ID を推論または解析できない場合。

<h5 id="examples">
  サンプル
</h5>

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

api = wandb.Api()

# 既存の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)
```

<h3 id="method-registrycollections">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.collections()
</h3>

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

この Registry に属するコレクションを返します。

<h5 id="arguments-2">
  引数
</h5>

<ResponseField name="filter" type="dict[str, Any] | None">
  コレクションをクエリする際に適用するフィルターのマッピングです (オプション) 。
</ResponseField>

<ResponseField name="order" type="str | None">
  結果の順序を指定する string です (オプション) 。接頭辞が '+' の場合は昇順 (デフォルト) 、'-' の場合は降順で並べ替えます。
</ResponseField>

<ResponseField name="per_page" type="PositiveInt">
  ページごとに取得する結果の数です。通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソルです。以前のページネーターの `.cursor` 属性から取得します。
</ResponseField>

<h3 id="method-registrycreate">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.create()
</h3>

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

新しい Registry を作成します。

Registry 名は組織内で一意である必要があります。
この関数は `api.create_registry()` を使用して呼び出してください。

<h5 id="arguments-3">
  引数
</h5>

<ResponseField name="api" type="Api">
  W\&B API のインスタンス。
</ResponseField>

<ResponseField name="organization" type="str">
  組織名。
</ResponseField>

<ResponseField name="name" type="str">
  Registry 名 (`wandb-registry-` 接頭辞を除く) 。
</ResponseField>

<ResponseField name="visibility" type="Literal['organization', 'restricted']">
  可視性レベル ('organization' または 'restricted') 。
</ResponseField>

<ResponseField name="description" type="str | None">
  Registry の説明 (任意) 。
</ResponseField>

<ResponseField name="artifact_types" type="list[str] | None">
  許可するアーティファクト タイプのリスト (任意) 。
</ResponseField>

<h5 id="raises-2">
  送出される例外
</h5>

* `ValueError`: 組織内に同じ名のRegistryが既に存在する場合、または作成に失敗した場合。

<h3 id="method-registrydelete">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.delete()
</h3>

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

Registry を削除します。この操作は元に戻せません。

<h3 id="method-registryload">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.load()
</h3>

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

Registry の属性をバックエンドから読み込みます。

<h3 id="method-registrymembers">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.members()
</h3>

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

この Registry の現在のメンバー (ユーザーとチーム) を返します。

<h3 id="method-registryremove_members">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.remove\_members()
</h3>

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

この Registry からユーザーまたはチームを削除します。

<h5 id="arguments-4">
  引数
</h5>

<ResponseField name="members" type="User | UserMember | Team | TeamMember | str">
  Registry から削除するユーザーまたはチームです。`User` オブジェクト、`Team` オブジェクト、またはそれらの string ID を受け入れます。
</ResponseField>

<h5 id="raises-3">
  送出される例外
</h5>

* `TypeError`: メンバーが引数として渡されていない場合。
* `ValueError`: ユーザーまたはチームの ID を推論または解析できない場合。

<h5 id="examples-2">
  サンプル
</h5>

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

api = wandb.Api()

# 既存の 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)
```

<h3 id="method-registrysave">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.save()
</h3>

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

Registry の属性をバックエンドに保存します。

<h3 id="method-registryteam_members">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.team\_members()
</h3>

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

この Registry の現在のメンバーのチームを返します。

<h3 id="method-registryupdate_member">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.update\_member()
</h3>

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

この Registry 内のメンバー (ユーザーまたはチーム) のロールを更新します。

<h5 id="arguments-5">
  引数
</h5>

<ResponseField name="member" type="User | UserMember | Team | TeamMember | str">
  ロールを更新するユーザーまたはチームです。`User` オブジェクト、`Team` オブジェクト、またはそれぞれの string ID を受け入れます。
</ResponseField>

<ResponseField name="role" type="MemberRole | str">
  メンバーに割り当てる新しいロールです。次のいずれかを指定できます。

  * "admin"
  * "member"
  * "viewer"
  * "restricted\_viewer" (W\&B サーバーでサポートされる場合)
</ResponseField>

<h5 id="raises-4">
  送出される例外
</h5>

* `ValueError`: ユーザーまたはチームの ID を推定できない場合。

<h5 id="examples-3">
  サンプル
</h5>

Registry 内のすべてのユーザーを管理者にする

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

api = wandb.Api()

# 既存のレジストリを取得
registry = api.registry(name="my-registry", organization="my-org")

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

<h3 id="method-registryuser_members">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.user\_members()
</h3>

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

この Registry の現在のメンバーユーザーを返します。

<h3 id="method-registryversions">
  <Badge color="blue" size="lg" shape="rounded">メソッド</Badge> Registry.versions()
</h3>

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

この Registry に属するアーティファクトのバージョンを返します。

<h5 id="arguments-6">
  引数
</h5>

<ResponseField name="filter" type="dict[str, Any] | None">
  アーティファクトのバージョンをクエリする際に適用するフィルターのマッピングです (省略可能) 。
</ResponseField>

<ResponseField name="order" type="_VersionOrder | None">
  結果の順序を指定する string です (省略可能) 。順序には `created_at`、`artifact_size`、`linked_at` を指定できます。接頭辞に '+' を付けると昇順 (デフォルト) 、'-' を付けると降順で並べ替えます。
</ResponseField>

<ResponseField name="per_page" type="PositiveInt">
  ページごとに取得する結果の数です。通常、変更する必要はありません。
</ResponseField>

<ResponseField name="start" type="str | None">
  過去のクエリを再開するためのページネーションカーソルです。以前のページネーターの `.cursor` 属性から取得します。
</ResponseField>


## Related topics

- [Registry](/ja/redirects/forge/registry.md)
