Skip to main content

Metrics

from nullspace import Sandbox

with Sandbox.create(template="base") as sandbox:
    for metric in sandbox.get_metrics():
        print(metric)
For streaming updates, use Monitor.

Timeout

Set a timeout at create time or update it while the sandbox is running. The SDK and CLI examples in this section are equivalent alternatives for the same lifecycle settings; use the one that matches the rest of your workflow.
sandbox = Sandbox.create(template="base", timeout=600)
sandbox.set_timeout(120, timeout_action="destroy")
There are two related timeout knobs:
  • on_timeout is create-time lifecycle policy. Use "destroy" or "pause".
  • timeout_action is used by set_timeout(). Use "destroy" or "hibernate".
The default timeout behavior destroys the sandbox when it expires. Use on_timeout="pause" at create time when persistence-capable deployments should hibernate the sandbox instead.
sandbox = Sandbox.create(
    template="base",
    timeout=600,
    on_timeout="pause",
    auto_resume=True,
)
auto_resume=True is valid only with pause/hibernate timeout behavior. Updating an auto-resumable sandbox to destroy-on-timeout is rejected so paused alias routing cannot become inconsistent. CLI equivalents:
nullspace sandbox create --template base --timeout 600 --on-timeout pause --auto-resume
nullspace sandbox timeout set sb_123 --seconds 120 --action hibernate

Capacity and limits

During private beta, sandbox capacity is intentionally limited. Treat create timeouts as recoverable and make scripts idempotent with explicit cleanup.