Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions src/drukbox_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,14 +435,15 @@ async def create_template(
base_image: str | None = None,
label: str | None = None,
) -> SandboxTemplate:
"""Start a template build and return immediately.

The service responds 202 with ``status="building"``. Poll
:meth:`get_template` until the status becomes ``"available"`` or
``"failed"``. A failed record carries the reason in
``last_error``. A repeated post with the same provider, base
image, and setup script returns the existing record without a
rebuild.
"""Start a template build.

The service pulls the base image, then responds 202 with
``status="building"``. Poll :meth:`get_template` until the status
becomes ``"available"`` or ``"failed"``. A failed record carries the
reason in ``last_error``. A repeated post with the same provider,
base image digest, and setup script returns the existing record. A
``"failed"`` record builds again and keeps its ``last_error`` until
that build ends.
"""

payload: dict[str, Any] = {"setup_script": setup_script}
Expand Down
Loading