> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tokenfactory.nebius.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Images Manager

<a id="contree_sdk.sdk.managers.images.ImagesManager" />

## `class ImagesManager`

```python theme={null}
class contree_sdk.sdk.managers.images.ImagesManager(client)
```

<div className="pl-4 ml-1 my-4">
  ### Methods

  <a id="contree_sdk.sdk.managers.images.ImagesManager.__aiter__" />

  #### `__aiter__()`

  ```python theme={null}
  async def __aiter__()
  ```

  <a id="contree_sdk.sdk.managers.images.ImagesManager.__call__" />

  #### `__call__()`

  ```python theme={null}
  async def __call__(number, kind, tagged, since, until) -> list[TypeVar(_ImageT, bound= _ContreeImageBase)]
  ```

  Fetch a list of images with optional filters.

  <ParamField path="number" type="int | None" default="100">
    Maximum number of images to return. None returns all.
  </ParamField>

  <ParamField path="kind" type="ImageKind | None" default="None">
    Filter by image kind.
  </ParamField>

  <ParamField path="tagged" type="bool" default="False">
    If True, return only tagged images.
  </ParamField>

  <ParamField path="since" type="datetime | timedelta | None" default="None">
    Return images created after this time. Accepts datetime or timedelta relative to now.
  </ParamField>

  <ParamField path="until" type="datetime | timedelta | None" default="None">
    Return images created before this time. Accepts datetime or timedelta relative to now.
  </ParamField>

  <ResponseField name="returns" type="list[TypeVar(_ImageT, bound= _ContreeImageBase)]">
    List of images matching the given filters.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.docker" />

  #### `docker()`

  ```python theme={null}
  async def docker(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.import_from" />

  #### `import_from()`

  ```python theme={null}
  async def import_from(image, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Import an image from an external registry into Contree.

  <ParamField path="image" type="str | OCIReference" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference)

    OCI reference string or OCIReference pointing to the source image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag to assign to the imported image. Defaults to the tag in the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for private registries.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for private registries.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **ValueError** – If image is a UUID or credentials are incomplete.
  </ResponseField>

  <ResponseField name="raises">
    **FailedOperationError** – If the import operation completes without returning an image.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.oci" />

  #### `oci()`

  ```python theme={null}
  async def oci(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.podman" />

  #### `podman()`

  ```python theme={null}
  async def podman(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.pull" />

  #### `pull()`

  ```python theme={null}
  async def pull(url_or_tag_or_uuid, *, new_tag, username, password, timeout) -> ContreeImage
  ```

  <ParamField path="url_or_tag_or_uuid" required />

  <ParamField path="new_tag" default="None" />

  <ParamField path="username" default="None" />

  <ParamField path="password" default="None" />

  <ParamField path="timeout" default="None" />

  <ResponseField name="returns" type="ContreeImage">
    [`ContreeImage`](./image#contree_sdk.sdk.objects.image.ContreeImage)
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.pull_by_oci" />

  #### `pull_by_oci()`

  ```python theme={null}
  async def pull_by_oci(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManager.use" />

  #### `use()`

  ```python theme={null}
  async def use(ref, strict) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve a reference to an image object without importing.

  <ParamField path="ref" type="str | UUID | OCIReference" required>
    str | UUID | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference)

    Image identifier — UUID, OCI reference string, or OCIReference object.
  </ParamField>

  <ParamField path="strict" type="bool" default="False">
    If True, verify the image exists by fetching it from the API.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Image object corresponding to the given reference.
  </ResponseField>
</div>

<a id="contree_sdk.sdk.managers.images.ImagesManagerSync" />

## `class ImagesManagerSync`

```python theme={null}
class contree_sdk.sdk.managers.images.ImagesManagerSync(client)
```

<div className="pl-4 ml-1 my-4">
  ### Methods

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.__call__" />

  #### `__call__()`

  ```python theme={null}
  def __call__(number, kind, tagged, since, until) -> list[TypeVar(_ImageT, bound= _ContreeImageBase)]
  ```

  Fetch a list of images with optional filters.

  <ParamField path="number" type="int | None" default="100">
    Maximum number of images to return. None returns all.
  </ParamField>

  <ParamField path="kind" type="ImageKind | None" default="None">
    Filter by image kind.
  </ParamField>

  <ParamField path="tagged" type="bool" default="False">
    If True, return only tagged images.
  </ParamField>

  <ParamField path="since" type="datetime | timedelta | None" default="None">
    Return images created after this time. Accepts datetime or timedelta relative to now.
  </ParamField>

  <ParamField path="until" type="datetime | timedelta | None" default="None">
    Return images created before this time. Accepts datetime or timedelta relative to now.
  </ParamField>

  <ResponseField name="returns" type="list[TypeVar(_ImageT, bound= _ContreeImageBase)]">
    List of images matching the given filters.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.__iter__" />

  #### `__iter__()`

  ```python theme={null}
  def __iter__()
  ```

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.docker" />

  #### `docker()`

  ```python theme={null}
  def docker(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.import_from" />

  #### `import_from()`

  ```python theme={null}
  def import_from(image, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Import an image from an external registry into Contree.

  <ParamField path="image" type="str | OCIReference" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference)

    OCI reference string or OCIReference pointing to the source image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag to assign to the imported image. Defaults to the tag in the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for private registries.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for private registries.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **ValueError** – If image is a UUID or credentials are incomplete.
  </ResponseField>

  <ResponseField name="raises">
    **FailedOperationError** – If the import operation completes without returning an image.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.oci" />

  #### `oci()`

  ```python theme={null}
  def oci(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.podman" />

  #### `podman()`

  ```python theme={null}
  def podman(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.pull" />

  #### `pull()`

  ```python theme={null}
  def pull(url_or_tag_or_uuid, *, new_tag, username, password, timeout) -> ContreeImageSync
  ```

  <ParamField path="url_or_tag_or_uuid" required />

  <ParamField path="new_tag" default="None" />

  <ParamField path="username" default="None" />

  <ParamField path="password" default="None" />

  <ParamField path="timeout" default="None" />

  <ResponseField name="returns" type="ContreeImageSync">
    [`ContreeImageSync`](./image#contree_sdk.sdk.objects.image.ContreeImageSync)
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.pull_by_oci" />

  #### `pull_by_oci()`

  ```python theme={null}
  def pull_by_oci(ref, *, tag, username, password, timeout) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve an image by tag, falling back to import if not found.

  Derives the target tag from the `tag` parameter or from the reference itself,
  then tries to find an existing image with that tag. If the image does not exist,
  triggers an import and returns the result.

  <ParamField path="ref" type="str | OCIReference | UUID" required>
    str | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference) | UUID

    UUID, OCI reference string, or OCIReference of the image.
  </ParamField>

  <ParamField path="tag" type="str | None" default="None">
    Tag override; if provided, replaces the tag from the reference.
  </ParamField>

  <ParamField path="username" type="str | None" default="None">
    Registry username for authenticated imports.
  </ParamField>

  <ParamField path="password" type="str | None" default="None">
    Registry password for authenticated imports.
  </ParamField>

  <ParamField path="timeout" type="float | None" default="None">
    Maximum seconds to wait for the import operation.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Resolved or imported image object.
  </ResponseField>

  <ResponseField name="raises">
    **NotFoundError** – If ref is a UUID and the image does not exist.
  </ResponseField>

  <a id="contree_sdk.sdk.managers.images.ImagesManagerSync.use" />

  #### `use()`

  ```python theme={null}
  def use(ref, strict) -> TypeVar(_ImageT, bound= _ContreeImageBase)
  ```

  Resolve a reference to an image object without importing.

  <ParamField path="ref" type="str | UUID | OCIReference" required>
    str | UUID | [`OCIReference`](./oci#contree_sdk.utils.oci.OCIReference)

    Image identifier — UUID, OCI reference string, or OCIReference object.
  </ParamField>

  <ParamField path="strict" type="bool" default="False">
    If True, verify the image exists by fetching it from the API.
  </ParamField>

  <ResponseField name="returns" type="TypeVar(_ImageT, bound= _ContreeImageBase)">
    Image object corresponding to the given reference.
  </ResponseField>
</div>
