From b1205c1357d15eb0cf322f1e88a8eb38fad0c6ad Mon Sep 17 00:00:00 2001 From: porter-support Date: Tue, 27 Oct 2026 19:33:44 +0000 Subject: [PATCH] release: Python SDK v0.1.71 --- porter_sandbox/_models.py | 4 ++-- porter_sandbox/sandboxes.py | 4 ++-- pyproject.toml | 2 +- tests/test_models_round_trip.py | 2 +- uv.lock | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/porter_sandbox/_models.py b/porter_sandbox/_models.py index 46381c3..6a7d61f 100644 --- a/porter_sandbox/_models.py +++ b/porter_sandbox/_models.py @@ -121,7 +121,7 @@ class ReadinessResponse(BaseModel): class SandboxDomainSpec(BaseModel): - domain: str | None = Field(default=None, description="Fully qualified hostname for the sandbox, one label under the\ntarget ingress's domain. Unlike name it need not be unique, so\nsuccessive sandboxes can reuse one hostname (only one may be live\nat a time). Defaults to ., then\n., when omitted.\n") + domain: str | None = Field(default=None, description="Fully qualified hostname for the sandbox, one label under the\ntarget ingress's domain. Unlike name it need not be unique, so\nsuccessive sandboxes can reuse one hostname (only one may be live\nat a time). Defaults to ., then\n., when omitted. Not available on Porter-hosted\nsandboxes, which are always served at\n-<8 random characters>..\n") visibility: SandboxDomainSpecVisibility | None = Field(default=None, description="Which sandbox ingress serves the domain when the cluster has both a\npublic and a private one. Omit to default to whichever is\nconfigured, public winning; with neither configured, the sandbox is\nserved at its cluster-internal address only. Rejected when the\nsandbox exposes a port but the requested ingress is not configured\non the cluster.\n") @@ -165,7 +165,7 @@ class SandboxResourcesSpec(BaseModel): class SandboxSpec(BaseModel): - image: str = Field(description="Container image to run. Empty when snapshot_id is set, since the\nsnapshot is the image.\n") + image: str | None = Field(default=None, description="Container image to run. Empty when snapshot_id is set, since the\nsnapshot is the image. When both are omitted, the sandbox runs\npython:3.14-slim, and with no command or args it runs sleep infinity.\n") snapshot_id: str | None = Field(default=None, description="Start the sandbox from this snapshot's filesystem instead of an image,\nso image must be left unset. The snapshot carries no command or volumes:\nan omitted command runs the base image's, and the sandbox mounts only\nthe volumes this request asks for.\n") name: str | None = Field(default=None, description="Sandbox name, unique within the cluster. Must be a valid DNS label\n(lowercase alphanumeric and dashes). Defaults to the sandbox's id\nwhen omitted.\n") tags: dict[str, str] | None = Field(default=None, description="Arbitrary key/value labels for identifying and filtering sandboxes") diff --git a/porter_sandbox/sandboxes.py b/porter_sandbox/sandboxes.py index 816adaf..f02c53b 100644 --- a/porter_sandbox/sandboxes.py +++ b/porter_sandbox/sandboxes.py @@ -30,8 +30,8 @@ def raw(self) -> SandboxesResource: def create( self, - image: str, *, + image: str | None = None, snapshot_id: str | None = None, name: str | None = None, tags: dict[str, str] | None = None, @@ -98,8 +98,8 @@ def raw(self) -> AsyncSandboxesResource: async def create( self, - image: str, *, + image: str | None = None, snapshot_id: str | None = None, name: str | None = None, tags: dict[str, str] | None = None, diff --git a/pyproject.toml b/pyproject.toml index 2095254..31e4015 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "porter-sandbox" -version = "0.1.68" +version = "0.1.71" description = "Python SDK for the Porter Sandbox API" readme = "README.md" requires-python = ">=3.10" diff --git a/tests/test_models_round_trip.py b/tests/test_models_round_trip.py index f28443d..5ff0488 100644 --- a/tests/test_models_round_trip.py +++ b/tests/test_models_round_trip.py @@ -192,7 +192,7 @@ def test_sandbox_resources_spec_round_trip() -> None: def test_sandbox_spec_round_trip() -> None: - instance = SandboxSpec(image="x") + instance = SandboxSpec() serialized = instance.model_dump(by_alias=True, exclude_none=True) round_tripped = SandboxSpec.model_validate(serialized) assert round_tripped.model_dump(by_alias=True, exclude_none=True) == serialized diff --git a/uv.lock b/uv.lock index fc2f760..eca10c5 100644 --- a/uv.lock +++ b/uv.lock @@ -345,7 +345,7 @@ wheels = [ [[package]] name = "porter-sandbox" -version = "0.1.68" +version = "0.1.71" source = { editable = "." } dependencies = [ { name = "httpx" },