Skip to main content

class ImagesManager

Attributes

alias of ContreeImage

Methods

__aiter__()

__call__()

Fetch a list of images with optional filters.
int | None
default:"100"
Maximum number of images to return. None returns all.
bool
default:"False"
If True, return only tagged images.
datetime | timedelta | None
default:"None"
Return images created after this time. Accepts datetime or timedelta relative to now.
datetime | timedelta | None
default:"None"
Return images created before this time. Accepts datetime or timedelta relative to now.
list[ContreeImage]
list[ContreeImage]List of images matching the given filters.

docker()

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.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

get_image_by_tag()

required
ContreeImage

get_image_by_uuid()

required
ContreeImage

get_images_list()

Fetch a list of images with optional filters.
int | None
default:"100"
Maximum number of images to return. None returns all.
bool
default:"False"
If True, return only tagged images.
datetime | timedelta | None
default:"None"
Return images created after this time. Accepts datetime or timedelta relative to now.
datetime | timedelta | None
default:"None"
Return images created before this time. Accepts datetime or timedelta relative to now.
list[ContreeImage]
list[ContreeImage]List of images matching the given filters.

image_by_data()

required
TypeVar(ImageT, bound= ContreeImageBase)

import_from()

Import an image from an external registry into Contree.
str | OCIReference
required
str | OCIReferenceOCI reference string or OCIReference pointing to the source image.
str | None
default:"None"
Tag to assign to the imported image. Defaults to the tag in the reference.
str | None
default:"None"
Registry username for private registries.
str | None
default:"None"
Registry password for private registries.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageImported image object.
ValueError – If image is a UUID or credentials are incomplete.
FailedOperationError – If the import operation completes without returning an image.
CancelledOperationError – If the import operation was cancelled.
OperationTimedOutError – If the import operation did not complete within timeout.

import_image()

Import an image from an external registry into Contree.
str | OCIReference
required
str | OCIReferenceOCI reference string or OCIReference pointing to the source image.
str | None
default:"None"
Tag to assign to the imported image. Defaults to the tag in the reference.
str | None
default:"None"
Registry username for private registries.
str | None
default:"None"
Registry password for private registries.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageImported image object.
ValueError – If image is a UUID or credentials are incomplete.
FailedOperationError – If the import operation completes without returning an image.
CancelledOperationError – If the import operation was cancelled.
OperationTimedOutError – If the import operation did not complete within timeout.

iter_images()

oci()

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.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

parse_ref()

required
UUID | OCIReference

podman()

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.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

pull_by_oci()

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.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

pull_image_by_oci()

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.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImage
ContreeImageResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

use()

Resolve a reference to an image object without importing.
str | UUID | OCIReference
required
str | UUID | OCIReferenceImage identifier: UUID, OCI reference string, or OCIReference object.
bool
default:"False"
If True, verify the image exists by fetching it from the API.
ContreeImage
ContreeImageImage object corresponding to the given reference.

use_image()

Resolve a reference to an image object without importing.
str | UUID | OCIReference
required
str | UUID | OCIReferenceImage identifier: UUID, OCI reference string, or OCIReference object.
bool
default:"False"
If True, verify the image exists by fetching it from the API.
ContreeImage
ContreeImageImage object corresponding to the given reference.

class ImagesManagerSync

Attributes

Methods

__call__()

Fetch a list of images with optional filters.
int | None
default:"100"
Maximum number of images to return. None returns all.
bool
default:"False"
If True, return only tagged images.
datetime | timedelta | None
default:"None"
Return images created after this time. Accepts datetime or timedelta relative to now.
datetime | timedelta | None
default:"None"
Return images created before this time. Accepts datetime or timedelta relative to now.
list[ContreeImageSync]
list[ContreeImageSync]List of images matching the given filters.

__iter__()

docker()

Resolve an image by tag, falling back to import if not found.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

get_image_by_tag()

required
ContreeImageSync

get_image_by_uuid()

required
ContreeImageSync

get_images_list()

Fetch a list of images with optional filters.
int | None
default:"100"
Maximum number of images to return. None returns all.
bool
default:"False"
If True, return only tagged images.
datetime | timedelta | None
default:"None"
Return images created after this time. Accepts datetime or timedelta relative to now.
datetime | timedelta | None
default:"None"
Return images created before this time. Accepts datetime or timedelta relative to now.
list[ContreeImageSync]
list[ContreeImageSync]List of images matching the given filters.

image_by_data()

required
TypeVar(ImageT, bound= ContreeImageBase)

import_from()

Import an image from an external registry into Contree.
str | OCIReference
required
str | OCIReferenceOCI reference string or OCIReference pointing to the source image.
str | None
default:"None"
Tag to assign to the imported image. Defaults to the tag in the reference.
str | None
default:"None"
Registry username for private registries.
str | None
default:"None"
Registry password for private registries.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncImported image object.
ValueError – If image is a UUID or credentials are incomplete.
FailedOperationError – If the import operation completes without returning an image.
CancelledOperationError – If the import operation was cancelled.
OperationTimedOutError – If the import operation did not complete within timeout.

import_image()

Import an image from an external registry into Contree.
str | OCIReference
required
str | OCIReferenceOCI reference string or OCIReference pointing to the source image.
str | None
default:"None"
Tag to assign to the imported image. Defaults to the tag in the reference.
str | None
default:"None"
Registry username for private registries.
str | None
default:"None"
Registry password for private registries.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncImported image object.
ValueError – If image is a UUID or credentials are incomplete.
FailedOperationError – If the import operation completes without returning an image.
CancelledOperationError – If the import operation was cancelled.
OperationTimedOutError – If the import operation did not complete within timeout.

iter_images()

oci()

Resolve an image by tag, falling back to import if not found.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

parse_ref()

required
UUID | OCIReference

podman()

Resolve an image by tag, falling back to import if not found.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

pull_by_oci()

Resolve an image by tag, falling back to import if not found.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

pull_image_by_oci()

Resolve an image by tag, falling back to import if not found.
str | OCIReference | UUID
required
str | OCIReference | UUIDUUID, OCI reference string, or OCIReference of the image.
str | None
default:"None"
Tag override; if provided, replaces the tag from the reference.
str | None
default:"None"
Registry username for authenticated imports.
str | None
default:"None"
Registry password for authenticated imports.
float | None
default:"None"
Maximum seconds to wait for the import operation.
ContreeImageSync
ContreeImageSyncResolved or imported image object.
NotFoundError – If ref is a UUID and the image does not exist.

use()

Resolve a reference to an image object without importing.
str | UUID | OCIReference
required
str | UUID | OCIReferenceImage identifier: UUID, OCI reference string, or OCIReference object.
bool
default:"False"
If True, verify the image exists by fetching it from the API.
ContreeImageSync
ContreeImageSyncImage object corresponding to the given reference.

use_image()

Resolve a reference to an image object without importing.
str | UUID | OCIReference
required
str | UUID | OCIReferenceImage identifier: UUID, OCI reference string, or OCIReference object.
bool
default:"False"
If True, verify the image exists by fetching it from the API.
ContreeImageSync
ContreeImageSyncImage object corresponding to the given reference.