Skip to main content
The 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.

async from_snippet(playground_snippet_id: str) -> None

Description:
Recreates a sandbox using the same file system as a previous sandbox session identified by its snippet ID.

Parameters:
Returns:
None: Resolves when the sandbox has successfully connected and restored the previous environment.

Example