E2B Code Interpreter - Stateful code execution
Project description
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
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for e2b_code_interpreter-1.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0c061e41315d21514affe78f80052be335b687204e669dd7ca852b59eeaaea2 |
|
MD5 | 482793ded522fa9184fbe1f33234da9e |
|
BLAKE2b-256 | 9a6767441008c3a299ab2d5185b96ba054aa888454e31ce3c2c08c2ef368b4b0 |
Close
Hashes for e2b_code_interpreter-1.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e27c40174ba7daac4942388611a73e1ac58300227f0ba6c0555ee54507d4944c |
|
MD5 | 9ae0bef0d0215a4e12e03396597ed204 |
|
BLAKE2b-256 | 91f14950f1b68be3748add48240efc83a1514c099e55c340bf27c332d0134f1e |