Registry / devops / e2b-code-interpreter

e2b-code-interpreter

JSON →
library2.4.1pypypi✓ verified 36d ago

Secure cloud sandboxes for executing AI-generated code. Two packages: e2b-code-interpreter (Jupyter/stateful code execution) and e2b (core sandbox SDK). v0.x is fully deprecated — all versions below 1.0 show deprecation warnings and the API is incompatible with v1.x.

devopsllm-agents
Install & Compatibility
Where this runs
tested against v2.8.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
glibc
py 3.10
8/10 runs
8/10 runs
py 3.11
8/10 runs
8/10 runs
py 3.12
8/10 runs
8/10 runs
py 3.13
8/10 runs
8/10 runs
py 3.9
8/10 runs
8/10 runs
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CodeInterpreter class was the v0.x entry point. Removed in v1.0. All v0.x code using CodeInterpreter() breaks.

from e2b_code_interpreter import Sandbox

Use e2b.Sandbox for general-purpose sandboxes without Jupyter kernel. Use e2b_code_interpreter.Sandbox for stateful code execution with output capture.

from e2b import Sandbox

Stateful code execution in a secure cloud sandbox. Requires E2B_API_KEY environment variable.

from e2b_code_interpreter import Sandbox with Sandbox() as sandbox: sandbox.run_code("x = 1") execution = sandbox.run_code("x += 1; x") print(execution.text) # outputs 2
e2b --version
Debug
Known footguns
breakingCodeInterpreter class removed in v1.0. All v0.x code using CodeInterpreter() or from e2b_code_interpreter import CodeInterpreter fails with ImportError.
breakingGlobal cwd option removed from Sandbox constructor in v1.0. Setting cwd at sandbox creation no longer works.
breakingSandbox.list() output structure changed in v1.0. Code parsing the old list format breaks silently or raises KeyError.
deprecatede2b package (core SDK) v0.x is fully deprecated. All PyPI releases below 1.0 display deprecation warnings at import time.
gotchaSandboxes are billed by runtime duration, not by number of calls. Long-running agents with persistent sandboxes accumulate cost even when idle.
gotchaexecution.text is None if the code produces no output. Accessing .text without checking causes NoneType errors downstream.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
17 hits · last 30 days
claudebot
5
bytedance
4
ahrefsbot
3
amazonbot
3
commoncrawl
1
Resources