genesis-sandbox-client-python 0.1.0__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.
- genesis_sandbox_client/__init__.py +57 -0
- genesis_sandbox_client/async_session.py +663 -0
- genesis_sandbox_client/client.py +993 -0
- genesis_sandbox_client/control_probe.py +119 -0
- genesis_sandbox_client/deadline_http.py +96 -0
- genesis_sandbox_client/errors.py +133 -0
- genesis_sandbox_client/execution_governance.py +270 -0
- genesis_sandbox_client/invocation_output.py +11 -0
- genesis_sandbox_client/json_codec.py +31 -0
- genesis_sandbox_client/py.typed +0 -0
- genesis_sandbox_client/session.py +536 -0
- genesis_sandbox_client/session_exec_client.py +76 -0
- genesis_sandbox_client/types.py +150 -0
- genesis_sandbox_client/view_preparation.py +64 -0
- genesis_sandbox_client/workspace_client.py +180 -0
- genesis_sandbox_client/workspace_lifecycle.py +154 -0
- genesis_sandbox_client/workspace_purge.py +26 -0
- genesis_sandbox_client_python-0.1.0.dist-info/METADATA +197 -0
- genesis_sandbox_client_python-0.1.0.dist-info/RECORD +21 -0
- genesis_sandbox_client_python-0.1.0.dist-info/WHEEL +4 -0
- genesis_sandbox_client_python-0.1.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"""Genesis Sandbox Python SDK — dependency-free client with session helpers.
|
|
2
|
+
|
|
3
|
+
Public API::
|
|
4
|
+
|
|
5
|
+
from genesis_sandbox_client import Client, new_sandbox, new_sandbox_async, quick_python, quick_run
|
|
6
|
+
|
|
7
|
+
Sync session usage::
|
|
8
|
+
|
|
9
|
+
with new_sandbox(client, profile="python") as sb:
|
|
10
|
+
r = sb.run_python('print("hello")')
|
|
11
|
+
|
|
12
|
+
Async session usage::
|
|
13
|
+
|
|
14
|
+
async with new_sandbox_async(client, profile="python") as sb:
|
|
15
|
+
r = await sb.run_python('print("hello")')
|
|
16
|
+
|
|
17
|
+
Quick one-shot job (no session)::
|
|
18
|
+
|
|
19
|
+
result = quick_python(client, 'print(42)')
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
from .async_session import AsyncSandboxSession, new_sandbox_async, open_sandbox_async
|
|
23
|
+
from .client import Client
|
|
24
|
+
from .control_probe import RuntimeControlCapabilities
|
|
25
|
+
from .errors import APIError, ExecRecoveryError, ProtocolError, SandboxError, TransportError, classify_error
|
|
26
|
+
from .session import SandboxSession, new_sandbox, quick_python, quick_run
|
|
27
|
+
from .types import CancelReceipt, EffectiveEnvironment, ExecResult, SandboxOptions, SSEEvent
|
|
28
|
+
|
|
29
|
+
__version__ = "0.1.0"
|
|
30
|
+
|
|
31
|
+
__all__ = [
|
|
32
|
+
# HTTP Client
|
|
33
|
+
"Client",
|
|
34
|
+
"RuntimeControlCapabilities",
|
|
35
|
+
"SandboxError",
|
|
36
|
+
"APIError",
|
|
37
|
+
"TransportError",
|
|
38
|
+
"ProtocolError",
|
|
39
|
+
"ExecRecoveryError",
|
|
40
|
+
"classify_error",
|
|
41
|
+
# Common types
|
|
42
|
+
"CancelReceipt",
|
|
43
|
+
"ExecResult",
|
|
44
|
+
"EffectiveEnvironment",
|
|
45
|
+
"SandboxOptions",
|
|
46
|
+
"SSEEvent",
|
|
47
|
+
# Sync
|
|
48
|
+
"SandboxSession",
|
|
49
|
+
"new_sandbox",
|
|
50
|
+
# Async
|
|
51
|
+
"AsyncSandboxSession",
|
|
52
|
+
"new_sandbox_async",
|
|
53
|
+
"open_sandbox_async",
|
|
54
|
+
# Quick helpers (Job mode)
|
|
55
|
+
"quick_run",
|
|
56
|
+
"quick_python",
|
|
57
|
+
]
|