e2b-code-interpreter 2.10.3__tar.gz → 2.10.5__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,13 +1,13 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: e2b-code-interpreter
3
- Version: 2.10.3
3
+ Version: 2.10.5
4
4
  Summary: E2B Code Interpreter - Stateful code execution
5
5
  Author: e2b
6
6
  Author-email: e2b <hello@e2b.dev>
7
7
  License-Expression: MIT
8
8
  Requires-Dist: httpx>=0.20.0,<1.0.0
9
9
  Requires-Dist: attrs>=21.3.0
10
- Requires-Dist: e2b>=2.53.0,<3.0.0
10
+ Requires-Dist: e2b>=2.55.1,<3.0.0
11
11
  Requires-Python: >=3.10
12
12
  Project-URL: Homepage, https://e2b.dev/?utm_source=pypi&utm_medium=referral&utm_campaign=package_homepage&utm_content=e2b-code-interpreter
13
13
  Project-URL: Repository, https://github.com/e2b-dev/e2b/tree/main/packages/code-interpreter-python
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  import httpx
3
3
 
4
- from typing import cast, Optional, Dict, overload, Union, List
4
+ from typing import Optional, Dict, overload, Union, List
5
5
  from httpx import AsyncClient
6
6
 
7
7
  from e2b import (
@@ -61,12 +61,9 @@ class AsyncSandbox(BaseAsyncSandbox):
61
61
 
62
62
  @property
63
63
  def _jupyter_url(self) -> str:
64
- # Honors the `sandbox_url` option and the `E2B_SANDBOX_URL` environment
65
- # variable, same as the base SDK does for envd requests.
66
- sandbox_url = cast(Optional[str], self.connection_config._sandbox_url)
67
- if sandbox_url:
68
- return sandbox_url
69
- return f"{'http' if self.connection_config.debug else 'https'}://{self.get_host(JUPYTER_PORT)}"
64
+ return self.connection_config.get_sandbox_url(
65
+ self.sandbox_id, self.sandbox_domain, port=JUPYTER_PORT
66
+ )
70
67
 
71
68
  @property
72
69
  def _client(self) -> AsyncClient:
@@ -1,7 +1,7 @@
1
1
  import logging
2
2
  import httpx
3
3
 
4
- from typing import cast, Optional, Dict, overload, Union, List
4
+ from typing import Optional, Dict, overload, Union, List
5
5
  from httpx import Client
6
6
  from e2b import Sandbox as BaseSandbox, InvalidArgumentException
7
7
  from e2b.api.client_sync import get_transport
@@ -58,12 +58,9 @@ class Sandbox(BaseSandbox):
58
58
 
59
59
  @property
60
60
  def _jupyter_url(self) -> str:
61
- # Honors the `sandbox_url` option and the `E2B_SANDBOX_URL` environment
62
- # variable, same as the base SDK does for envd requests.
63
- sandbox_url = cast(Optional[str], self.connection_config._sandbox_url)
64
- if sandbox_url:
65
- return sandbox_url
66
- return f"{'http' if self.connection_config.debug else 'https'}://{self.get_host(JUPYTER_PORT)}"
61
+ return self.connection_config.get_sandbox_url(
62
+ self.sandbox_id, self.sandbox_domain, port=JUPYTER_PORT
63
+ )
67
64
 
68
65
  @property
69
66
  def _client(self) -> Client:
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "e2b-code-interpreter"
3
- version = "2.10.3"
3
+ version = "2.10.5"
4
4
  description = "E2B Code Interpreter - Stateful code execution"
5
5
  authors = [{ name = "e2b", email = "hello@e2b.dev" }]
6
6
  license = "MIT"
@@ -9,7 +9,7 @@ requires-python = ">=3.10"
9
9
  dependencies = [
10
10
  "httpx>=0.20.0,<1.0.0",
11
11
  "attrs>=21.3.0",
12
- "e2b>=2.53.0,<3.0.0",
12
+ "e2b>=2.55.1,<3.0.0",
13
13
  ]
14
14
 
15
15
  [project.urls]