scalebox-sdk 0.1.11__py3-none-any.whl → 0.1.12__py3-none-any.whl

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.
scalebox/__init__.py CHANGED
@@ -9,7 +9,7 @@ A multi-language code execution sandbox with support for:
9
9
  - Real-time callbacks and monitoring
10
10
  """
11
11
 
12
- __version__ = "0.1.11"
12
+ __version__ = "0.1.12"
13
13
  __author__ = "ScaleBox Team"
14
14
  __email__ = "dev@scalebox.dev"
15
15
 
@@ -205,9 +205,9 @@ class AsyncSandbox(BaseAsyncSandbox):
205
205
  )
206
206
 
207
207
  # Set headers
208
- headers = {
209
- "Authorization": "Bearer root",
210
- }
208
+ # headers = {
209
+ # "Authorization": "Bearer root",
210
+ # }
211
211
 
212
212
  try:
213
213
  # Create client and execute request
@@ -227,7 +227,7 @@ class AsyncSandbox(BaseAsyncSandbox):
227
227
  # Execute request and get response stream
228
228
  responses = client.execute(
229
229
  req=request,
230
- extra_headers=headers,
230
+ extra_headers=self.connection_config.headers,
231
231
  timeout_seconds=request_timeout,
232
232
  )
233
233
 
@@ -298,9 +298,9 @@ class AsyncSandbox(BaseAsyncSandbox):
298
298
  http_client=self._session,
299
299
  base_url=self.envd_api_url,
300
300
  )
301
- headers = {
302
- "Authorization": "Bearer root",
303
- }
301
+ # headers = {
302
+ # "Authorization": "Bearer root",
303
+ # }
304
304
 
305
305
  # Build request
306
306
  request = api_pb2.CreateContextRequest(
@@ -311,7 +311,7 @@ class AsyncSandbox(BaseAsyncSandbox):
311
311
  # Execute request and get response stream
312
312
  response = await client.create_context(
313
313
  req=request,
314
- extra_headers=headers,
314
+ extra_headers=self.connection_config.headers,
315
315
  )
316
316
  return Context.from_json(
317
317
  {
@@ -361,9 +361,9 @@ class AsyncSandbox(BaseAsyncSandbox):
361
361
  base_url=self.envd_api_url,
362
362
  http_client=self._session,
363
363
  )
364
- headers = {
365
- "Authorization": "Bearer root",
366
- }
367
- await client.destroy_context(destroy_context_request, extra_headers=headers)
364
+ # headers = {
365
+ # "Authorization": "Bearer root",
366
+ # }
367
+ await client.destroy_context(destroy_context_request,extra_headers=self.connection_config.headers)
368
368
  except Exception as e:
369
369
  logger.warning(f"Failed to destroy context {context.id}: {e}")
@@ -199,13 +199,13 @@ class Sandbox(BaseSandbox):
199
199
 
200
200
  # Execute code via gRPC
201
201
  execution = Execution()
202
- headers = {
203
- "Authorization": "Bearer root",
204
- }
202
+ # headers = {
203
+ # "Authorization": "Bearer root",
204
+ # }
205
205
  response_stream = client.execute(
206
206
  execute_request,
207
207
  timeout_seconds=deadline - time.time(),
208
- extra_headers=headers,
208
+ extra_headers=self.connection_config.headers,
209
209
  )
210
210
 
211
211
  # Process stream responses
@@ -263,9 +263,9 @@ class Sandbox(BaseSandbox):
263
263
  base_url=self.envd_api_url,
264
264
  http_client=self._urllib3_pool,
265
265
  )
266
- headers = {
267
- "Authorization": "Bearer root",
268
- }
266
+ # headers = {
267
+ # "Authorization": "Bearer root",
268
+ # }
269
269
  # Create context via gRPC
270
270
  response = client.create_context(
271
271
  create_context_request,
@@ -308,10 +308,10 @@ class Sandbox(BaseSandbox):
308
308
  base_url=self.envd_api_url,
309
309
  http_client=self._urllib3_pool,
310
310
  )
311
- headers = {
312
- "Authorization": "Bearer root",
313
- }
314
- client.destroy_context(destroy_context_request, extra_headers=headers)
311
+ # headers = {
312
+ # "Authorization": "Bearer root",
313
+ # }
314
+ client.destroy_context(destroy_context_request,extra_headers=self.connection_config.headers)
315
315
 
316
316
  except Exception as e:
317
317
  logger.warning(f"Failed to destroy context {context.id}: {e}")
@@ -690,7 +690,7 @@ class ProcessClient:
690
690
  extra_headers: HeaderInput | None = None,
691
691
  timeout_seconds: float | None = None,
692
692
  ) -> Iterator[api_pb2.ConnectResponse]:
693
- stream_output = self.call_connect(req, extra_headers)
693
+ stream_output = self.call_connect(req, extra_headers,timeout_seconds)
694
694
  err = stream_output.error()
695
695
  if err is not None:
696
696
  raise err
@@ -725,7 +725,7 @@ class ProcessClient:
725
725
  extra_headers: HeaderInput | None = None,
726
726
  timeout_seconds: float | None = None,
727
727
  ) -> Iterator[api_pb2.StartResponse]:
728
- stream_output = self.call_start(req, extra_headers)
728
+ stream_output = self.call_start(req, extra_headers,timeout_seconds)
729
729
  err = stream_output.error()
730
730
  if err is not None:
731
731
  raise err
@@ -943,7 +943,7 @@ class AsyncProcessClient:
943
943
  extra_headers: HeaderInput | None = None,
944
944
  timeout_seconds: float | None = None,
945
945
  ) -> AsyncIterator[api_pb2.StartResponse]:
946
- stream_output = await self.call_start(req, extra_headers)
946
+ stream_output = await self.call_start(req, extra_headers,timeout_seconds)
947
947
  err = stream_output.error()
948
948
  if err is not None:
949
949
  raise err
@@ -335,7 +335,7 @@ class Sandbox(SandboxSetup, SandboxApi):
335
335
  :param timeout: Timeout for the sandbox in **seconds**, default to 300 seconds. Maximum time a sandbox can be kept alive is 24 hours (86_400 seconds) for Pro users and 1 hour (3_600 seconds) for Hobby users.
336
336
  :param metadata: Custom metadata for the sandbox
337
337
  :param envs: Custom environment variables for the sandbox
338
- :param api_key: E2B API Key to use for authentication, defaults to `E2B_API_KEY` environment variable
338
+ :param api_key: scalebox API Key to use for authentication, defaults to `CSX_API_KEY` environment variable
339
339
  :param request_timeout: Timeout for the request in **seconds**
340
340
  :param proxy: Proxy to use for the request and for the **requests made to the returned sandbox**
341
341
  :param secure: Envd is secured with access token and cannot be used without it
scalebox/version.py CHANGED
@@ -2,8 +2,8 @@
2
2
  Version information for ScaleBox Python SDK
3
3
  """
4
4
 
5
- __version__ = "0.1.11"
6
- __version_info__ = (0, 1, 11)
5
+ __version__ = "0.1.12"
6
+ __version_info__ = (0, 1, 12)
7
7
 
8
8
 
9
9
  def get_version() -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: scalebox-sdk
3
- Version: 0.1.11
3
+ Version: 0.1.12
4
4
  Summary: ScaleBox Python SDK - A multi-language code execution sandbox with Python, R, Node.js, Deno/TypeScript, Java, and Bash support
5
5
  Author-email: ScaleBox Team <dev@scalebox.dev>
6
6
  Maintainer-email: ScaleBox Team <dev@scalebox.dev>
@@ -1,9 +1,9 @@
1
- scalebox/__init__.py,sha256=OWKzvmzm8m36xTNypLRv7-Fta2wqjtQ_gtI7V0P1qPo,1812
1
+ scalebox/__init__.py,sha256=k0fyxyWVf6JtK-EGrkxs1lq6EALxxvxqqJzeBOgjnLI,1812
2
2
  scalebox/cli.py,sha256=HWIyGuhbP1WZm839CwTysauL78xMBOoatFychxzloxQ,3904
3
3
  scalebox/connection_config.py,sha256=J49-3tYaaoRDpa1l2dbnW3T8XmLrqEZBPXlraFvPp7I,2563
4
4
  scalebox/exceptions.py,sha256=10R9VXfvgO4XJJnxyzyrzkxliyeEBX0ZC36izXa8R5k,2053
5
5
  scalebox/requirements.txt,sha256=LEYsk2VzoxKR-V44Y6qJuJ3vKdTYS79f1Gv1Ajleifo,567
6
- scalebox/version.py,sha256=DS1o7tkw8OIH5KgL5kyKrIq-nziWl6nVuHtDNqDEGdQ,323
6
+ scalebox/version.py,sha256=LvB2Trgw8VhS06NUNn-SCUha-yKhVaeaanbx972aVSw,323
7
7
  scalebox/api/__init__.py,sha256=4Ci1HcIcKfSdloTw1BNwneudeqo1yC_MUZgwGdl9Mb8,4167
8
8
  scalebox/api/metadata.py,sha256=lg5ekfnFZYZoCoJxIPo961HEGVg_rLLRJBbw4ZApM_Y,512
9
9
  scalebox/api/client/__init__.py,sha256=0s784iDWjy52HOxrCdQVVeF8Fqrc9gzh1cLpMd9sOA8,150
@@ -71,8 +71,8 @@ scalebox/client/client.py,sha256=lPh2y8788bkYH_re9CxfMTO5reOtKyfzFhJ4vMtShPc,341
71
71
  scalebox/client/requirements.txt,sha256=wKvAVEljSzYT7t1PFWlsWHR9I47sAYjx97xU51NvAPw,94
72
72
  scalebox/code_interpreter/__init__.py,sha256=DKvHYgCOofNzPCgxK9HRyVpb8l1F1Uc2_DUL9BkcsSs,238
73
73
  scalebox/code_interpreter/charts.py,sha256=tYo53XlaWyjsMRb5tG32PaeGapaG0GQW3826wuXARfo,5511
74
- scalebox/code_interpreter/code_interpreter_async.py,sha256=RPzNAqQ7qIINnOJOm5X9BUb-_uy-ow92gNJqmHCXZSg,12891
75
- scalebox/code_interpreter/code_interpreter_sync.py,sha256=_CLIWD5eIML5m6mSkeaOAT1zMnwDrxu7APkDH_5LAmE,11407
74
+ scalebox/code_interpreter/code_interpreter_async.py,sha256=2pzqUNcM-Y46GoBI9phMDTGI7_pXYql9LIF8FMRWpsU,12977
75
+ scalebox/code_interpreter/code_interpreter_sync.py,sha256=AKR3WL-OV92z0GuNxXzTO6yEjfG3zSJOXCiuHkqhGOo,11470
76
76
  scalebox/code_interpreter/constants.py,sha256=MmEu7Uw2rjIZAayX9gQSC-iFmUaaijNSZ0ADnL1L_EM,81
77
77
  scalebox/code_interpreter/exceptions.py,sha256=9YfZk6EMa_RtfZ8K-BHvbRr2lcFRl6I5FY5WrA5gNqI,410
78
78
  scalebox/code_interpreter/models.py,sha256=so4_kPkouB9ET0MN2LkeTaPWXAXJNQIaz0IEYQMGtbs,14019
@@ -84,7 +84,7 @@ scalebox/generated/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
84
84
  scalebox/generated/api.py,sha256=SjK64GhgaWFMkktn4ekb5p8zBZXvA88GZ4legCT27Jo,1558
85
85
  scalebox/generated/api_pb2.py,sha256=n6SmPlDl4Fx6vQl3kiw6oXUb9eTLK07_WNHjoPOhtLI,25941
86
86
  scalebox/generated/api_pb2.pyi,sha256=qdmTkmfGyLevV8hmT67DDNK8DPKh0qkIGyObPD2bvZo,30158
87
- scalebox/generated/api_pb2_connect.py,sha256=J9uLK055fQO5KrS34RvNR_rp7UyXlYk4r8KC-zn7RyI,51767
87
+ scalebox/generated/api_pb2_connect.py,sha256=H3byAK_8f6G1gtNb2q-ceOFubux0XMOcwsJMvnpEhJw,51815
88
88
  scalebox/generated/rpc.py,sha256=-rbzeXz60kJFiik5tPOkQ6whK9ZOzJbHS-SDJ2w8cm0,1998
89
89
  scalebox/generated/versions.py,sha256=rBZ4T4ZxsrP7LVnWU-E9r_yN-x8qJXyR2q-EU-bFEMo,87
90
90
  scalebox/sandbox/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -108,7 +108,7 @@ scalebox/sandbox_async/commands/pty.py,sha256=vq3MrpS8JMrTTW-MNsApNEr0HWrJxTbn89
108
108
  scalebox/sandbox_async/filesystem/filesystem.py,sha256=Ao_Z7eUSn8FmmjRj23GD1N_JaWNR3Qa7dZemAFq2K80,19067
109
109
  scalebox/sandbox_async/filesystem/watch_handle.py,sha256=F2geFVkUyhOWYWEzu80ksB5Jrslt897Xwhc8PntN6oc,1952
110
110
  scalebox/sandbox_sync/__init__.py,sha256=8A7x4t-n5k9LOyaq_vyN1EYOT397FHJjslrAStUqYP4,114
111
- scalebox/sandbox_sync/main.py,sha256=rsYbyNtRoorT4qk_Yy5DUjk0dl5XxeOnBGGf3V4k8yU,28518
111
+ scalebox/sandbox_sync/main.py,sha256=yqjAZat0_bybVt6e3TgS61z_D1fCssKtNS1a_DDDnHo,28523
112
112
  scalebox/sandbox_sync/sandbox_api.py,sha256=s6Gs5KEbU_BngtlbwsBSseor56LHKK4mOlVSM8Wjvig,12109
113
113
  scalebox/sandbox_sync/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
114
114
  scalebox/sandbox_sync/commands/command.py,sha256=308RgsexBQaLVbUc2ui6oKOLh6xUFDMIzTpyScHLgKI,10177
@@ -149,9 +149,9 @@ scalebox/test/testsandbox_sync.py,sha256=l0iYqML1ci2jp-SaQ8-hZuRL7XZhgiMUwtJgJx6
149
149
  scalebox/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
150
  scalebox/utils/httpcoreclient.py,sha256=kjTndd-YECPe3n_G1HfGgitzRwntC21tqtIqZ62V6Lg,9868
151
151
  scalebox/utils/httpxclient.py,sha256=oLpCP2RChvnspS6Unl6ngmpY72yPokTfSqMm9m-7k38,13442
152
- scalebox_sdk-0.1.11.dist-info/licenses/LICENSE,sha256=9zP32kHlBovkfji1R6ptx3H7WjJJvnf4UuwTpfogmsY,1069
153
- scalebox_sdk-0.1.11.dist-info/METADATA,sha256=gykE5WZTeqHj0MNsvPU9PIIh9NpmpB3PfhvK-Y6VDIk,12216
154
- scalebox_sdk-0.1.11.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
155
- scalebox_sdk-0.1.11.dist-info/entry_points.txt,sha256=g7C1Trcg8EyvAGMnHpJ3alqtZzQuMypYUQVFK13kOFM,47
156
- scalebox_sdk-0.1.11.dist-info/top_level.txt,sha256=CDjlibkbOG-MT-s1TRxs4Xe_iN1m11ii48spB6DOMj4,9
157
- scalebox_sdk-0.1.11.dist-info/RECORD,,
152
+ scalebox_sdk-0.1.12.dist-info/licenses/LICENSE,sha256=9zP32kHlBovkfji1R6ptx3H7WjJJvnf4UuwTpfogmsY,1069
153
+ scalebox_sdk-0.1.12.dist-info/METADATA,sha256=5y8wyoCQVQ00-maNW1ibQlKbRVU8-L-slsfQYjsH7fA,12216
154
+ scalebox_sdk-0.1.12.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
155
+ scalebox_sdk-0.1.12.dist-info/entry_points.txt,sha256=g7C1Trcg8EyvAGMnHpJ3alqtZzQuMypYUQVFK13kOFM,47
156
+ scalebox_sdk-0.1.12.dist-info/top_level.txt,sha256=CDjlibkbOG-MT-s1TRxs4Xe_iN1m11ii48spB6DOMj4,9
157
+ scalebox_sdk-0.1.12.dist-info/RECORD,,