Files
e2b-dev--e2b/packages/python-sdk
Mish Ushakov 1bdf809e8b Make possible to pass custom headers in the SDKs (#656)
This feature allows passing custom headers in the Python and JS SDK. One
use-case for it currently is passing custom authorization (Supabase)
headers with the request.
2025-04-04 00:08:12 +01:00
..
2024-09-25 17:17:08 -07:00
2024-11-26 10:34:04 -08:00
2025-03-25 15:53:42 -07:00
2024-10-16 01:41:40 -07:00
2025-03-26 18:15:28 +00:00
2025-02-05 20:31:50 -08:00
2025-03-26 18:15:28 +00:00
2024-11-22 14:45:39 -08:00

e2b logo

Last 1 month downloads for the Python SDK

What is E2B?

E2B is an open-source infrastructure that allows you to run 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() 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.