e2b-code-interpreter 2.1.0__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.1.0 → e2b_code_interpreter-2.1.1}/PKG-INFO +1 -1
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/code_interpreter_async.py +10 -2
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/code_interpreter_sync.py +10 -2
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/pyproject.toml +1 -1
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/LICENSE +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/README.md +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/__init__.py +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/charts.py +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/constants.py +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/exceptions.py +0 -0
- {e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/models.py +0 -0
|
@@ -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,7 +205,7 @@ class AsyncSandbox(BaseAsyncSandbox):
|
|
|
201
205
|
"language": language,
|
|
202
206
|
"env_vars": envs,
|
|
203
207
|
},
|
|
204
|
-
headers=
|
|
208
|
+
headers=headers,
|
|
205
209
|
timeout=(request_timeout, timeout, request_timeout, request_timeout),
|
|
206
210
|
) as response:
|
|
207
211
|
err = await aextract_exception(response)
|
|
@@ -249,10 +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",
|
|
255
|
-
headers=
|
|
263
|
+
headers=headers,
|
|
256
264
|
json=data,
|
|
257
265
|
timeout=request_timeout or self.connection_config.request_timeout,
|
|
258
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,7 +202,7 @@ class Sandbox(BaseSandbox):
|
|
|
198
202
|
"language": language,
|
|
199
203
|
"env_vars": envs,
|
|
200
204
|
},
|
|
201
|
-
headers=
|
|
205
|
+
headers=headers,
|
|
202
206
|
timeout=(request_timeout, timeout, request_timeout, request_timeout),
|
|
203
207
|
) as response:
|
|
204
208
|
err = extract_exception(response)
|
|
@@ -246,11 +250,15 @@ class Sandbox(BaseSandbox):
|
|
|
246
250
|
if cwd:
|
|
247
251
|
data["cwd"] = cwd
|
|
248
252
|
|
|
253
|
+
headers: Dict[str, str] = {}
|
|
254
|
+
if self._envd_access_token:
|
|
255
|
+
headers = {"X-Access-Token": self._envd_access_token}
|
|
256
|
+
|
|
249
257
|
try:
|
|
250
258
|
response = self._client.post(
|
|
251
259
|
f"{self._jupyter_url}/contexts",
|
|
252
260
|
json=data,
|
|
253
|
-
headers=
|
|
261
|
+
headers=headers,
|
|
254
262
|
timeout=request_timeout or self.connection_config.request_timeout,
|
|
255
263
|
)
|
|
256
264
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{e2b_code_interpreter-2.1.0 → e2b_code_interpreter-2.1.1}/e2b_code_interpreter/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|