Skip to content

Templates

Build sandbox templates from a base image, a Dockerfile or builder steps, and manage builds.

Every method shows the same operation in each SDK; pick a language once and every tab on the site follows it.

Python TypeScript Go Ruby Java

Fluent builder. Files copied from the host are sent as a deterministic tar context; helpers are in :mod:svm.template_helpers.

Python exposes these as methods; see below.

def list(*, page_size: int | None=None, page_token: str | None=None, visibility: str | None=None, client: SandboxClient | None=None) -> 'SandboxPage[TemplateInfo]'
static

One page of the templates the caller can use (GET /v2/templates) as TemplateInfo; pass its next_page_token as page_token for the next page (None on the last one). visibility narrows the list to "private" (the team’s own), "public", "system" (the platform catalog every team can launch) or "all" (the default).

Parameter Type Default
page_size int | None None
page_token str | None None
visibility str | None None
client SandboxClient | None None

Returns 'SandboxPage[TemplateInfo]'

Source: sdk/python/svm/templates.py:203
def add_mcp_server(self: Template, name: str, *, catalog_id: str | None=None, command: str | None=None, args: list[str] | None=None, env_secret_names: list[str] | None=None, secrets: dict[str, str] | None=None, env: dict[str, str] | None=None, tool_rules: dict[str, Any] | None=None) -> Template
from TemplateHelpers

Run an MCP server behind the gateway in every sandbox of this template, as mcp_servers of Sandbox.create takes it (a sandbox’s own server of the same name replaces it): a catalog server (catalog_id) or a custom one (command, with args), exactly one. The list is sent with the build and becomes the template’s (not the image’s: it does not change the build cache, and every tag has it). A sandbox restored from a snapshot keeps the snapshot’s own servers.

Parameter Type Default
name str
catalog_id str | None None
command str | None None
args list[str] | None None
env_secret_names list[str] | None None
secrets dict[str, str] | None None
env dict[str, str] | None None
tool_rules dict[str, Any] | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:286
def apt_install(self: Template, packages: list[str]) -> Template
from TemplateHelpers

Install system packages with apt-get, or with apk, dnf or pacman on an Alpine, Fedora or Arch Linux base (the image’s package names).

Parameter Type Default
packages list[str]

Returns Template

Source: sdk/python/svm/template_helpers.py:157

Not in the Python SDK’s Template.

def assign_tags(name_or_id: str, tags: 'list[str]', *, build_id: str | None=None, client: SandboxClient | None=None) -> 'list[str]'
static

Point tags at build_id (the latest ready build when None); returns the template’s tags afterwards.

Parameter Type Default
name_or_id str
tags 'list[str]'
build_id str | None None
client SandboxClient | None None

Returns 'list[str]'

Source: sdk/python/svm/templates.py:231

Not in the Python SDK’s Template.

def build(self, *, on_log: Callable[[BuildLogLine], None] | None=None, wait: bool=False, timeout_seconds: float=2400, idempotency_key: str | None=None, tags: list[str] | None=None) -> TemplateBuild

Build; tags (up to 16) point at the build once it is ready. With wait (or on_log) it follows the build to its end and raises BuildError when the build failed (a canceled build is returned).

Parameter Type Default
on_log Callable[[BuildLogLine], None] | None None
wait bool False
timeout_seconds float 2400
idempotency_key str | None None
tags list[str] | None None

Returns TemplateBuild

Raises BuildError

Source: sdk/python/svm/templates.py:357
def bun_install(self: Template, packages: list[str] | None=None, *, global_: bool=False, **kw: Any) -> Template
from TemplateHelpers
Parameter Type Default
packages list[str] | None None
global_ bool False
kw Any optional

Returns Template

Source: sdk/python/svm/template_helpers.py:181

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

def copy(self, source: str, destination: str, *, content: bytes | None=None) -> 'Template'

Copy source (a relative path in the build context, read from disk unless content is given) to destination in the image. Copies come before any run step (the files are placed in the image before the steps run), so a copy after run_cmd or a helper that runs a command is refused here.

Parameter Type Default
source str
destination str
content bytes | None None

Returns 'Template'

Source: sdk/python/svm/templates.py:277
def copy_items(self: Template, items: list[dict[str, Any]]) -> Template
from TemplateHelpers

copy for each item ({"src": ..., "dest": ..., "content": optional bytes or text}), all or none.

Parameter Type Default
items list[dict[str, Any]]

Returns Template

Source: sdk/python/svm/template_helpers.py:216

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

def delete(template_id: str, *, client: SandboxClient | None=None) -> None
static
Parameter Type Default
template_id str
client SandboxClient | None None
Source: sdk/python/svm/templates.py:249
def dev_container_prebuild(self: Template, devcontainer_dir: str) -> Template
from TemplateHelpers

Build the dev container in devcontainer_dir (an absolute path holding devcontainer.json, usually <project>/.devcontainer) into the image: one run step that installs the devcontainer CLI when the image has none (npm install -g @devcontainers/cli) and builds it using the parent project as --workspace-folder and devcontainer.json as --config. The image needs Node and Docker, as a dev container does; the step fails the build with the CLI’s own message when it cannot build.

Parameter Type Default
devcontainer_dir str

Returns Template

Source: sdk/python/svm/template_helpers.py:258

Not in the Python SDK’s Template.

def exists(name_or_id: str, *, client: SandboxClient | None=None) -> bool
static

Whether a template of this name or ID is visible to the caller.

Parameter Type Default
name_or_id str
client SandboxClient | None None

Returns bool

Source: sdk/python/svm/templates.py:217
def from_alpine_image(self: Template, version: str='3') -> Template
from TemplateHelpers
Parameter Type Default
version str '3'

Returns Template

Source: sdk/python/svm/template_helpers.py:123
def from_arch_image(self: Template, version: str='latest') -> Template
from TemplateHelpers
Parameter Type Default
version str 'latest'

Returns Template

Source: sdk/python/svm/template_helpers.py:129
def from_base_image(self: Template) -> Template
from TemplateHelpers

Ubuntu 24.04, the system the platform’s default base template runs. The catalog image itself (with Python, Node and git) is the operator’s and cannot be named by a template, so add the tools you need.

Returns Template

Source: sdk/python/svm/template_helpers.py:132
def from_bun_image(self: Template, version: str='1') -> Template
from TemplateHelpers
Parameter Type Default
version str '1'

Returns Template

Source: sdk/python/svm/template_helpers.py:114
def from_catalog_template(self, name: str) -> 'Template'

Build on a platform catalog template (python, or python:latest) instead of an image: its image and steps come first and this builder’s steps follow. The result is this team’s own private template and counts toward the plan’s template limit.

Parameter Type Default
name str

Returns 'Template'

Source: sdk/python/svm/templates.py:260
def from_debian_image(self: Template, version: str='bookworm') -> Template
from TemplateHelpers
Parameter Type Default
version str 'bookworm'

Returns Template

Source: sdk/python/svm/template_helpers.py:120
def from_dockerfile(self, dockerfile: str, *, ready: str | None=None) -> 'Template'

Fill this template from Dockerfile text, or a path to a Dockerfile.

FROM, RUN, ENV, WORKDIR, ENTRYPOINT/CMD and HEALTHCHECK are read; the rest follow :mod:svm.dockerfile (multi-stage builds and RUN flags are refused). ready is the readiness command when there is no HEALTHCHECK. A Docker Hub short name in FROM is read as its full name (python:3.12-slim -> docker.io/library/python:3.12-slim), and a command in the exec form ["/bin/sh", "-c", X] is the shell command X, so reading back what to_dockerfile wrote gives the same steps and commands.

Parameter Type Default
dockerfile str
ready str | None None

Returns 'Template'

Source: sdk/python/svm/templates.py:309
def from_fedora_image(self: Template, version: str='latest') -> Template
from TemplateHelpers
Parameter Type Default
version str 'latest'

Returns Template

Source: sdk/python/svm/template_helpers.py:126
def from_gcp_registry(self: Template, image: str, secret_name: str) -> Template
from TemplateHelpers

Base the template on an image in Google Artifact Registry or Container Registry. secret_name names a team secret holding _json_key:<service account key JSON>, sent to the registry as its user and password.

Parameter Type Default
image str
secret_name str

Returns Template

Source: sdk/python/svm/template_helpers.py:137
def from_image(self, image: str, *, registry_secret: str | None=None) -> 'Template'

Base the template on an OCI image; registry_secret names the team secret that pulls it from a private registry.

Parameter Type Default
image str
registry_secret str | None None

Returns 'Template'

Source: sdk/python/svm/templates.py:252
def from_node_image(self: Template, version: str='22') -> Template
from TemplateHelpers
Parameter Type Default
version str '22'

Returns Template

Source: sdk/python/svm/template_helpers.py:111

Not in the Python SDK’s Template.

def from_python_image(self: Template, version: str='3.12') -> Template
from TemplateHelpers
Parameter Type Default
version str '3.12'

Returns Template

Source: sdk/python/svm/template_helpers.py:108
def from_template(self: Template, other: Template) -> Template
from TemplateHelpers

Start from another builder’s definition: its image, registry, steps, files and commands.

Parameter Type Default
other Template

Returns Template

Source: sdk/python/svm/template_helpers.py:146
def from_ubuntu_image(self: Template, version: str='24.04') -> Template
from TemplateHelpers
Parameter Type Default
version str '24.04'

Returns Template

Source: sdk/python/svm/template_helpers.py:117
def get_tags(name_or_id: str, *, client: SandboxClient | None=None) -> 'list[str]'
static

The tags of a template (by name or ID).

Parameter Type Default
name_or_id str
client SandboxClient | None None

Returns 'list[str]'

Source: sdk/python/svm/templates.py:226
def git_clone(self: Template, url: str, path: str | None=None, *, branch: str | None=None, depth: int | None=None) -> Template
from TemplateHelpers

Clone an HTTPS repository at build time; the URL may carry no credential.

Parameter Type Default
url str
path str | None None
branch str | None None
depth int | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:189

Not in the Python SDK’s Template.

def make_dir(self: Template, path: str, *, mode: str | None=None) -> Template
from TemplateHelpers
Parameter Type Default
path str
mode str | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:208
def make_symlink(self: Template, target: str, link: str) -> Template
from TemplateHelpers
Parameter Type Default
target str
link str

Returns Template

Source: sdk/python/svm/template_helpers.py:213
mcp_servers: list[dict[str, Any]]

Property.

Not in the Python SDK’s Template.

def npm_install(self: Template, packages: list[str] | None=None, *, global_: bool=False, **kw: Any) -> Template
from TemplateHelpers
Parameter Type Default
packages list[str] | None None
global_ bool False
kw Any optional

Returns Template

Source: sdk/python/svm/template_helpers.py:174
def pip_install(self: Template, packages: list[str]) -> Template
from TemplateHelpers
Parameter Type Default
packages list[str]

Returns Template

Source: sdk/python/svm/template_helpers.py:171
registry_credentials: list[dict[str, str]]

Property.

def remove(self: Template, path: str, *, recursive: bool=False) -> Template
from TemplateHelpers

Delete path in the image (a directory needs recursive).

Parameter Type Default
path str
recursive bool False

Returns Template

Source: sdk/python/svm/template_helpers.py:231
def remove_tags(name_or_id: str, tags: 'list[str]', *, client: SandboxClient | None=None) -> None
static

Remove tags from a template; the builds stay.

Parameter Type Default
name_or_id str
tags 'list[str]'
client SandboxClient | None None
Source: sdk/python/svm/templates.py:242
def rename(self: Template, src: str, dst: str) -> Template
from TemplateHelpers

Move src to dst in the image.

Parameter Type Default
src str
dst str

Returns Template

Source: sdk/python/svm/template_helpers.py:235

Not in the Python SDK’s Template.

def run_cmd(self, command: str | list[str]) -> 'Template'
Parameter Type Default
command str | list[str]

Returns 'Template'

Source: sdk/python/svm/templates.py:270
def set_default_user(self: Template, user: str) -> Template
from TemplateHelpers

Run every command, process, PTY, code run and file call a sandbox of this template gets through the SDK as user unless the call names a user of its own, as commands.run(..., user="root") does for the operator. Unlike set_user it does not change the template’s start and ready commands, so the MCP gateway (a service) keeps root while an agent in the sandbox does not and cannot approve its own tool calls. user is an account name of the image; the image must have it (create it with a run_cmd such as useradd -m agent), or every call that names no user is refused.

Parameter Type Default
user str

Returns Template

Source: sdk/python/svm/template_helpers.py:246
def set_dev_container_start(self: Template, devcontainer_dir: str, command: str | None=None) -> Template
from TemplateHelpers

Start the dev container in devcontainer_dir when the template starts (so it is running in the snapshot): the start command is devcontainer up --workspace-folder and --config followed by creating /devcontainer.up, and the ready command waits for that file (set_ready_cmd afterwards replaces it). With command it then runs command inside the dev container (devcontainer exec). Needs the devcontainer CLI: call dev_container_prebuild first.

Parameter Type Default
devcontainer_dir str
command str | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:269
def set_envs(self, envs: dict[str, str]) -> 'Template'
Parameter Type Default
envs dict[str, str]

Returns 'Template'

Source: sdk/python/svm/templates.py:295
def set_ready_cmd(self, command: str) -> 'Template'
Parameter Type Default
command str

Returns 'Template'

Source: sdk/python/svm/templates.py:340
def set_start_cmd(self, command: str) -> 'Template'
Parameter Type Default
command str

Returns 'Template'

Source: sdk/python/svm/templates.py:334
def set_user(self: Template, user: str) -> Template
from TemplateHelpers

Run the following steps, and the sandbox, as user (name, uid or user:group).

Parameter Type Default
user str

Returns Template

Source: sdk/python/svm/template_helpers.py:239
def set_workdir(self, path: str) -> 'Template'
Parameter Type Default
path str

Returns 'Template'

Source: sdk/python/svm/templates.py:303
def skip_cache(self: Template) -> Template
from TemplateHelpers

Build afresh: the build cache is keyed on the definition, and this adds a one-off value to it.

Returns Template

Source: sdk/python/svm/template_helpers.py:311

Not in the Python SDK’s Template.

def to_dockerfile(self: Template) -> str
from TemplateHelpers

The definition as a Dockerfile. from_dockerfile reads it back to the same image (in full, see svm.dockerfile.qualify_image), steps and commands, apart from COPY, USER and default_user (refused or a comment).

The builder applies a template’s environment and working directory to every RUN step, those listed before the set_envs/set_workdir call included (one environment, the last value of each variable; one directory, the last). So the Dockerfile says it the same way: the merged ENV and the last WORKDIR come right after FROM, before any RUN. USER stays where it is: it applies from its step on, as in a Dockerfile.

Returns str

Source: sdk/python/svm/template_helpers.py:330

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Not in the Python SDK’s Template.

Python TypeScript Go Ruby Java

Mixed into svm.templates.Template.

Property Type Description
mcp_servers list[dict[str, Any]]
registry_credentials list[dict[str, str]]

Not in the Python SDK’s TemplateHelpers.

def add_mcp_server(self: Template, name: str, *, catalog_id: str | None=None, command: str | None=None, args: list[str] | None=None, env_secret_names: list[str] | None=None, secrets: dict[str, str] | None=None, env: dict[str, str] | None=None, tool_rules: dict[str, Any] | None=None) -> Template

Run an MCP server behind the gateway in every sandbox of this template, as mcp_servers of Sandbox.create takes it (a sandbox’s own server of the same name replaces it): a catalog server (catalog_id) or a custom one (command, with args), exactly one. The list is sent with the build and becomes the template’s (not the image’s: it does not change the build cache, and every tag has it). A sandbox restored from a snapshot keeps the snapshot’s own servers.

Parameter Type Default
name str
catalog_id str | None None
command str | None None
args list[str] | None None
env_secret_names list[str] | None None
secrets dict[str, str] | None None
env dict[str, str] | None None
tool_rules dict[str, Any] | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:286
def apt_install(self: Template, packages: list[str]) -> Template

Install system packages with apt-get, or with apk, dnf or pacman on an Alpine, Fedora or Arch Linux base (the image’s package names).

Parameter Type Default
packages list[str]

Returns Template

Source: sdk/python/svm/template_helpers.py:157
def bun_install(self: Template, packages: list[str] | None=None, *, global_: bool=False, **kw: Any) -> Template
Parameter Type Default
packages list[str] | None None
global_ bool False
kw Any optional

Returns Template

Source: sdk/python/svm/template_helpers.py:181
def copy_items(self: Template, items: list[dict[str, Any]]) -> Template

copy for each item ({"src": ..., "dest": ..., "content": optional bytes or text}), all or none.

Parameter Type Default
items list[dict[str, Any]]

Returns Template

Source: sdk/python/svm/template_helpers.py:216
def dev_container_prebuild(self: Template, devcontainer_dir: str) -> Template

Build the dev container in devcontainer_dir (an absolute path holding devcontainer.json, usually <project>/.devcontainer) into the image: one run step that installs the devcontainer CLI when the image has none (npm install -g @devcontainers/cli) and builds it using the parent project as --workspace-folder and devcontainer.json as --config. The image needs Node and Docker, as a dev container does; the step fails the build with the CLI’s own message when it cannot build.

Parameter Type Default
devcontainer_dir str

Returns Template

Source: sdk/python/svm/template_helpers.py:258
def from_alpine_image(self: Template, version: str='3') -> Template
Parameter Type Default
version str '3'

Returns Template

Source: sdk/python/svm/template_helpers.py:123
def from_arch_image(self: Template, version: str='latest') -> Template
Parameter Type Default
version str 'latest'

Returns Template

Source: sdk/python/svm/template_helpers.py:129
def from_base_image(self: Template) -> Template

Ubuntu 24.04, the system the platform’s default base template runs. The catalog image itself (with Python, Node and git) is the operator’s and cannot be named by a template, so add the tools you need.

Returns Template

Source: sdk/python/svm/template_helpers.py:132
def from_bun_image(self: Template, version: str='1') -> Template
Parameter Type Default
version str '1'

Returns Template

Source: sdk/python/svm/template_helpers.py:114
def from_debian_image(self: Template, version: str='bookworm') -> Template
Parameter Type Default
version str 'bookworm'

Returns Template

Source: sdk/python/svm/template_helpers.py:120
def from_fedora_image(self: Template, version: str='latest') -> Template
Parameter Type Default
version str 'latest'

Returns Template

Source: sdk/python/svm/template_helpers.py:126
def from_gcp_registry(self: Template, image: str, secret_name: str) -> Template

Base the template on an image in Google Artifact Registry or Container Registry. secret_name names a team secret holding _json_key:<service account key JSON>, sent to the registry as its user and password.

Parameter Type Default
image str
secret_name str

Returns Template

Source: sdk/python/svm/template_helpers.py:137
def from_node_image(self: Template, version: str='22') -> Template
Parameter Type Default
version str '22'

Returns Template

Source: sdk/python/svm/template_helpers.py:111
def from_python_image(self: Template, version: str='3.12') -> Template
Parameter Type Default
version str '3.12'

Returns Template

Source: sdk/python/svm/template_helpers.py:108
def from_template(self: Template, other: Template) -> Template

Start from another builder’s definition: its image, registry, steps, files and commands.

Parameter Type Default
other Template

Returns Template

Source: sdk/python/svm/template_helpers.py:146
def from_ubuntu_image(self: Template, version: str='24.04') -> Template
Parameter Type Default
version str '24.04'

Returns Template

Source: sdk/python/svm/template_helpers.py:117
def git_clone(self: Template, url: str, path: str | None=None, *, branch: str | None=None, depth: int | None=None) -> Template

Clone an HTTPS repository at build time; the URL may carry no credential.

Parameter Type Default
url str
path str | None None
branch str | None None
depth int | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:189

Not in the Python SDK’s TemplateHelpers.

def make_dir(self: Template, path: str, *, mode: str | None=None) -> Template
Parameter Type Default
path str
mode str | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:208
def make_symlink(self: Template, target: str, link: str) -> Template
Parameter Type Default
target str
link str

Returns Template

Source: sdk/python/svm/template_helpers.py:213
def npm_install(self: Template, packages: list[str] | None=None, *, global_: bool=False, **kw: Any) -> Template
Parameter Type Default
packages list[str] | None None
global_ bool False
kw Any optional

Returns Template

Source: sdk/python/svm/template_helpers.py:174

Not in the Python SDK’s TemplateHelpers.

Not in the Python SDK’s TemplateHelpers.

def pip_install(self: Template, packages: list[str]) -> Template
Parameter Type Default
packages list[str]

Returns Template

Source: sdk/python/svm/template_helpers.py:171

Not in the Python SDK’s TemplateHelpers.

Not in the Python SDK’s TemplateHelpers.

def remove(self: Template, path: str, *, recursive: bool=False) -> Template

Delete path in the image (a directory needs recursive).

Parameter Type Default
path str
recursive bool False

Returns Template

Source: sdk/python/svm/template_helpers.py:231
def rename(self: Template, src: str, dst: str) -> Template

Move src to dst in the image.

Parameter Type Default
src str
dst str

Returns Template

Source: sdk/python/svm/template_helpers.py:235
def set_default_user(self: Template, user: str) -> Template

Run every command, process, PTY, code run and file call a sandbox of this template gets through the SDK as user unless the call names a user of its own, as commands.run(..., user="root") does for the operator. Unlike set_user it does not change the template’s start and ready commands, so the MCP gateway (a service) keeps root while an agent in the sandbox does not and cannot approve its own tool calls. user is an account name of the image; the image must have it (create it with a run_cmd such as useradd -m agent), or every call that names no user is refused.

Parameter Type Default
user str

Returns Template

Source: sdk/python/svm/template_helpers.py:246
def set_dev_container_start(self: Template, devcontainer_dir: str, command: str | None=None) -> Template

Start the dev container in devcontainer_dir when the template starts (so it is running in the snapshot): the start command is devcontainer up --workspace-folder and --config followed by creating /devcontainer.up, and the ready command waits for that file (set_ready_cmd afterwards replaces it). With command it then runs command inside the dev container (devcontainer exec). Needs the devcontainer CLI: call dev_container_prebuild first.

Parameter Type Default
devcontainer_dir str
command str | None None

Returns Template

Source: sdk/python/svm/template_helpers.py:269
def set_user(self: Template, user: str) -> Template

Run the following steps, and the sandbox, as user (name, uid or user:group).

Parameter Type Default
user str

Returns Template

Source: sdk/python/svm/template_helpers.py:239
def skip_cache(self: Template) -> Template

Build afresh: the build cache is keyed on the definition, and this adds a one-off value to it.

Returns Template

Source: sdk/python/svm/template_helpers.py:311
def to_dockerfile(self: Template) -> str

The definition as a Dockerfile. from_dockerfile reads it back to the same image (in full, see svm.dockerfile.qualify_image), steps and commands, apart from COPY, USER and default_user (refused or a comment).

The builder applies a template’s environment and working directory to every RUN step, those listed before the set_envs/set_workdir call included (one environment, the last value of each variable; one directory, the last). So the Dockerfile says it the same way: the merged ENV and the last WORKDIR come right after FROM, before any RUN. USER stays where it is: it applies from its step on, as in a Dockerfile.

Returns str

Source: sdk/python/svm/template_helpers.py:330
Python TypeScript Go Ruby Java

TemplateBuild is a started build.

Not in the Python SDK’s TemplateBuild.

def follow_logs(self, *, on_log: Callable[[BuildLogLine], None] | None=None, poll_seconds: float=1.0, timeout_seconds: float=2400.0, sleep: Callable[[float], None]=time.sleep, clock: Callable[[], float]=time.monotonic) -> Iterator[BuildLogLine]

Yield the build’s log lines (BuildLogLine, with timestamp and stream) from the first one until the build ends (a finished build’s whole log, so it can be re-read). on_log=default_build_logger() prints them.

This is a generator: nothing is fetched, and on_log is not called, until it is iterated (for line in build.follow_logs(): or list(...)).

Parameter Type Default
on_log Callable[[BuildLogLine], None] | None None
poll_seconds float 1.0
timeout_seconds float 2400.0
sleep Callable[[float], None] time.sleep
clock Callable[[], float] time.monotonic

Returns Iterator[BuildLogLine]

Raises TimeoutError

Source: sdk/python/svm/templates.py:142
id: str

Property (read-only).

Not in the Python SDK’s TemplateBuild.

Not in the Python SDK’s TemplateBuild.

def refresh(self) -> BuildInfo

Returns BuildInfo

Source: sdk/python/svm/templates.py:135

Not in the Python SDK’s TemplateBuild.

Python TypeScript Go Ruby Java

TemplateInfo is a template as Templates.List returns it.

Property Type Description
build_status str | None
latest_build_id str | None
mcp_servers list[dict[str, Any]]
name str
tags list[str]
template_id str
visibility str

Not in the Python SDK’s TemplateInfo.

Not in the Python SDK’s TemplateInfo.

Python TypeScript Go Ruby Java
Property Type Description
build_id str
digest str | None
reason str | None
status str
template_id str
upload_url str | None
Python TypeScript Go Ruby Java

One line of a build’s log: timestamp (RFC 3339), stream (stdout, stderr or system, when known) and the text. str(line) is the text.

line: str

Property (read-only).

stream: str | None

Property (read-only).

timestamp: str | None

Property (read-only).

Python TypeScript Go Ruby Java

A Dockerfile uses something a template cannot represent.

Python exposes these as methods; see below.

Not in the Python SDK’s DockerfileError.

Not in the Python SDK’s DockerfileError.