Skip to content

Commit 2ef386e

Browse files
committed
Use main e2b SDK imports and fix webhook description
1 parent 677c940 commit 2ef386e

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

docs/sandbox/snapshots.mdx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ You can create a snapshot from a running sandbox instance.
4242

4343
<CodeGroup>
4444
```js JavaScript & TypeScript
45-
import { Sandbox } from '@e2b/code-interpreter'
45+
import { Sandbox } from 'e2b'
4646

4747
const sandbox = await Sandbox.create()
4848

@@ -51,7 +51,7 @@ const snapshot = await sandbox.createSnapshot()
5151
console.log('Snapshot ID:', snapshot.snapshotId)
5252
```
5353
```python Python
54-
from e2b_code_interpreter import Sandbox
54+
from e2b import Sandbox
5555

5656
sandbox = Sandbox.create()
5757

@@ -65,14 +65,14 @@ You can also create a snapshot by sandbox ID using the static method.
6565

6666
<CodeGroup>
6767
```js JavaScript & TypeScript
68-
import { Sandbox } from '@e2b/code-interpreter'
68+
import { Sandbox } from 'e2b'
6969

7070
// Create a snapshot by sandbox ID
7171
const snapshot = await Sandbox.createSnapshot(sandboxId)
7272
console.log('Snapshot ID:', snapshot.snapshotId)
7373
```
7474
```python Python
75-
from e2b_code_interpreter import Sandbox
75+
from e2b import Sandbox
7676

7777
# Create a snapshot by sandbox ID
7878
snapshot = Sandbox.create_snapshot(sandbox_id)
@@ -86,15 +86,15 @@ The snapshot ID can be used directly with `Sandbox.create()` to spawn a new sand
8686

8787
<CodeGroup>
8888
```js JavaScript & TypeScript highlight={5}
89-
import { Sandbox } from '@e2b/code-interpreter'
89+
import { Sandbox } from 'e2b'
9090

9191
const snapshot = await sandbox.createSnapshot()
9292

9393
// Create a new sandbox from the snapshot
9494
const newSandbox = await Sandbox.create(snapshot.snapshotId)
9595
```
9696
```python Python highlight={5}
97-
from e2b_code_interpreter import Sandbox
97+
from e2b import Sandbox
9898

9999
snapshot = sandbox.create_snapshot()
100100

@@ -109,7 +109,7 @@ You can list all snapshots. The method returns a paginator for iterating through
109109

110110
<CodeGroup>
111111
```js JavaScript & TypeScript
112-
import { Sandbox } from '@e2b/code-interpreter'
112+
import { Sandbox } from 'e2b'
113113

114114
const paginator = Sandbox.listSnapshots()
115115

@@ -120,7 +120,7 @@ while (paginator.hasNext) {
120120
}
121121
```
122122
```python Python
123-
from e2b_code_interpreter import Sandbox
123+
from e2b import Sandbox
124124

125125
paginator = Sandbox.list_snapshots()
126126

@@ -137,13 +137,13 @@ You can filter snapshots created from a specific sandbox.
137137

138138
<CodeGroup>
139139
```js JavaScript & TypeScript
140-
import { Sandbox } from '@e2b/code-interpreter'
140+
import { Sandbox } from 'e2b'
141141

142142
const paginator = Sandbox.listSnapshots({ sandboxId: 'your-sandbox-id' })
143143
const snapshots = await paginator.nextItems()
144144
```
145145
```python Python
146-
from e2b_code_interpreter import Sandbox
146+
from e2b import Sandbox
147147

148148
paginator = Sandbox.list_snapshots(sandbox_id="your-sandbox-id")
149149
snapshots = paginator.next_items()
@@ -154,13 +154,13 @@ snapshots = paginator.next_items()
154154

155155
<CodeGroup>
156156
```js JavaScript & TypeScript
157-
import { Sandbox } from '@e2b/code-interpreter'
157+
import { Sandbox } from 'e2b'
158158

159159
// Returns true if deleted, false if the snapshot was not found
160160
const deleted = await Sandbox.deleteSnapshot(snapshot.snapshotId)
161161
```
162162
```python Python
163-
from e2b_code_interpreter import Sandbox
163+
from e2b import Sandbox
164164

165165
Sandbox.delete_snapshot(snapshot.snapshot_id)
166166
```

0 commit comments

Comments
 (0)