e2b-code-interpreter

E2B Code Interpreter - Stateful code execution

MIT 149 个版本 Python <4.0,>=3.10
e2b <hello@e2b.dev>
安装
pip install e2b-code-interpreter
poetry add e2b-code-interpreter
pipenv install e2b-code-interpreter
conda install e2b-code-interpreter
描述

e2b logo

Last 1 month downloads for the Python SDK

What is E2B?

E2B is an open-source infrastructure that allows you run to AI-generated code in secure isolated sandboxes in the cloud. To start and control sandboxes, use our JavaScript SDK or Python SDK.

Run your first Sandbox

1. Install SDK

pip install e2b-code-interpreter

2. Get your E2B API key

  1. Sign up to E2B here.
  2. Get your API key here.
  3. Set environment variable with your API key.
E2B_API_KEY=e2b_***

3. Execute code with code interpreter inside Sandbox

from e2b_code_interpreter import Sandbox

with Sandbox.create() as sandbox:
    sandbox.run_code("x = 1")
    execution = sandbox.run_code("x+=1; x")
    print(execution.text)  # outputs 2

4. Check docs

Visit E2B documentation.

5. E2B cookbook

Visit our Cookbook to get inspired by examples with different LLMs and AI frameworks.

版本列表
2.8.1 2026-06-17
2.8.0 2026-06-06
2.7.0 2026-05-22
2.6.2 2026-04-30
2.6.1 2026-04-28
2.6.0 2026-03-23
2.5.0 2026-03-17
2.4.1 2025-11-26
2.4.0 2025-11-26
2.3.0 2025-10-31
2.2.1 2025-10-27
2.2.0 2025-10-16
2.1.1 2025-10-08
2.1.0 2025-10-03
2.0.0 2025-08-22
2.0.0rc0 2025-08-19
1.5.2 2025-07-07
1.5.1 2025-06-05
1.5.0 2025-05-05
1.3.4rc2 2025-04-23
1.3.4rc1 2025-04-17
1.2.1 2025-04-18
1.2.0 2025-03-26
1.2.2rc2 2025-03-17
1.2.1rc2 2025-03-10
1.2.1rc1 2025-03-10
1.2.0b5 2025-04-28
1.2.0b4 2025-04-17
1.2.0b3 2025-04-17
1.2.0b2 2025-04-04
1.2.0b1 2025-03-31
1.2.0b0 2025-01-24
1.1.1 2025-03-18
1.1.0 2025-03-13
1.0.5 2025-02-01
1.0.4 2025-01-21
1.0.3 2024-12-06
1.0.2 2024-11-27
1.0.1 2024-10-16
1.0.0 2024-10-16
1.0.4rc1 2025-03-10
1.0.4b0 2024-12-17
1.0.4a0 2024-12-17
0.0.10 2024-06-19
0.0.9 2024-06-11
0.0.8 2024-06-03
0.0.7 2024-05-23
0.0.6 2024-05-14
0.0.5 2024-05-02
0.0.4 2024-05-02
0.0.3 2024-04-05
0.0.2 2024-04-04
0.0.1 2024-04-03
0.0.9a1 2024-06-13
0.0.9a0 2024-06-08
0.0.8a1 2024-06-03
0.0.8a0 2024-06-03
0.0.1a2 2024-04-03
0.0.1a1 2024-04-03
0.0.1a0 2024-04-03
0.0.11b9 2024-08-21
0.0.11b8 2024-08-21
0.0.11b7 2024-08-21
0.0.11b6 2024-08-21
0.0.11b5 2024-08-21
0.0.11b47 2024-10-15
0.0.11b46 2024-10-14
0.0.11b45 2024-10-13
0.0.11b44 2024-10-12
0.0.11b43 2024-10-11
0.0.11b42 2024-10-08
0.0.11b41 2024-10-07
0.0.11b40 2024-10-05
0.0.11b4 2024-08-20
0.0.11b39 2024-10-05
0.0.11b38 2024-10-03
0.0.11b37 2024-10-02
0.0.11b36 2024-09-30
0.0.11b35 2024-09-30
0.0.11b34 2024-09-30
0.0.11b33 2024-09-26
0.0.11b32 2024-09-18
0.0.11b31 2024-09-17
0.0.11b30 2024-09-17
0.0.11b3 2024-08-20
0.0.11b29 2024-09-13
0.0.11b28 2024-09-12
0.0.11b27 2024-09-12
0.0.11b26 2024-09-10
0.0.11b25 2024-09-09
0.0.11b24 2024-09-06
0.0.11b23 2024-09-06
0.0.11b22 2024-09-05
0.0.11b21 2024-09-05
0.0.11b20 2024-09-05
0.0.11b2 2024-07-30
0.0.11b19 2024-09-04
0.0.11b18 2024-09-04
0.0.11b17 2024-09-04
0.0.11b16 2024-09-04
0.0.11b15 2024-08-28
0.0.11b14 2024-08-28
0.0.11b13 2024-08-28
0.0.11b12 2024-08-28
0.0.11b11 2024-08-27
0.0.11b10 2024-08-21
0.0.11b1 2024-07-30
0.0.11a9 2024-07-13
0.0.11a8 2024-07-13
0.0.11a7 2024-07-13
0.0.11a6 2024-07-13
0.0.11a5 2024-07-12
0.0.11a4 2024-07-11
0.0.11a39 2024-08-20
0.0.11a38 2024-08-20
0.0.11a37 2024-08-19
0.0.11a36 2024-08-19
0.0.11a35 2024-08-19
0.0.11a34 2024-08-16
0.0.11a33 2024-08-16
0.0.11a32 2024-08-15
0.0.11a31 2024-08-15
0.0.11a30 2024-08-13
0.0.11a3 2024-07-09
0.0.11a29 2024-08-02
0.0.11a28 2024-08-01
0.0.11a27 2024-08-01
0.0.11a26 2024-08-01
0.0.11a25 2024-07-31
0.0.11a24 2024-07-24
0.0.11a23 2024-07-23
0.0.11a22 2024-07-23
0.0.11a21 2024-07-22
0.0.11a20 2024-07-22
0.0.11a2 2024-07-03
0.0.11a19 2024-07-22
0.0.11a18 2024-07-22
0.0.11a17 2024-07-22
0.0.11a16 2024-07-17
0.0.11a15 2024-07-17
0.0.11a14 2024-07-17
0.0.11a13 2024-07-17
0.0.11a12 2024-07-16
0.0.11a11 2024-07-15
0.0.11a10 2024-07-14
0.0.11a1 2024-07-01
0.0.11a0 2024-06-30
0.0.10a1 2024-06-13
0.0.10a0 2024-06-13