e2b-code-interpreter 1.5.2__tar.gz → 2.0.0rc0__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.
@@ -1,8 +1,7 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: e2b-code-interpreter
3
- Version: 1.5.2
3
+ Version: 2.0.0rc0
4
4
  Summary: E2B Code Interpreter - Stateful code execution
5
- Home-page: https://e2b.dev/
6
5
  License: MIT
7
6
  Author: e2b
8
7
  Author-email: hello@e2b.dev
@@ -13,10 +12,12 @@ Classifier: Programming Language :: Python :: 3.9
13
12
  Classifier: Programming Language :: Python :: 3.10
14
13
  Classifier: Programming Language :: Python :: 3.11
15
14
  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 (>=1.5.4,<2.0.0)
17
+ Requires-Dist: e2b (>=2.0.0rc2,<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/
20
21
  Project-URL: Repository, https://github.com/e2b-dev/code-interpreter/tree/main/python
21
22
  Description-Content-Type: text/markdown
22
23
 
@@ -58,7 +59,7 @@ E2B_API_KEY=e2b_***
58
59
  ```py
59
60
  from e2b_code_interpreter import Sandbox
60
61
 
61
- with Sandbox() as sandbox:
62
+ with Sandbox.create() as sandbox:
62
63
  sandbox.run_code("x = 1")
63
64
  execution = sandbox.run_code("x+=1; x")
64
65
  print(execution.text) # outputs 2
@@ -36,7 +36,7 @@ E2B_API_KEY=e2b_***
36
36
  ```py
37
37
  from e2b_code_interpreter import Sandbox
38
38
 
39
- with Sandbox() as sandbox:
39
+ with Sandbox.create() as sandbox:
40
40
  sandbox.run_code("x = 1")
41
41
  execution = sandbox.run_code("x+=1; x")
42
42
  print(execution.text) # outputs 2
@@ -6,7 +6,6 @@ from httpx import AsyncClient
6
6
 
7
7
  from e2b import (
8
8
  AsyncSandbox as BaseAsyncSandbox,
9
- ConnectionConfig,
10
9
  InvalidArgumentException,
11
10
  )
12
11
 
@@ -189,7 +188,7 @@ class AsyncSandbox(BaseAsyncSandbox):
189
188
  )
190
189
 
191
190
  timeout = None if timeout == 0 else (timeout or DEFAULT_TIMEOUT)
192
- request_timeout = request_timeout or self._connection_config.request_timeout
191
+ request_timeout = request_timeout or self.connection_config.request_timeout
193
192
  context_id = context.id if context else None
194
193
 
195
194
  try:
@@ -254,7 +253,7 @@ class AsyncSandbox(BaseAsyncSandbox):
254
253
  response = await self._client.post(
255
254
  f"{self._jupyter_url}/contexts",
256
255
  json=data,
257
- timeout=request_timeout or self._connection_config.request_timeout,
256
+ timeout=request_timeout or self.connection_config.request_timeout,
258
257
  )
259
258
 
260
259
  err = await aextract_exception(response)
@@ -41,13 +41,13 @@ class Sandbox(BaseSandbox):
41
41
 
42
42
  Check docs [here](https://e2b.dev/docs).
43
43
 
44
- Use the `Sandbox()` to create a new sandbox.
44
+ Use the `Sandbox.create()` to create a new sandbox.
45
45
 
46
46
  Example:
47
47
  ```python
48
48
  from e2b_code_interpreter import Sandbox
49
49
 
50
- sandbox = Sandbox()
50
+ sandbox = Sandbox.create()
51
51
  ```
52
52
  """
53
53
 
@@ -185,7 +185,7 @@ class Sandbox(BaseSandbox):
185
185
  )
186
186
 
187
187
  timeout = None if timeout == 0 else (timeout or DEFAULT_TIMEOUT)
188
- request_timeout = request_timeout or self._connection_config.request_timeout
188
+ request_timeout = request_timeout or self.connection_config.request_timeout
189
189
  context_id = context.id if context else None
190
190
 
191
191
  try:
@@ -249,7 +249,7 @@ class Sandbox(BaseSandbox):
249
249
  response = self._client.post(
250
250
  f"{self._jupyter_url}/contexts",
251
251
  json=data,
252
- timeout=request_timeout or self._connection_config.request_timeout,
252
+ timeout=request_timeout or self.connection_config.request_timeout,
253
253
  )
254
254
 
255
255
  err = extract_exception(response)
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "e2b-code-interpreter"
3
- version = "1.5.2"
3
+ version = "2.0.0rc0"
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 = "^1.5.4"
17
+ e2b = "^2.0.0rc2"
18
18
 
19
19
  [tool.poetry.group.dev.dependencies]
20
20
  pytest = "^7.4.0"