from_snippet() method allows you to create a new sandbox that shares the same file system and state as a previously created sandbox, using its unique snippet ID. This is particularly useful when you’ve created a sandbox with should_backup_filesystem=True and want to resume work later without losing any files or progress.
from_snippet(snippet_id: str) -> None
Description:Recreates a sandbox using the same file system as a previous sandbox session identified by its snippet ID.
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
snippet_id | str | Yes | The snippet ID returned from a previous create() call. |
Returns:
None: Resolves when the sandbox has successfully connected and restored the previous environment.
