scalebox-sdk 0.1.24__py3-none-any.whl → 1.0.1__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 +2 -2
- scalebox/api/__init__.py +130 -128
- scalebox/api/client/__init__.py +8 -8
- scalebox/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +2 -2
- scalebox/api/client/api/sandboxes/post_sandboxes.py +2 -2
- scalebox/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- scalebox/api/client/client.py +288 -288
- scalebox/api/client/models/connect_sandbox.py +59 -0
- scalebox/api/client/models/error.py +2 -2
- scalebox/api/client/models/listed_sandbox.py +19 -1
- scalebox/api/client/models/new_sandbox.py +10 -0
- scalebox/api/client/models/sandbox.py +138 -125
- scalebox/api/client/models/sandbox_detail.py +24 -0
- scalebox/api/client/types.py +46 -46
- scalebox/cli.py +125 -125
- scalebox/client/aclient.py +57 -57
- scalebox/client/client.py +102 -102
- scalebox/code_interpreter/__init__.py +12 -12
- scalebox/code_interpreter/charts.py +230 -230
- scalebox/code_interpreter/constants.py +3 -3
- scalebox/code_interpreter/exceptions.py +13 -13
- scalebox/code_interpreter/models.py +485 -485
- scalebox/connection_config.py +34 -1
- scalebox/csx_connect/__init__.py +1 -1
- scalebox/csx_connect/client.py +485 -485
- scalebox/csx_desktop/main.py +651 -651
- scalebox/exceptions.py +83 -83
- scalebox/generated/api.py +61 -61
- scalebox/generated/api_pb2.py +203 -203
- scalebox/generated/api_pb2.pyi +956 -956
- scalebox/generated/api_pb2_connect.py +1407 -1407
- scalebox/generated/rpc.py +50 -50
- scalebox/sandbox/main.py +146 -139
- scalebox/sandbox/sandbox_api.py +105 -91
- scalebox/sandbox/signature.py +40 -40
- scalebox/sandbox/utils.py +34 -34
- scalebox/sandbox_async/commands/command.py +307 -307
- scalebox/sandbox_async/commands/command_handle.py +187 -187
- scalebox/sandbox_async/commands/pty.py +187 -187
- scalebox/sandbox_async/filesystem/filesystem.py +557 -557
- scalebox/sandbox_async/filesystem/watch_handle.py +61 -61
- scalebox/sandbox_async/main.py +228 -46
- scalebox/sandbox_async/sandbox_api.py +124 -3
- scalebox/sandbox_async/utils.py +7 -7
- scalebox/sandbox_sync/__init__.py +2 -2
- scalebox/sandbox_sync/commands/command.py +300 -300
- scalebox/sandbox_sync/commands/command_handle.py +150 -150
- scalebox/sandbox_sync/commands/pty.py +181 -181
- scalebox/sandbox_sync/filesystem/filesystem.py +3 -3
- scalebox/sandbox_sync/filesystem/watch_handle.py +66 -66
- scalebox/sandbox_sync/main.py +208 -133
- scalebox/sandbox_sync/sandbox_api.py +119 -3
- scalebox/test/CODE_INTERPRETER_TESTS_READY.md +323 -323
- scalebox/test/README.md +329 -329
- scalebox/test/bedrock_openai_adapter.py +67 -0
- scalebox/test/code_interpreter_test.py +34 -34
- scalebox/test/code_interpreter_test_sync.py +34 -34
- scalebox/test/run_stress_code_interpreter_sync.py +166 -0
- scalebox/test/simple_upload_example.py +123 -0
- scalebox/test/stabitiy_test.py +310 -0
- scalebox/test/test_browser_use.py +25 -0
- scalebox/test/test_browser_use_scalebox.py +61 -0
- scalebox/test/test_code_interpreter_sync_comprehensive.py +115 -65
- scalebox/test/test_connect_pause_async.py +277 -0
- scalebox/test/test_connect_pause_sync.py +267 -0
- scalebox/test/test_desktop_sandbox_sf.py +117 -0
- scalebox/test/test_download_url.py +49 -0
- scalebox/test/test_sandbox_async_comprehensive.py +1 -1
- scalebox/test/test_sandbox_object_storage_example.py +146 -0
- scalebox/test/test_sandbox_object_storage_example_async.py +156 -0
- scalebox/test/test_sf.py +137 -0
- scalebox/test/test_watch_dir_async.py +56 -0
- scalebox/test/testacreate.py +1 -1
- scalebox/test/testagetinfo.py +1 -1
- scalebox/test/testcomputeuse.py +243 -243
- scalebox/test/testsandbox_api.py +13 -0
- scalebox/test/testsandbox_sync.py +1 -1
- scalebox/test/upload_100mb_example.py +355 -0
- scalebox/utils/httpcoreclient.py +297 -297
- scalebox/utils/httpxclient.py +403 -403
- scalebox/version.py +2 -2
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/METADATA +1 -1
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/RECORD +87 -69
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/WHEEL +1 -1
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/entry_points.txt +0 -0
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/licenses/LICENSE +0 -0
- {scalebox_sdk-0.1.24.dist-info → scalebox_sdk-1.0.1.dist-info}/top_level.txt +0 -0
|
@@ -38,6 +38,9 @@ class ListedSandbox:
|
|
|
38
38
|
template_id: str
|
|
39
39
|
alias: Union[Unset, str] = UNSET
|
|
40
40
|
metadata: Union[Unset, Any] = UNSET
|
|
41
|
+
object_storage: Union[Unset, Any] = UNSET
|
|
42
|
+
uptime: Union[Unset, int] = UNSET
|
|
43
|
+
timeout: Union[Unset, int] = UNSET
|
|
41
44
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
42
45
|
|
|
43
46
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -60,6 +63,9 @@ class ListedSandbox:
|
|
|
60
63
|
alias = self.alias
|
|
61
64
|
|
|
62
65
|
metadata = self.metadata
|
|
66
|
+
object_storage = self.object_storage
|
|
67
|
+
uptime = self.uptime
|
|
68
|
+
timeout = self.timeout
|
|
63
69
|
|
|
64
70
|
field_dict: dict[str, Any] = {}
|
|
65
71
|
field_dict.update(self.additional_properties)
|
|
@@ -79,6 +85,12 @@ class ListedSandbox:
|
|
|
79
85
|
field_dict["alias"] = alias
|
|
80
86
|
if metadata is not UNSET:
|
|
81
87
|
field_dict["metadata"] = metadata
|
|
88
|
+
if object_storage is not UNSET:
|
|
89
|
+
field_dict["objectStorage"] = object_storage
|
|
90
|
+
if uptime is not UNSET:
|
|
91
|
+
field_dict["upTime"] = uptime
|
|
92
|
+
if timeout is not UNSET:
|
|
93
|
+
field_dict["timeout"] = timeout
|
|
82
94
|
|
|
83
95
|
return field_dict
|
|
84
96
|
|
|
@@ -103,9 +115,12 @@ class ListedSandbox:
|
|
|
103
115
|
template_id = d.pop("template_id")
|
|
104
116
|
|
|
105
117
|
alias = d.pop("name", UNSET)
|
|
118
|
+
object_storage = d.pop("object_storage", UNSET)
|
|
106
119
|
|
|
107
120
|
metadata = d.pop("metadata", UNSET)
|
|
108
|
-
|
|
121
|
+
uptime = d.pop("uptime", UNSET)
|
|
122
|
+
timeout = d.pop("timeout", UNSET)
|
|
123
|
+
end_at = (started_at + datetime.timedelta(seconds=float(timeout1))) if (timeout1 := d.pop("timeout", "0")) is not UNSET and timeout1 is not None else None
|
|
109
124
|
|
|
110
125
|
listed_sandbox = cls(
|
|
111
126
|
client_id=client_id,
|
|
@@ -118,6 +133,9 @@ class ListedSandbox:
|
|
|
118
133
|
template_id=template_id,
|
|
119
134
|
alias=alias,
|
|
120
135
|
metadata=metadata,
|
|
136
|
+
object_storage=object_storage,
|
|
137
|
+
uptime=uptime,
|
|
138
|
+
timeout=timeout,
|
|
121
139
|
)
|
|
122
140
|
|
|
123
141
|
listed_sandbox.additional_properties = d
|
|
@@ -32,6 +32,8 @@ class NewSandbox:
|
|
|
32
32
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
33
|
is_async: Union[Unset, bool] = False
|
|
34
34
|
storage_gb: Union[Unset, int] = UNSET
|
|
35
|
+
object_storage: Union[Unset, Any] = UNSET
|
|
36
|
+
net_proxy_country: Union[Unset, str] = UNSET
|
|
35
37
|
|
|
36
38
|
def to_dict(self) -> dict[str, Any]:
|
|
37
39
|
template_id = self.template_id
|
|
@@ -49,6 +51,8 @@ class NewSandbox:
|
|
|
49
51
|
timeout = self.timeout
|
|
50
52
|
is_async = self.is_async
|
|
51
53
|
storage_gb = self.storage_gb
|
|
54
|
+
object_storage = self.object_storage
|
|
55
|
+
net_proxy_country = self.net_proxy_country
|
|
52
56
|
|
|
53
57
|
field_dict: dict[str, Any] = {}
|
|
54
58
|
field_dict.update(self.additional_properties)
|
|
@@ -73,6 +77,10 @@ class NewSandbox:
|
|
|
73
77
|
field_dict["is_async"] = is_async
|
|
74
78
|
if storage_gb is not UNSET:
|
|
75
79
|
field_dict["storage_gb"] = storage_gb
|
|
80
|
+
if object_storage is not UNSET:
|
|
81
|
+
field_dict["object_storage"] = object_storage
|
|
82
|
+
if net_proxy_country is not UNSET:
|
|
83
|
+
field_dict["net_proxy_country"] = net_proxy_country
|
|
76
84
|
|
|
77
85
|
return field_dict
|
|
78
86
|
|
|
@@ -103,6 +111,8 @@ class NewSandbox:
|
|
|
103
111
|
timeout=timeout,
|
|
104
112
|
is_async=d.pop("is_async", UNSET),
|
|
105
113
|
storage_gb=d.pop("storage_gb", UNSET),
|
|
114
|
+
object_storage=d.pop("object_storage", UNSET),
|
|
115
|
+
net_proxy_country=d.pop("net_proxy_country", UNSET),
|
|
106
116
|
)
|
|
107
117
|
|
|
108
118
|
new_sandbox.additional_properties = d
|
|
@@ -1,125 +1,138 @@
|
|
|
1
|
-
from collections.abc import Mapping
|
|
2
|
-
from typing import Any, TypeVar, Union, cast
|
|
3
|
-
|
|
4
|
-
from attrs import define as _attrs_define
|
|
5
|
-
from attrs import field as _attrs_field
|
|
6
|
-
|
|
7
|
-
from ..types import UNSET, Unset
|
|
8
|
-
|
|
9
|
-
T = TypeVar("T", bound="Sandbox")
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
@_attrs_define
|
|
13
|
-
class Sandbox:
|
|
14
|
-
"""
|
|
15
|
-
Attributes:
|
|
16
|
-
client_id (str): Identifier of the client
|
|
17
|
-
envd_version (str): Version of the envd running in the sandbox
|
|
18
|
-
sandbox_id (str): Identifier of the sandbox
|
|
19
|
-
template_id (str): Identifier of the template from which is the sandbox created
|
|
20
|
-
alias (Union[Unset, str]): Alias of the template
|
|
21
|
-
domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
|
|
22
|
-
envd_access_token (Union[Unset, str]): Access token used for envd communication
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
client_id: str
|
|
26
|
-
envd_version: str
|
|
27
|
-
sandbox_id: str
|
|
28
|
-
template_id: str
|
|
29
|
-
alias: Union[Unset, str] = UNSET
|
|
30
|
-
domain: Union[None, Unset, str] = UNSET
|
|
31
|
-
envd_access_token: Union[Unset, str] = UNSET
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
if
|
|
68
|
-
field_dict["
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..types import UNSET, Unset
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="Sandbox")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class Sandbox:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
client_id (str): Identifier of the client
|
|
17
|
+
envd_version (str): Version of the envd running in the sandbox
|
|
18
|
+
sandbox_id (str): Identifier of the sandbox
|
|
19
|
+
template_id (str): Identifier of the template from which is the sandbox created
|
|
20
|
+
alias (Union[Unset, str]): Alias of the template
|
|
21
|
+
domain (Union[None, Unset, str]): Base domain where the sandbox traffic is accessible
|
|
22
|
+
envd_access_token (Union[Unset, str]): Access token used for envd communication
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
client_id: str
|
|
26
|
+
envd_version: str
|
|
27
|
+
sandbox_id: str
|
|
28
|
+
template_id: str
|
|
29
|
+
alias: Union[Unset, str] = UNSET
|
|
30
|
+
domain: Union[None, Unset, str] = UNSET
|
|
31
|
+
envd_access_token: Union[Unset, str] = UNSET
|
|
32
|
+
object_storage: Union[Unset, Any] = UNSET
|
|
33
|
+
network_proxy: Union[Unset, Any] = UNSET
|
|
34
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
35
|
+
|
|
36
|
+
def to_dict(self) -> dict[str, Any]:
|
|
37
|
+
client_id = self.client_id
|
|
38
|
+
|
|
39
|
+
envd_version = self.envd_version
|
|
40
|
+
|
|
41
|
+
sandbox_id = self.sandbox_id
|
|
42
|
+
|
|
43
|
+
template_id = self.template_id
|
|
44
|
+
object_storage = self.object_storage
|
|
45
|
+
network_proxy = self.network_proxy
|
|
46
|
+
|
|
47
|
+
alias = self.alias
|
|
48
|
+
|
|
49
|
+
domain: Union[None, Unset, str]
|
|
50
|
+
if isinstance(self.domain, Unset):
|
|
51
|
+
domain = UNSET
|
|
52
|
+
else:
|
|
53
|
+
domain = self.domain
|
|
54
|
+
|
|
55
|
+
envd_access_token = self.envd_access_token
|
|
56
|
+
|
|
57
|
+
field_dict: dict[str, Any] = {}
|
|
58
|
+
field_dict.update(self.additional_properties)
|
|
59
|
+
field_dict.update(
|
|
60
|
+
{
|
|
61
|
+
"clientID": client_id,
|
|
62
|
+
"envdVersion": envd_version,
|
|
63
|
+
"sandboxID": sandbox_id,
|
|
64
|
+
"templateID": template_id,
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
if alias is not UNSET:
|
|
68
|
+
field_dict["alias"] = alias
|
|
69
|
+
if domain is not UNSET:
|
|
70
|
+
field_dict["domain"] = domain
|
|
71
|
+
if envd_access_token is not UNSET:
|
|
72
|
+
field_dict["envdAccessToken"] = envd_access_token
|
|
73
|
+
if object_storage is not UNSET:
|
|
74
|
+
field_dict["objectStorage"] = object_storage
|
|
75
|
+
if network_proxy is not UNSET:
|
|
76
|
+
field_dict["networkProxy"] = network_proxy
|
|
77
|
+
|
|
78
|
+
return field_dict
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
82
|
+
d = dict(src_dict)
|
|
83
|
+
dd = d.pop("data")
|
|
84
|
+
data = dict(dd) if dd else None
|
|
85
|
+
client_id = data.pop("clientID", "")
|
|
86
|
+
|
|
87
|
+
envd_version = data.pop("envdVersion", "")
|
|
88
|
+
|
|
89
|
+
sandbox_id = data.pop("sandbox_id")
|
|
90
|
+
|
|
91
|
+
template_id = data.pop("template_id")
|
|
92
|
+
|
|
93
|
+
object_storage = data.pop("object_storage",{})
|
|
94
|
+
network_proxy = data.pop("network_proxy",{})
|
|
95
|
+
|
|
96
|
+
alias = data.pop("alias", UNSET)
|
|
97
|
+
|
|
98
|
+
def _parse_domain(data: object) -> Union[None, Unset, str]:
|
|
99
|
+
if data is None:
|
|
100
|
+
return data
|
|
101
|
+
if isinstance(data, Unset):
|
|
102
|
+
return data
|
|
103
|
+
return cast(Union[None, Unset, str], data)
|
|
104
|
+
|
|
105
|
+
domain = _parse_domain(data.pop("sandbox_domain", UNSET))
|
|
106
|
+
|
|
107
|
+
envd_access_token = data.pop("envd_access_token", UNSET)
|
|
108
|
+
|
|
109
|
+
sandbox = cls(
|
|
110
|
+
client_id=client_id,
|
|
111
|
+
envd_version=envd_version,
|
|
112
|
+
sandbox_id=sandbox_id,
|
|
113
|
+
template_id=template_id,
|
|
114
|
+
alias=alias,
|
|
115
|
+
domain=domain,
|
|
116
|
+
envd_access_token=envd_access_token,
|
|
117
|
+
object_storage=object_storage,
|
|
118
|
+
network_proxy=network_proxy,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
sandbox.additional_properties = d
|
|
122
|
+
return sandbox
|
|
123
|
+
|
|
124
|
+
@property
|
|
125
|
+
def additional_keys(self) -> list[str]:
|
|
126
|
+
return list(self.additional_properties.keys())
|
|
127
|
+
|
|
128
|
+
def __getitem__(self, key: str) -> Any:
|
|
129
|
+
return self.additional_properties[key]
|
|
130
|
+
|
|
131
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
132
|
+
self.additional_properties[key] = value
|
|
133
|
+
|
|
134
|
+
def __delitem__(self, key: str) -> None:
|
|
135
|
+
del self.additional_properties[key]
|
|
136
|
+
|
|
137
|
+
def __contains__(self, key: str) -> bool:
|
|
138
|
+
return key in self.additional_properties
|
|
@@ -44,6 +44,9 @@ class SandboxDetail:
|
|
|
44
44
|
envd_access_token: Union[Unset, str] = UNSET
|
|
45
45
|
envd_version: Union[Unset, str] = UNSET
|
|
46
46
|
metadata: Union[Unset, Any] = UNSET
|
|
47
|
+
object_storage: Union[Unset, Any] = UNSET
|
|
48
|
+
uptime: Union[Unset, int] = UNSET
|
|
49
|
+
timeout: Union[Unset, int] = UNSET
|
|
47
50
|
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
48
51
|
|
|
49
52
|
def to_dict(self) -> dict[str, Any]:
|
|
@@ -63,8 +66,14 @@ class SandboxDetail:
|
|
|
63
66
|
|
|
64
67
|
template_id = self.template_id
|
|
65
68
|
|
|
69
|
+
object_storage = self.object_storage
|
|
70
|
+
|
|
66
71
|
alias = self.alias
|
|
67
72
|
|
|
73
|
+
uptime = self.uptime
|
|
74
|
+
|
|
75
|
+
timeout = self.timeout
|
|
76
|
+
|
|
68
77
|
domain: Union[None, Unset, str]
|
|
69
78
|
if isinstance(self.domain, Unset):
|
|
70
79
|
domain = UNSET
|
|
@@ -101,6 +110,12 @@ class SandboxDetail:
|
|
|
101
110
|
field_dict["envdVersion"] = envd_version
|
|
102
111
|
if metadata is not UNSET:
|
|
103
112
|
field_dict["metadata"] = metadata
|
|
113
|
+
if object_storage is not UNSET:
|
|
114
|
+
field_dict["objectStorage"] = object_storage
|
|
115
|
+
if uptime is not UNSET:
|
|
116
|
+
field_dict["upTime"] = uptime
|
|
117
|
+
if timeout is not UNSET:
|
|
118
|
+
field_dict["timeout"] = timeout
|
|
104
119
|
|
|
105
120
|
return field_dict
|
|
106
121
|
|
|
@@ -127,6 +142,12 @@ class SandboxDetail:
|
|
|
127
142
|
|
|
128
143
|
alias = d.pop("alias", UNSET)
|
|
129
144
|
|
|
145
|
+
object_storage = data.pop("object_storage",UNSET)
|
|
146
|
+
|
|
147
|
+
uptime = data.pop("uptime",UNSET)
|
|
148
|
+
|
|
149
|
+
timeout = data.pop("timeout",UNSET)
|
|
150
|
+
|
|
130
151
|
def _parse_domain(data: object) -> Union[None, Unset, str]:
|
|
131
152
|
if data is None:
|
|
132
153
|
return data
|
|
@@ -156,6 +177,9 @@ class SandboxDetail:
|
|
|
156
177
|
envd_access_token=envd_access_token,
|
|
157
178
|
envd_version=envd_version,
|
|
158
179
|
metadata=metadata,
|
|
180
|
+
object_storage=object_storage,
|
|
181
|
+
uptime=uptime,
|
|
182
|
+
timeout=timeout,
|
|
159
183
|
)
|
|
160
184
|
|
|
161
185
|
sandbox_detail.additional_properties = d
|
scalebox/api/client/types.py
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
"""Contains some shared types for properties"""
|
|
2
|
-
|
|
3
|
-
from collections.abc import MutableMapping
|
|
4
|
-
from http import HTTPStatus
|
|
5
|
-
from typing import BinaryIO, Generic, Literal, Optional, TypeVar
|
|
6
|
-
|
|
7
|
-
from attrs import define
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class Unset:
|
|
11
|
-
def __bool__(self) -> Literal[False]:
|
|
12
|
-
return False
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
UNSET: Unset = Unset()
|
|
16
|
-
|
|
17
|
-
FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]]
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
@define
|
|
21
|
-
class File:
|
|
22
|
-
"""Contains information for file uploads"""
|
|
23
|
-
|
|
24
|
-
payload: BinaryIO
|
|
25
|
-
file_name: Optional[str] = None
|
|
26
|
-
mime_type: Optional[str] = None
|
|
27
|
-
|
|
28
|
-
def to_tuple(self) -> FileJsonType:
|
|
29
|
-
"""Return a tuple representation that httpx will accept for multipart/form-data"""
|
|
30
|
-
return self.file_name, self.payload, self.mime_type
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
T = TypeVar("T")
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
@define
|
|
37
|
-
class Response(Generic[T]):
|
|
38
|
-
"""A response from an endpoint"""
|
|
39
|
-
|
|
40
|
-
status_code: HTTPStatus
|
|
41
|
-
content: bytes
|
|
42
|
-
headers: MutableMapping[str, str]
|
|
43
|
-
parsed: Optional[T]
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"]
|
|
1
|
+
"""Contains some shared types for properties"""
|
|
2
|
+
|
|
3
|
+
from collections.abc import MutableMapping
|
|
4
|
+
from http import HTTPStatus
|
|
5
|
+
from typing import BinaryIO, Generic, Literal, Optional, TypeVar
|
|
6
|
+
|
|
7
|
+
from attrs import define
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class Unset:
|
|
11
|
+
def __bool__(self) -> Literal[False]:
|
|
12
|
+
return False
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
UNSET: Unset = Unset()
|
|
16
|
+
|
|
17
|
+
FileJsonType = tuple[Optional[str], BinaryIO, Optional[str]]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
@define
|
|
21
|
+
class File:
|
|
22
|
+
"""Contains information for file uploads"""
|
|
23
|
+
|
|
24
|
+
payload: BinaryIO
|
|
25
|
+
file_name: Optional[str] = None
|
|
26
|
+
mime_type: Optional[str] = None
|
|
27
|
+
|
|
28
|
+
def to_tuple(self) -> FileJsonType:
|
|
29
|
+
"""Return a tuple representation that httpx will accept for multipart/form-data"""
|
|
30
|
+
return self.file_name, self.payload, self.mime_type
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
T = TypeVar("T")
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
@define
|
|
37
|
+
class Response(Generic[T]):
|
|
38
|
+
"""A response from an endpoint"""
|
|
39
|
+
|
|
40
|
+
status_code: HTTPStatus
|
|
41
|
+
content: bytes
|
|
42
|
+
headers: MutableMapping[str, str]
|
|
43
|
+
parsed: Optional[T]
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
__all__ = ["UNSET", "File", "FileJsonType", "Response", "Unset"]
|