solari-e2b-compat 0.2.5__tar.gz → 0.2.6__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.
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/.gitignore +1 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/PKG-INFO +1 -1
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/pyproject.toml +1 -1
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/__init__.py +1 -1
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_sandbox.py +11 -3
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/COMPAT.md +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/LICENSE +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/LICENSE-E2B +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/NOTICE +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/README.md +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_box.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_commands.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_config.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_filesystem.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_git.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_loop.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_redact.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_request.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_sync.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_template.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_vendor_user.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/_volume.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/__init__.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/charts.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/client.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/code_interpreter_async.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/code_interpreter_sync.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/constants.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/exceptions.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/models.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/exceptions.py +0 -0
- {solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/models.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: solari-e2b-compat
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.6
|
|
4
4
|
Summary: E2B-compatible Python interface (sandboxes and code interpreter) over Solari Sandboxes. Not affiliated with E2B.
|
|
5
5
|
Project-URL: Homepage, https://getsolari.com
|
|
6
6
|
Author: Solari
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "solari-e2b-compat"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.6"
|
|
8
8
|
description = "E2B-compatible Python interface (sandboxes and code interpreter) over Solari Sandboxes. Not affiliated with E2B."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -640,11 +640,19 @@ class AsyncSandbox:
|
|
|
640
640
|
raise t from e
|
|
641
641
|
|
|
642
642
|
@_hybrid
|
|
643
|
-
async def fork(self, timeout: Optional[int] = None, count: Optional[int] = None, *, logger: Any = None, **opts: Any) -> List[Any]:
|
|
644
|
-
"""Copy a running sandbox: checkpoint it, then boot ``count`` new sandboxes from the checkpoint.
|
|
643
|
+
async def fork(self, timeout: Optional[int] = None, count: Optional[int] = None, *, metadata: Optional[Dict[str, str]] = None, logger: Any = None, **opts: Any) -> List[Any]:
|
|
644
|
+
"""Copy a running sandbox: checkpoint it, then boot ``count`` new sandboxes from the checkpoint.
|
|
645
|
+
|
|
646
|
+
``metadata`` is added to each copy's metadata (over what it inherits from the sandbox it was copied from)."""
|
|
645
647
|
rt = self._prep(opts)
|
|
646
648
|
if logger is not None:
|
|
647
649
|
raise SolariCompatUnsupported("logger", "the Solari client does not log requests through a logger")
|
|
650
|
+
if metadata is not None and (not isinstance(metadata, dict) or not all(isinstance(k, str) and isinstance(v, str) for k, v in metadata.items())):
|
|
651
|
+
raise InvalidArgumentException("metadata must be a dict of str to str")
|
|
652
|
+
# Same rule as create(): a caller could otherwise name another sandbox's checkpoint here.
|
|
653
|
+
for key in metadata or {}:
|
|
654
|
+
if key in _RESERVED or _is_info_key(key):
|
|
655
|
+
raise SolariCompatUnsupported(f"metadata key {key!r}", "this key is reserved by the compatibility layer")
|
|
648
656
|
n = 1 if count is None else count
|
|
649
657
|
if not isinstance(n, int) or isinstance(n, bool) or n < 1:
|
|
650
658
|
raise InvalidArgumentException("count must be a positive integer")
|
|
@@ -660,7 +668,7 @@ class AsyncSandbox:
|
|
|
660
668
|
|
|
661
669
|
async def one() -> Any:
|
|
662
670
|
try:
|
|
663
|
-
core = await bounded(conn.solari.create(from_snapshot=snap, timeout_ms=int((timeout if timeout is not None else DEFAULT_TIMEOUT) * 1000), metadata={**parent_md, FORK_KEY: snap}), rt)
|
|
671
|
+
core = await bounded(conn.solari.create(from_snapshot=snap, timeout_ms=int((timeout if timeout is not None else DEFAULT_TIMEOUT) * 1000), metadata={**parent_md, **(metadata or {}), FORK_KEY: snap}), rt)
|
|
664
672
|
return cls(conn, core.sandboxId, core)
|
|
665
673
|
except Exception as e: # noqa: BLE001
|
|
666
674
|
t = translate(e)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/constants.py
RENAMED
|
File without changes
|
{solari_e2b_compat-0.2.5 → solari_e2b_compat-0.2.6}/solari_e2b/code_interpreter/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|