e2b-code-interpreter 2.0.0rc0__tar.gz → 2.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/PKG-INFO +4 -5
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/code_interpreter_async.py +10 -1
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/code_interpreter_sync.py +10 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/exceptions.py +2 -2
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/pyproject.toml +8 -3
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/LICENSE +0 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/README.md +0 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/__init__.py +0 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/charts.py +0 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/constants.py +0 -0
- {e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/models.py +0 -0
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
2
|
Name: e2b-code-interpreter
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.1.1
|
|
4
4
|
Summary: E2B Code Interpreter - Stateful code execution
|
|
5
|
+
Home-page: https://e2b.dev/
|
|
5
6
|
License: MIT
|
|
6
7
|
Author: e2b
|
|
7
8
|
Author-email: hello@e2b.dev
|
|
@@ -12,12 +13,10 @@ Classifier: Programming Language :: Python :: 3.9
|
|
|
12
13
|
Classifier: Programming Language :: Python :: 3.10
|
|
13
14
|
Classifier: Programming Language :: Python :: 3.11
|
|
14
15
|
Classifier: Programming Language :: Python :: 3.12
|
|
15
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
16
16
|
Requires-Dist: attrs (>=21.3.0)
|
|
17
|
-
Requires-Dist: e2b (>=2.
|
|
17
|
+
Requires-Dist: e2b (>=2.2.1,<3.0.0)
|
|
18
18
|
Requires-Dist: httpx (>=0.20.0,<1.0.0)
|
|
19
19
|
Project-URL: Bug Tracker, https://github.com/e2b-dev/code-interpreter/issues
|
|
20
|
-
Project-URL: Homepage, https://e2b.dev/
|
|
21
20
|
Project-URL: Repository, https://github.com/e2b-dev/code-interpreter/tree/main/python
|
|
22
21
|
Description-Content-Type: text/markdown
|
|
23
22
|
|
|
@@ -191,6 +191,10 @@ class AsyncSandbox(BaseAsyncSandbox):
|
|
|
191
191
|
request_timeout = request_timeout or self.connection_config.request_timeout
|
|
192
192
|
context_id = context.id if context else None
|
|
193
193
|
|
|
194
|
+
headers: Dict[str, str] = {}
|
|
195
|
+
if self._envd_access_token:
|
|
196
|
+
headers = {"X-Access-Token": self._envd_access_token}
|
|
197
|
+
|
|
194
198
|
try:
|
|
195
199
|
async with self._client.stream(
|
|
196
200
|
"POST",
|
|
@@ -201,9 +205,9 @@ class AsyncSandbox(BaseAsyncSandbox):
|
|
|
201
205
|
"language": language,
|
|
202
206
|
"env_vars": envs,
|
|
203
207
|
},
|
|
208
|
+
headers=headers,
|
|
204
209
|
timeout=(request_timeout, timeout, request_timeout, request_timeout),
|
|
205
210
|
) as response:
|
|
206
|
-
|
|
207
211
|
err = await aextract_exception(response)
|
|
208
212
|
if err:
|
|
209
213
|
raise err
|
|
@@ -249,9 +253,14 @@ class AsyncSandbox(BaseAsyncSandbox):
|
|
|
249
253
|
if cwd:
|
|
250
254
|
data["cwd"] = cwd
|
|
251
255
|
|
|
256
|
+
headers: Dict[str, str] = {}
|
|
257
|
+
if self._envd_access_token:
|
|
258
|
+
headers = {"X-Access-Token": self._envd_access_token}
|
|
259
|
+
|
|
252
260
|
try:
|
|
253
261
|
response = await self._client.post(
|
|
254
262
|
f"{self._jupyter_url}/contexts",
|
|
263
|
+
headers=headers,
|
|
255
264
|
json=data,
|
|
256
265
|
timeout=request_timeout or self.connection_config.request_timeout,
|
|
257
266
|
)
|
|
@@ -188,6 +188,10 @@ class Sandbox(BaseSandbox):
|
|
|
188
188
|
request_timeout = request_timeout or self.connection_config.request_timeout
|
|
189
189
|
context_id = context.id if context else None
|
|
190
190
|
|
|
191
|
+
headers: Dict[str, str] = {}
|
|
192
|
+
if self._envd_access_token:
|
|
193
|
+
headers = {"X-Access-Token": self._envd_access_token}
|
|
194
|
+
|
|
191
195
|
try:
|
|
192
196
|
with self._client.stream(
|
|
193
197
|
"POST",
|
|
@@ -198,6 +202,7 @@ class Sandbox(BaseSandbox):
|
|
|
198
202
|
"language": language,
|
|
199
203
|
"env_vars": envs,
|
|
200
204
|
},
|
|
205
|
+
headers=headers,
|
|
201
206
|
timeout=(request_timeout, timeout, request_timeout, request_timeout),
|
|
202
207
|
) as response:
|
|
203
208
|
err = extract_exception(response)
|
|
@@ -245,10 +250,15 @@ class Sandbox(BaseSandbox):
|
|
|
245
250
|
if cwd:
|
|
246
251
|
data["cwd"] = cwd
|
|
247
252
|
|
|
253
|
+
headers: Dict[str, str] = {}
|
|
254
|
+
if self._envd_access_token:
|
|
255
|
+
headers = {"X-Access-Token": self._envd_access_token}
|
|
256
|
+
|
|
248
257
|
try:
|
|
249
258
|
response = self._client.post(
|
|
250
259
|
f"{self._jupyter_url}/contexts",
|
|
251
260
|
json=data,
|
|
261
|
+
headers=headers,
|
|
252
262
|
timeout=request_timeout or self.connection_config.request_timeout,
|
|
253
263
|
)
|
|
254
264
|
|
{e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/exceptions.py
RENAMED
|
@@ -3,11 +3,11 @@ from e2b import TimeoutException
|
|
|
3
3
|
|
|
4
4
|
def format_request_timeout_error() -> Exception:
|
|
5
5
|
return TimeoutException(
|
|
6
|
-
|
|
6
|
+
"Request timed out — the 'request_timeout' option can be used to increase this timeout",
|
|
7
7
|
)
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def format_execution_timeout_error() -> Exception:
|
|
11
11
|
return TimeoutException(
|
|
12
|
-
|
|
12
|
+
"Execution timed out — the 'timeout' option can be used to increase this timeout",
|
|
13
13
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "e2b-code-interpreter"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.1.1"
|
|
4
4
|
description = "E2B Code Interpreter - Stateful code execution"
|
|
5
5
|
authors = ["e2b <hello@e2b.dev>"]
|
|
6
6
|
license = "MIT"
|
|
@@ -14,7 +14,7 @@ python = "^3.9"
|
|
|
14
14
|
|
|
15
15
|
httpx = ">=0.20.0, <1.0.0"
|
|
16
16
|
attrs = ">=21.3.0"
|
|
17
|
-
e2b = "^2.
|
|
17
|
+
e2b = "^2.2.1"
|
|
18
18
|
|
|
19
19
|
[tool.poetry.group.dev.dependencies]
|
|
20
20
|
pytest = "^7.4.0"
|
|
@@ -22,8 +22,10 @@ python-dotenv = "^1.0.0"
|
|
|
22
22
|
pytest-dotenv = "^0.5.2"
|
|
23
23
|
pytest-asyncio = "^0.23.7"
|
|
24
24
|
pytest-xdist = "^3.6.1"
|
|
25
|
-
black = "23.12.1"
|
|
26
25
|
pydoc-markdown = "^4.8.2"
|
|
26
|
+
matplotlib = "^3.8.0"
|
|
27
|
+
ruff = "^0.11.12"
|
|
28
|
+
|
|
27
29
|
|
|
28
30
|
[build-system]
|
|
29
31
|
requires = ["poetry-core"]
|
|
@@ -31,3 +33,6 @@ build-backend = "poetry.core.masonry.api"
|
|
|
31
33
|
|
|
32
34
|
[tool.poetry.urls]
|
|
33
35
|
"Bug Tracker" = "https://github.com/e2b-dev/code-interpreter/issues"
|
|
36
|
+
|
|
37
|
+
[tool.ruff.lint]
|
|
38
|
+
ignore = ["F401", "F403"]
|
|
File without changes
|
|
File without changes
|
{e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{e2b_code_interpreter-2.0.0rc0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/constants.py
RENAMED
|
File without changes
|
|
File without changes
|