e2b-code-interpreter


Namee2b-code-interpreter JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://e2b.dev/
SummaryE2B Code Interpreter - Stateful code execution
upload_time2025-02-01 03:24:16
maintainerNone
docs_urlNone
authore2b
requires_python<4.0,>=3.8
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p align="center">
  <img width="100" src="https://raw.githubusercontent.com/e2b-dev/E2B/refs/heads/main/readme-assets/logo-circle.png" alt="e2b logo">
</p>

<h4 align="center">
  <a href="https://pypi.org/project/e2b/">
    <img alt="Last 1 month downloads for the Python SDK" loading="lazy" width="200" height="20" decoding="async" data-nimg="1"
    style="color:transparent;width:auto;height:100%" src="https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads">
  </a>  
</h4>

<!---
<img width="100%" src="/readme-assets/preview.png" alt="Cover image">
--->
## What is E2B?
[E2B](https://www.e2b.dev/) 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](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter).

## Run your first Sandbox

### 1. Install SDK

```
pip install e2b-code-interpreter
```

### 2. Get your E2B API key
1. Sign up to E2B [here](https://e2b.dev).
2. Get your API key [here](https://e2b.dev/dashboard?tab=keys).
3. Set environment variable with your API key.
```
E2B_API_KEY=e2b_***
```     

### 3. Execute code with code interpreter inside Sandbox

```py
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](https://e2b.dev/docs).

### 5. E2B cookbook
Visit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.

            

Raw data

            {
    "_id": null,
    "home_page": "https://e2b.dev/",
    "name": "e2b-code-interpreter",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "e2b",
    "author_email": "hello@e2b.dev",
    "download_url": "https://files.pythonhosted.org/packages/09/41/fcfcea50aec37f11619f870219f763cb587bfbbcbdb4e1ca64a254c3d333/e2b_code_interpreter-1.0.5.tar.gz",
    "platform": null,
    "description": "<p align=\"center\">\n  <img width=\"100\" src=\"https://raw.githubusercontent.com/e2b-dev/E2B/refs/heads/main/readme-assets/logo-circle.png\" alt=\"e2b logo\">\n</p>\n\n<h4 align=\"center\">\n  <a href=\"https://pypi.org/project/e2b/\">\n    <img alt=\"Last 1 month downloads for the Python SDK\" loading=\"lazy\" width=\"200\" height=\"20\" decoding=\"async\" data-nimg=\"1\"\n    style=\"color:transparent;width:auto;height:100%\" src=\"https://img.shields.io/pypi/dm/e2b?label=PyPI%20Downloads\">\n  </a>  \n</h4>\n\n<!---\n<img width=\"100%\" src=\"/readme-assets/preview.png\" alt=\"Cover image\">\n--->\n## What is E2B?\n[E2B](https://www.e2b.dev/) 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](https://www.npmjs.com/package/@e2b/code-interpreter) or [Python SDK](https://pypi.org/project/e2b_code_interpreter).\n\n## Run your first Sandbox\n\n### 1. Install SDK\n\n```\npip install e2b-code-interpreter\n```\n\n### 2. Get your E2B API key\n1. Sign up to E2B [here](https://e2b.dev).\n2. Get your API key [here](https://e2b.dev/dashboard?tab=keys).\n3. Set environment variable with your API key.\n```\nE2B_API_KEY=e2b_***\n```     \n\n### 3. Execute code with code interpreter inside Sandbox\n\n```py\nfrom e2b_code_interpreter import Sandbox\n\nwith Sandbox() as sandbox:\n    sandbox.run_code(\"x = 1\")\n    execution = sandbox.run_code(\"x+=1; x\")\n    print(execution.text)  # outputs 2\n```\n\n### 4. Check docs\nVisit [E2B documentation](https://e2b.dev/docs).\n\n### 5. E2B cookbook\nVisit our [Cookbook](https://github.com/e2b-dev/e2b-cookbook/tree/main) to get inspired by examples with different LLMs and AI frameworks.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "E2B Code Interpreter - Stateful code execution",
    "version": "1.0.5",
    "project_urls": {
        "Bug Tracker": "https://github.com/e2b-dev/code-interpreter/issues",
        "Homepage": "https://e2b.dev/",
        "Repository": "https://github.com/e2b-dev/code-interpreter/tree/main/python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "651c9be138efdf3048f24d96935b44124f2812137de87c399ec225bddf3e25c8",
                "md5": "e00da7fdf4f631fa8e2acac95afa338b",
                "sha256": "4c7814e9eabba58097bf5e4019d327b3a82fab0813eafca4311b29ca6ea0639d"
            },
            "downloads": -1,
            "filename": "e2b_code_interpreter-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e00da7fdf4f631fa8e2acac95afa338b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 12017,
            "upload_time": "2025-02-01T03:24:14",
            "upload_time_iso_8601": "2025-02-01T03:24:14.895702Z",
            "url": "https://files.pythonhosted.org/packages/65/1c/9be138efdf3048f24d96935b44124f2812137de87c399ec225bddf3e25c8/e2b_code_interpreter-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0941fcfcea50aec37f11619f870219f763cb587bfbbcbdb4e1ca64a254c3d333",
                "md5": "0aaf6343faa5f0f7748fa2952d4a4f75",
                "sha256": "e7f70b039e6a70f8e592f90f806d696dc1056919414daabeb89e86c9b650a987"
            },
            "downloads": -1,
            "filename": "e2b_code_interpreter-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "0aaf6343faa5f0f7748fa2952d4a4f75",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 9239,
            "upload_time": "2025-02-01T03:24:16",
            "upload_time_iso_8601": "2025-02-01T03:24:16.756376Z",
            "url": "https://files.pythonhosted.org/packages/09/41/fcfcea50aec37f11619f870219f763cb587bfbbcbdb4e1ca64a254c3d333/e2b_code_interpreter-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-01 03:24:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "e2b-dev",
    "github_project": "code-interpreter",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "e2b-code-interpreter"
}
        
e2b
Elapsed time: 1.86491s