Skip to main content
A Snapshot is a saved copy of a sandbox’s memory and disk. Take one with sandbox.snapshot(), and start new sandboxes from it with Sandbox.create({ fromSnapshot }). Python has a sync Snapshot and an async AsyncSnapshot with the same methods. For how snapshots and forks behave, see Snapshots and forks.

Import

Factory methods

Snapshot.get

Fetch a snapshot by ID.

Snapshot.list

List a sandbox’s snapshots, newest first. This also works after the sandbox is deleted. For a sandbox you already have, sandbox.snapshots() does the same. Returns SnapshotInfo[].

Snapshot.deleteById / Snapshot.delete_by_id

Delete a snapshot by ID. Safe to call more than once.

Methods on snapshot

getInfo / get_info

Fetch the snapshot’s current state as a SnapshotInfo.

rename

Change the snapshot’s name (1 to 64 characters). Returns the renamed Snapshot.

delete

Delete the snapshot. Sandboxes already created from it keep running. Safe to call more than once.

waitUntilReady / wait_until_ready

Wait until the snapshot is ready. You only need this if you called sandbox.snapshot() with wait: false / wait=False. If the snapshot failed or was deleted, this raises SandboxError. If it still isn’t ready when the timeout runs out, TypeScript throws TimeoutError and Python raises SandboxTimeoutError.

Types

SnapshotInfo

Errors