Images

class ImageClient(beaker: Beaker)[source]

Methods for interacting with Beaker Images. Accessed via the Beaker.image property.

Warning

Do not instantiate this class directly! The Beaker client will create one automatically which you can access through the corresponding property.

get(image: str) Image[source]
Examples:

>>> with Beaker.from_env() as beaker:
...     image = beaker.image.get(image_id)
Returns:

A BeakerImage protobuf object.

Raises:

BeakerImageNotFound – If the image doesn’t exist.

create(name: str, image_tag: str, *, workspace: Workspace | None = None, description: str | None = None, commit: bool = True) Image[source]

Upload a local Docker image to Beaker.

Parameters:
  • name – The name to assign to the image on Beaker.

  • image_tag – The tag of the local image you’re uploading.

  • workspace – The workspace to upload the image to. If not specified, your default workspace is used.

  • description – Text description of the image.

  • quiet – If True, progress won’t be displayed.

  • commit – Whether to commit the image after successful upload.

commit(image: Image) Image[source]
update(image: Image, name: str | None = None, description: str | None = None) Image[source]
delete(*images: Image)[source]
list(*, org: Organization | None = None, author: User | None = None, workspace: Workspace | None = None, name_or_description: str | None = None, sort_order: BeakerSortOrder | None = None, sort_field: Literal['created', 'name'] = 'name', limit: int | None = None) Iterable[Image][source]
url(image: Image) str[source]