Skip to main content
Monitor streams provide live sandbox observations, while snapshot APIs create, list, inspect, and delete reusable snapshot records.

Monitor

from nullspace import Monitor

monitor = Monitor()
subscription = monitor.subscribe(
    interval_ms=1_000,
    include_processes=True,
    on_metrics=lambda event: print(event.metrics),
    on_processes=lambda event: print(event.processes),
    on_error=lambda event: print(event.message),
)
subscription.stop()

Snapshots

from nullspace import Sandbox, Snapshot

sandbox = Sandbox.create()
snapshot = sandbox.create_snapshot()
print(Snapshot.get(snapshot.id))
Snapshot.delete(snapshot.id)
Shared volumes remount as external storage on compatible resume, reusable snapshot restore, and fork. They are not embedded in the VM snapshot. Concepts: Hibernate, Resume. API reference: listSnapshots, getSnapshot, deleteSnapshot, and monitorWebsocketUpgrade.