Skip to content

SDK 0.4.33: compact sandbox status inventory

Choose a tag to compare

@rlrs rlrs released this 28 Sep 19:48

Status-only polling can now request compact sandbox records instead of reading and transferring full specifications and snapshot descriptors. SDK 0.4.33 adds list_sandbox_statuses(sandbox_ids=...) and get_sandbox_status(sandbox_id) to both synchronous and asynchronous clients.

from ucloud_sandboxes_sdk import AsyncSandboxClient

async with AsyncSandboxClient.from_env() as client:
    statuses = await client.list_sandbox_statuses(sandbox_ids=["agent-1", "agent-2"])
    status = await client.get_sandbox_status("agent-1")

Omit sandbox_ids for all statuses. Exact-ID filters accept at most 256 IDs; an explicit empty list returns [] without making a request. Status records preserve state, cached state, worker placement, generation, and timestamps. The gateway must support view=status; unsupported or malformed responses raise SandboxApiError instead of silently returning an unfiltered full inventory.

Existing list_sandboxes() and get_sandbox() calls retain full-record behavior. Use the new methods explicitly where only status is needed. No dependency changes.

Install the versioned release wheel (the SDK is distributed through GitHub releases):

uv add "ucloud-sandboxes-sdk[async] @ https://github.com/rlrs/ucloud-sandboxes-sdk/releases/download/v0.4.33/ucloud_sandboxes_sdk-0.4.33-py3-none-any.whl"

Validation: all 176 tests passed on Python 3.10 and 3.13 with all optional integrations installed; Ruff and the minimal installed-wheel smoke test passed. Both clients passed a read-only production smoke test over verified HTTPS, including compact/full inventory and absent-ID filtering. Production inventory was empty during that smoke test; populated responses and malformed/legacy gateway responses are covered by protocol tests.

Commit: fecf8930e35ac3f5a5832eddde34a975bd2d6431.

SHA-256:

d15b65fbb5e1570fde69cb9d571789a9b61d4418682efc17732bdc9c2ca8414c  ucloud_sandboxes_sdk-0.4.33-py3-none-any.whl
f7128a710f5f8307baea3f7a45cf4aaaa8e2fe8de26cb8e0fc9d6592e786a43d  ucloud_sandboxes_sdk-0.4.33.tar.gz