Source: src/cwsandbox/_defaults.py:136Documentation Index
Fetch the complete documentation index at: https://docs.coreweave.com/llms.txt
Use this file to discover all available pages before exploring further.
- request_timeout_seconds: How long to wait for API responses (client-side)
- max_lifetime_seconds: How long the sandbox runs before auto-termination (server-side) If not set, the backend controls the default lifetime.
container_image(str) : Docker image for the sandbox container. Default:DEFAULT_CONTAINER_IMAGE.command(str) : Entrypoint command to run. Default:DEFAULT_COMMAND.args(tuple[str, ...]) : Arguments passed to the command. Default:DEFAULT_ARGS.base_url(str) : CWSandbox API endpoint URL. Default:DEFAULT_BASE_URL.request_timeout_seconds(float) : Client-side HTTP timeout in seconds for most RPCs. Poll Get RPCs usepoll_rpc_timeout_secondsinstead. Default:DEFAULT_REQUEST_TIMEOUT_SECONDS.poll_retry_budget_seconds(float) : Wall-clock budget per retry burst (one trip to a stable status). The budget resets on any successful response, so a long-lived sandbox that hits a transient error, recovers, then hits another much later gets a fresh budget each time. Retryable transient codes are UNAVAILABLE, DEADLINE_EXCEEDED, and RESOURCE_EXHAUSTED. Set to 0.0 to disable retries entirely. Default:DEFAULT_POLL_RETRY_BUDGET_SECONDS.poll_rpc_timeout_seconds(float) : Per-call timeout for poll Get RPCs. Kept separate fromrequest_timeout_secondsso a wedged poll fails fast instead of blocking on the broader request timeout. Default:DEFAULT_POLL_RPC_TIMEOUT_SECONDS.max_lifetime_seconds(float | None) : Server-side sandbox lifetime limit in seconds. None lets the backend control the default. Default:DEFAULT_MAX_LIFETIME_SECONDS.temp_dir(str) : Temp directory path inside the sandbox. Default:DEFAULT_TEMP_DIR.tags(tuple[str, ...]) : Tags for filtering and organizing sandboxes. Default:field(default_factory=tuple).profile_ids(tuple[str, ...] | None) : Legacy selector accepting profile IDs. Preferprofile_names. Resolves independently ofprofile_names— setting one explicitly does not suppress the other’s default. Pass an empty list to explicitly clear any default; pass None (the default) to inherit any configured default.profile_names(tuple[str, ...] | None) : Select sandboxes by profile name. Resolves independently ofprofile_ids— both may be combined. Pass an empty list to explicitly clear any default; pass None (the default) to inherit any configured default.runner_ids(tuple[str, ...] | None) : Restrict to specific runner IDs. Pass an empty list to explicitly clear any default; pass None (the default) to inherit any configured default.resources(ResourceOptions | dict[str, Any] | None) : Resource configuration. AcceptsResourceOptionsfor separate requests/limits, or a flat dict for backward-compatible Guaranteed QoS.network(NetworkOptions | None) : Network configuration viaNetworkOptions.secrets(tuple[Secret, ...] | None) : Secrets to inject as environment variables.environment_variables(dict[str, str]) : Environment variables injected into the sandbox. Default:field(default_factory=dict).annotations(dict[str, str]) : Kubernetes pod annotations (key-value string pairs). Merged with per-sandbox annotations; explicit values override defaults. Use for non-sensitive metadata only. Default:field(default_factory=dict).
Methods
merge_tags
merge_environment_variables
merge_annotations
with_overrides
from_dict
SandboxDefaults from a mapping, coercing nested fields.
Accepts plain dicts or OmegaConf DictConfig objects. Unknown
keys are silently ignored so callers can pass a config section
that may contain extra fields.
Coercions applied:
networkdict ->NetworkOptionssecretslist of dicts -> tuple ofSecretargs,tags,profile_ids,profile_names,runner_idslists -> tuplesresources,environment_variables-> plaindict