AsyncTemplatesClient
Source: leap0/_async/templates.py
Signature
Section titled “Signature”AsyncTemplatesClient(transport: AsyncTransport)Overview
Section titled “Overview”Create, rename, and delete sandbox templates.
A template is a container image that has been converted into a sandbox root filesystem. Sandboxes are always created from a template.
Example:
template = client.templates.create( name="my-template", uri="docker.io/library/python:3.12",)print(template.id)Attributes: None.
Methods
Section titled “Methods”create
Section titled “create”async create(*, name: str, uri: str, credentials: RegistryCredentials | RegistryCredentialsDict | None = None) -> TemplateUpload a new template from a container image URI.
Args:
name: Template name. Must not start with system/ or contain whitespace.
uri: Container image URI to pull and convert (e.g. docker.io/library/python:3.12).
credentials: Optional registry credentials for private images.
Supports basic, AWS, GCP, and Azure authentication.
Returns: Template: Uploaded template metadata.
rename
Section titled “rename”async rename(template_id: str, *, name: str, http_timeout: float | None = None) -> NoneRename an existing template.
Args: template_id: ID of the template to rename. name: New template name. http_timeout: Optional HTTP request timeout in seconds for this SDK call.
delete
Section titled “delete”async delete(template_id: str, http_timeout: float | None = None) -> NoneDelete a template by ID.
Args: template_id: ID of the template to delete. http_timeout: Optional HTTP request timeout in seconds for this SDK call.