AsyncImageClient¶
- class baseten.sandbox.AsyncImageClient¶
Bases:
objectAsync form of
ImageClient.- Parameters:
context (AsyncImageClientContext)
- async cleanup()¶
Remove image versions that no sandbox uses. As
ImageClient.cleanup().- Return type:
- async delete(*, name)¶
Delete an image. As
ImageClient.delete().
- async delete_tag(*, name, tag)¶
Delete one version of an image. As
ImageClient.delete_tag().
- async get_info(*, name)¶
Get an image’s current record. As
ImageClient.get_info().
- async list(*, name_prefix=None, sort=None, page_size=None)¶
List images. As
ImageClient.list().- Parameters:
- Return type:
- async list_library()¶
List the built-in images. As
ImageClient.list_library().- Return type:
- async list_tags(*, name, name_prefix=None, sort=None, page_size=None)¶
List an image’s versions. As
ImageClient.list_tags().- Parameters:
- Return type:
- async logs(*, name, start_time=None, end_time=None)¶
Get the build log of an image’s latest build. As
ImageClient.logs().- Parameters:
- Return type:
- async push(*, name: str, builder: ImageBuilder, temp_file: bool | None = None, memory: int | None = None, volume: int | None = None, wait: bool = True, timeout: timedelta | None = datetime.timedelta(seconds=900), poll_interval: timedelta = datetime.timedelta(seconds=3)) ImageInfo¶
- async push(*, name: str, registry_image: str, docker_config: str | None = None, memory: int | None = None, volume: int | None = None, wait: bool = True, timeout: timedelta | None = datetime.timedelta(seconds=900), poll_interval: timedelta = datetime.timedelta(seconds=3)) ImageInfo
- async push(*, name: str, zip: bytes, memory: int | None = None, volume: int | None = None, wait: bool = True, timeout: timedelta | None = datetime.timedelta(seconds=900), poll_interval: timedelta = datetime.timedelta(seconds=3)) ImageInfo
- async push(*, name: str, directory: str, ignore_file_processor: Callable[[ImageIgnoreFileProcessorOptions], Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]] | Awaitable[Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]]]] | None = None, default_ignore_file: Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]] | None = None, temp_file: bool | None = None, memory: int | None = None, volume: int | None = None, wait: bool = True, timeout: timedelta | None = datetime.timedelta(seconds=900), poll_interval: timedelta = datetime.timedelta(seconds=3)) ImageInfo
- async push(*, name: str, files: Mapping[str, str | bytes], memory: int | None = None, volume: int | None = None, wait: bool = True, timeout: timedelta | None = datetime.timedelta(seconds=900), poll_interval: timedelta = datetime.timedelta(seconds=3)) ImageInfo
Push an image. As
ImageClient.push().Local files are read and zipped on a worker thread. The ignore function and processor may also be coroutine functions.
- Parameters:
name (str)
builder (ImageBuilder | None)
registry_image (str | None)
docker_config (str | None)
zip (bytes | None)
directory (str | None)
ignore_file_processor (Callable[[ImageIgnoreFileProcessorOptions], Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]] | Awaitable[Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]]]] | None)
default_ignore_file (Callable[[ImageIgnoreFileOptions], bool | Awaitable[bool]] | None)
temp_file (bool | None)
memory (int | None)
volume (int | None)
wait (bool)
timeout (timedelta | None)
poll_interval (timedelta)
- Return type: