Skip to content

Commit a82b0ee

Browse files
beran-tclaude
andcommitted
fix: correct code example in sandbox overview
- Use Sandbox.create() instead of Sandbox() in Python - Use expression '1 + 1' instead of print() to match result.text usage Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 2804eb2 commit a82b0ee

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/sandbox.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ A sandbox is an isolated cloud VM that starts in **~100ms**. Each sandbox has it
1111
import { Sandbox } from '@e2b/code-interpreter'
1212

1313
const sbx = await Sandbox.create()
14-
const result = await sbx.runCode('print(1 + 1)')
14+
const result = await sbx.runCode('1 + 1')
1515
console.log(result.text) // 2
1616
await sbx.kill()
1717
```
1818
```python Python
1919
from e2b_code_interpreter import Sandbox
2020

21-
sbx = Sandbox()
22-
result = sbx.run_code('print(1 + 1)')
21+
sbx = Sandbox.create()
22+
result = sbx.run_code('1 + 1')
2323
print(result.text) # 2
2424
sbx.kill()
2525
```

0 commit comments

Comments
 (0)