loopix-sdk 2.30.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.
- loopix/__init__.py +260 -0
- loopix/api/__init__.py +287 -0
- loopix/api/client/__init__.py +8 -0
- loopix/api/client/api/__init__.py +1 -0
- loopix/api/client/api/sandboxes/__init__.py +1 -0
- loopix/api/client/api/sandboxes/delete_sandboxes_sandbox_id.py +161 -0
- loopix/api/client/api/sandboxes/get_sandboxes.py +176 -0
- loopix/api/client/api/sandboxes/get_sandboxes_metrics.py +173 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id.py +163 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_logs.py +199 -0
- loopix/api/client/api/sandboxes/get_sandboxes_sandbox_id_metrics.py +212 -0
- loopix/api/client/api/sandboxes/get_v2_sandboxes.py +230 -0
- loopix/api/client/api/sandboxes/get_v_2_sandboxes_sandbox_id_logs.py +254 -0
- loopix/api/client/api/sandboxes/post_sandboxes.py +172 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_connect.py +193 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_pause.py +187 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_refreshes.py +181 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_resume.py +189 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_snapshots.py +195 -0
- loopix/api/client/api/sandboxes/post_sandboxes_sandbox_id_timeout.py +193 -0
- loopix/api/client/api/sandboxes/put_sandboxes_sandbox_id_network.py +199 -0
- loopix/api/client/api/snapshots/__init__.py +1 -0
- loopix/api/client/api/snapshots/get_snapshots.py +202 -0
- loopix/api/client/api/tags/__init__.py +1 -0
- loopix/api/client/api/tags/delete_templates_tags.py +174 -0
- loopix/api/client/api/tags/get_templates_template_id_tags.py +172 -0
- loopix/api/client/api/tags/post_templates_tags.py +176 -0
- loopix/api/client/api/templates/__init__.py +1 -0
- loopix/api/client/api/templates/delete_templates_template_id.py +157 -0
- loopix/api/client/api/templates/get_templates.py +172 -0
- loopix/api/client/api/templates/get_templates_aliases_alias.py +167 -0
- loopix/api/client/api/templates/get_templates_template_id.py +195 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_logs.py +272 -0
- loopix/api/client/api/templates/get_templates_template_id_builds_build_id_status.py +232 -0
- loopix/api/client/api/templates/get_templates_template_id_files_hash.py +180 -0
- loopix/api/client/api/templates/patch_templates_template_id.py +183 -0
- loopix/api/client/api/templates/patch_v_2_templates_template_id.py +185 -0
- loopix/api/client/api/templates/post_templates.py +172 -0
- loopix/api/client/api/templates/post_templates_template_id.py +181 -0
- loopix/api/client/api/templates/post_templates_template_id_builds_build_id.py +170 -0
- loopix/api/client/api/templates/post_v2_templates.py +172 -0
- loopix/api/client/api/templates/post_v3_templates.py +176 -0
- loopix/api/client/api/templates/post_v_2_templates_template_id_builds_build_id.py +192 -0
- loopix/api/client/api/volumes/__init__.py +1 -0
- loopix/api/client/api/volumes/delete_volumes_volume_id.py +161 -0
- loopix/api/client/api/volumes/get_volumes.py +140 -0
- loopix/api/client/api/volumes/get_volumes_volume_id.py +163 -0
- loopix/api/client/api/volumes/post_volumes.py +172 -0
- loopix/api/client/client.py +286 -0
- loopix/api/client/errors.py +16 -0
- loopix/api/client/models/__init__.py +185 -0
- loopix/api/client/models/admin_build_cancel_result.py +67 -0
- loopix/api/client/models/admin_sandbox_kill_result.py +67 -0
- loopix/api/client/models/assign_template_tags_request.py +67 -0
- loopix/api/client/models/assigned_template_tags.py +68 -0
- loopix/api/client/models/aws_registry.py +85 -0
- loopix/api/client/models/aws_registry_type.py +8 -0
- loopix/api/client/models/build_log_entry.py +89 -0
- loopix/api/client/models/build_status_reason.py +95 -0
- loopix/api/client/models/connect_sandbox.py +59 -0
- loopix/api/client/models/created_access_token.py +100 -0
- loopix/api/client/models/created_team_api_key.py +166 -0
- loopix/api/client/models/delete_template_tags_request.py +67 -0
- loopix/api/client/models/disk_metrics.py +91 -0
- loopix/api/client/models/error.py +67 -0
- loopix/api/client/models/gcp_registry.py +69 -0
- loopix/api/client/models/gcp_registry_type.py +8 -0
- loopix/api/client/models/general_registry.py +77 -0
- loopix/api/client/models/general_registry_type.py +8 -0
- loopix/api/client/models/identifier_masking_details.py +83 -0
- loopix/api/client/models/listed_sandbox.py +179 -0
- loopix/api/client/models/log_level.py +11 -0
- loopix/api/client/models/logs_direction.py +9 -0
- loopix/api/client/models/logs_source.py +9 -0
- loopix/api/client/models/machine_info.py +83 -0
- loopix/api/client/models/max_team_metric.py +78 -0
- loopix/api/client/models/mcp_type_0.py +44 -0
- loopix/api/client/models/new_access_token.py +59 -0
- loopix/api/client/models/new_sandbox.py +224 -0
- loopix/api/client/models/new_team_api_key.py +59 -0
- loopix/api/client/models/new_volume.py +59 -0
- loopix/api/client/models/node.py +160 -0
- loopix/api/client/models/node_detail.py +160 -0
- loopix/api/client/models/node_metrics.py +122 -0
- loopix/api/client/models/node_status.py +12 -0
- loopix/api/client/models/node_status_change.py +82 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_refreshes_body.py +59 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_snapshots_body.py +60 -0
- loopix/api/client/models/post_sandboxes_sandbox_id_timeout_body.py +59 -0
- loopix/api/client/models/resumed_sandbox.py +68 -0
- loopix/api/client/models/sandbox.py +145 -0
- loopix/api/client/models/sandbox_auto_resume_config.py +60 -0
- loopix/api/client/models/sandbox_detail.py +267 -0
- loopix/api/client/models/sandbox_lifecycle.py +70 -0
- loopix/api/client/models/sandbox_log.py +70 -0
- loopix/api/client/models/sandbox_log_entry.py +93 -0
- loopix/api/client/models/sandbox_log_entry_fields.py +44 -0
- loopix/api/client/models/sandbox_logs.py +91 -0
- loopix/api/client/models/sandbox_logs_v2_response.py +73 -0
- loopix/api/client/models/sandbox_metric.py +126 -0
- loopix/api/client/models/sandbox_network_config.py +118 -0
- loopix/api/client/models/sandbox_network_config_rules.py +72 -0
- loopix/api/client/models/sandbox_network_rule.py +74 -0
- loopix/api/client/models/sandbox_network_transform.py +79 -0
- loopix/api/client/models/sandbox_network_transform_headers.py +47 -0
- loopix/api/client/models/sandbox_network_update_config.py +114 -0
- loopix/api/client/models/sandbox_network_update_config_rules.py +71 -0
- loopix/api/client/models/sandbox_on_timeout.py +9 -0
- loopix/api/client/models/sandbox_pause_request.py +62 -0
- loopix/api/client/models/sandbox_state.py +9 -0
- loopix/api/client/models/sandbox_volume_mount.py +67 -0
- loopix/api/client/models/sandboxes_with_metrics.py +59 -0
- loopix/api/client/models/snapshot_info.py +70 -0
- loopix/api/client/models/team.py +83 -0
- loopix/api/client/models/team_api_key.py +158 -0
- loopix/api/client/models/team_metric.py +86 -0
- loopix/api/client/models/team_user.py +75 -0
- loopix/api/client/models/template.py +225 -0
- loopix/api/client/models/template_alias_response.py +67 -0
- loopix/api/client/models/template_build.py +139 -0
- loopix/api/client/models/template_build_file_upload.py +70 -0
- loopix/api/client/models/template_build_info.py +126 -0
- loopix/api/client/models/template_build_logs_response.py +73 -0
- loopix/api/client/models/template_build_request.py +115 -0
- loopix/api/client/models/template_build_request_v2.py +88 -0
- loopix/api/client/models/template_build_request_v3.py +107 -0
- loopix/api/client/models/template_build_start_v2.py +184 -0
- loopix/api/client/models/template_build_status.py +11 -0
- loopix/api/client/models/template_legacy.py +207 -0
- loopix/api/client/models/template_request_response_v3.py +99 -0
- loopix/api/client/models/template_step.py +91 -0
- loopix/api/client/models/template_tag.py +78 -0
- loopix/api/client/models/template_update_request.py +59 -0
- loopix/api/client/models/template_update_response.py +59 -0
- loopix/api/client/models/template_with_builds.py +156 -0
- loopix/api/client/models/update_team_api_key.py +59 -0
- loopix/api/client/models/volume.py +67 -0
- loopix/api/client/models/volume_and_token.py +75 -0
- loopix/api/client/models/volume_token.py +59 -0
- loopix/api/client/py.typed +1 -0
- loopix/api/client/types.py +54 -0
- loopix/api/client_async/__init__.py +74 -0
- loopix/api/client_sync/__init__.py +73 -0
- loopix/api/metadata.py +14 -0
- loopix/connection_config.py +309 -0
- loopix/envd/api.py +170 -0
- loopix/envd/filesystem/filesystem_connect.py +193 -0
- loopix/envd/filesystem/filesystem_pb2.py +80 -0
- loopix/envd/filesystem/filesystem_pb2.pyi +272 -0
- loopix/envd/process/process_connect.py +174 -0
- loopix/envd/process/process_pb2.py +96 -0
- loopix/envd/process/process_pb2.pyi +316 -0
- loopix/envd/rpc.py +139 -0
- loopix/envd/versions.py +11 -0
- loopix/exceptions.py +133 -0
- loopix/io_utils.py +57 -0
- loopix/paginator.py +52 -0
- loopix/py.typed +0 -0
- loopix/sandbox/_git/__init__.py +85 -0
- loopix/sandbox/_git/args.py +363 -0
- loopix/sandbox/_git/auth.py +132 -0
- loopix/sandbox/_git/config.py +32 -0
- loopix/sandbox/_git/parse.py +222 -0
- loopix/sandbox/_git/types.py +149 -0
- loopix/sandbox/commands/command_handle.py +69 -0
- loopix/sandbox/commands/main.py +39 -0
- loopix/sandbox/filesystem/filesystem.py +337 -0
- loopix/sandbox/filesystem/watch_handle.py +70 -0
- loopix/sandbox/main.py +227 -0
- loopix/sandbox/mcp.py +1949 -0
- loopix/sandbox/network.py +8 -0
- loopix/sandbox/sandbox_api.py +624 -0
- loopix/sandbox/signature.py +47 -0
- loopix/sandbox/utils.py +34 -0
- loopix/sandbox_async/commands/command.py +396 -0
- loopix/sandbox_async/commands/command_handle.py +298 -0
- loopix/sandbox_async/commands/pty.py +257 -0
- loopix/sandbox_async/filesystem/filesystem.py +720 -0
- loopix/sandbox_async/filesystem/watch_handle.py +97 -0
- loopix/sandbox_async/git.py +1100 -0
- loopix/sandbox_async/main.py +987 -0
- loopix/sandbox_async/paginator.py +140 -0
- loopix/sandbox_async/sandbox_api.py +504 -0
- loopix/sandbox_async/utils.py +7 -0
- loopix/sandbox_domains.py +5 -0
- loopix/sandbox_sync/commands/command.py +420 -0
- loopix/sandbox_sync/commands/command_handle.py +239 -0
- loopix/sandbox_sync/commands/pty.py +279 -0
- loopix/sandbox_sync/filesystem/filesystem.py +710 -0
- loopix/sandbox_sync/filesystem/watch_handle.py +102 -0
- loopix/sandbox_sync/git.py +1077 -0
- loopix/sandbox_sync/main.py +975 -0
- loopix/sandbox_sync/paginator.py +140 -0
- loopix/sandbox_sync/sandbox_api.py +491 -0
- loopix/template/consts.py +45 -0
- loopix/template/dockerfile_parser.py +286 -0
- loopix/template/logger.py +232 -0
- loopix/template/main.py +1368 -0
- loopix/template/readycmd.py +144 -0
- loopix/template/types.py +194 -0
- loopix/template/utils.py +426 -0
- loopix/template_async/build_api.py +419 -0
- loopix/template_async/main.py +528 -0
- loopix/template_sync/build_api.py +409 -0
- loopix/template_sync/main.py +529 -0
- loopix/volume/client/__init__.py +8 -0
- loopix/volume/client/api/__init__.py +1 -0
- loopix/volume/client/api/volumes/__init__.py +1 -0
- loopix/volume/client/api/volumes/delete_volumecontent_volume_id_path.py +174 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_dir.py +204 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_file.py +179 -0
- loopix/volume/client/api/volumes/get_volumecontent_volume_id_path.py +176 -0
- loopix/volume/client/api/volumes/patch_volumecontent_volume_id_path.py +203 -0
- loopix/volume/client/api/volumes/post_volumecontent_volume_id_dir.py +239 -0
- loopix/volume/client/api/volumes/put_volumecontent_volume_id_file.py +259 -0
- loopix/volume/client/client.py +286 -0
- loopix/volume/client/errors.py +16 -0
- loopix/volume/client/models/__init__.py +13 -0
- loopix/volume/client/models/error.py +67 -0
- loopix/volume/client/models/patch_volumecontent_volume_id_path_body.py +77 -0
- loopix/volume/client/models/volume_entry_stat.py +145 -0
- loopix/volume/client/models/volume_entry_stat_type.py +11 -0
- loopix/volume/client/py.typed +1 -0
- loopix/volume/client/types.py +54 -0
- loopix/volume/client_async/__init__.py +88 -0
- loopix/volume/client_sync/__init__.py +80 -0
- loopix/volume/connection_config.py +145 -0
- loopix/volume/types.py +62 -0
- loopix/volume/utils.py +52 -0
- loopix/volume/volume_async.py +639 -0
- loopix/volume/volume_sync.py +639 -0
- loopix_connect/__init__.py +1 -0
- loopix_connect/client.py +534 -0
- loopix_connect/py.typed +0 -0
- loopix_sdk-2.30.0.dist-info/METADATA +98 -0
- loopix_sdk-2.30.0.dist-info/RECORD +238 -0
- loopix_sdk-2.30.0.dist-info/WHEEL +4 -0
- loopix_sdk-2.30.0.dist-info/licenses/LICENSE +9 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="IdentifierMaskingDetails")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class IdentifierMaskingDetails:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
masked_value_prefix (str): Prefix used in masked version of the token or key
|
|
15
|
+
masked_value_suffix (str): Suffix used in masked version of the token or key
|
|
16
|
+
prefix (str): Prefix that identifies the token or key type
|
|
17
|
+
value_length (int): Length of the token or key
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
masked_value_prefix: str
|
|
21
|
+
masked_value_suffix: str
|
|
22
|
+
prefix: str
|
|
23
|
+
value_length: int
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
masked_value_prefix = self.masked_value_prefix
|
|
28
|
+
|
|
29
|
+
masked_value_suffix = self.masked_value_suffix
|
|
30
|
+
|
|
31
|
+
prefix = self.prefix
|
|
32
|
+
|
|
33
|
+
value_length = self.value_length
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"maskedValuePrefix": masked_value_prefix,
|
|
40
|
+
"maskedValueSuffix": masked_value_suffix,
|
|
41
|
+
"prefix": prefix,
|
|
42
|
+
"valueLength": value_length,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
masked_value_prefix = d.pop("maskedValuePrefix")
|
|
52
|
+
|
|
53
|
+
masked_value_suffix = d.pop("maskedValueSuffix")
|
|
54
|
+
|
|
55
|
+
prefix = d.pop("prefix")
|
|
56
|
+
|
|
57
|
+
value_length = d.pop("valueLength")
|
|
58
|
+
|
|
59
|
+
identifier_masking_details = cls(
|
|
60
|
+
masked_value_prefix=masked_value_prefix,
|
|
61
|
+
masked_value_suffix=masked_value_suffix,
|
|
62
|
+
prefix=prefix,
|
|
63
|
+
value_length=value_length,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
identifier_masking_details.additional_properties = d
|
|
67
|
+
return identifier_masking_details
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
8
|
+
|
|
9
|
+
from ..models.sandbox_state import SandboxState
|
|
10
|
+
from ..types import UNSET, Unset
|
|
11
|
+
|
|
12
|
+
if TYPE_CHECKING:
|
|
13
|
+
from ..models.sandbox_volume_mount import SandboxVolumeMount
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
T = TypeVar("T", bound="ListedSandbox")
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
@_attrs_define
|
|
20
|
+
class ListedSandbox:
|
|
21
|
+
"""
|
|
22
|
+
Attributes:
|
|
23
|
+
client_id (str): Identifier of the client
|
|
24
|
+
cpu_count (int): CPU cores for the sandbox
|
|
25
|
+
disk_size_mb (int): Disk size for the sandbox in MiB
|
|
26
|
+
end_at (datetime.datetime): Time when the sandbox will expire
|
|
27
|
+
envd_version (str): Version of the envd running in the sandbox
|
|
28
|
+
memory_mb (int): Memory for the sandbox in MiB
|
|
29
|
+
sandbox_id (str): Identifier of the sandbox
|
|
30
|
+
started_at (datetime.datetime): Time when the sandbox was started
|
|
31
|
+
state (SandboxState): State of the sandbox
|
|
32
|
+
template_id (str): Identifier of the template from which is the sandbox created
|
|
33
|
+
alias (Union[Unset, str]): Alias of the template
|
|
34
|
+
metadata (Union[Unset, Any]):
|
|
35
|
+
volume_mounts (Union[Unset, list['SandboxVolumeMount']]):
|
|
36
|
+
"""
|
|
37
|
+
|
|
38
|
+
client_id: str
|
|
39
|
+
cpu_count: int
|
|
40
|
+
disk_size_mb: int
|
|
41
|
+
end_at: datetime.datetime
|
|
42
|
+
envd_version: str
|
|
43
|
+
memory_mb: int
|
|
44
|
+
sandbox_id: str
|
|
45
|
+
started_at: datetime.datetime
|
|
46
|
+
state: SandboxState
|
|
47
|
+
template_id: str
|
|
48
|
+
alias: Union[Unset, str] = UNSET
|
|
49
|
+
metadata: Union[Unset, Any] = UNSET
|
|
50
|
+
volume_mounts: Union[Unset, list["SandboxVolumeMount"]] = UNSET
|
|
51
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> dict[str, Any]:
|
|
54
|
+
client_id = self.client_id
|
|
55
|
+
|
|
56
|
+
cpu_count = self.cpu_count
|
|
57
|
+
|
|
58
|
+
disk_size_mb = self.disk_size_mb
|
|
59
|
+
|
|
60
|
+
end_at = self.end_at.isoformat()
|
|
61
|
+
|
|
62
|
+
envd_version = self.envd_version
|
|
63
|
+
|
|
64
|
+
memory_mb = self.memory_mb
|
|
65
|
+
|
|
66
|
+
sandbox_id = self.sandbox_id
|
|
67
|
+
|
|
68
|
+
started_at = self.started_at.isoformat()
|
|
69
|
+
|
|
70
|
+
state = self.state.value
|
|
71
|
+
|
|
72
|
+
template_id = self.template_id
|
|
73
|
+
|
|
74
|
+
alias = self.alias
|
|
75
|
+
|
|
76
|
+
metadata = self.metadata
|
|
77
|
+
|
|
78
|
+
volume_mounts: Union[Unset, list[dict[str, Any]]] = UNSET
|
|
79
|
+
if not isinstance(self.volume_mounts, Unset):
|
|
80
|
+
volume_mounts = []
|
|
81
|
+
for volume_mounts_item_data in self.volume_mounts:
|
|
82
|
+
volume_mounts_item = volume_mounts_item_data.to_dict()
|
|
83
|
+
volume_mounts.append(volume_mounts_item)
|
|
84
|
+
|
|
85
|
+
field_dict: dict[str, Any] = {}
|
|
86
|
+
field_dict.update(self.additional_properties)
|
|
87
|
+
field_dict.update(
|
|
88
|
+
{
|
|
89
|
+
"clientID": client_id,
|
|
90
|
+
"cpuCount": cpu_count,
|
|
91
|
+
"diskSizeMB": disk_size_mb,
|
|
92
|
+
"endAt": end_at,
|
|
93
|
+
"envdVersion": envd_version,
|
|
94
|
+
"memoryMB": memory_mb,
|
|
95
|
+
"sandboxID": sandbox_id,
|
|
96
|
+
"startedAt": started_at,
|
|
97
|
+
"state": state,
|
|
98
|
+
"templateID": template_id,
|
|
99
|
+
}
|
|
100
|
+
)
|
|
101
|
+
if alias is not UNSET:
|
|
102
|
+
field_dict["alias"] = alias
|
|
103
|
+
if metadata is not UNSET:
|
|
104
|
+
field_dict["metadata"] = metadata
|
|
105
|
+
if volume_mounts is not UNSET:
|
|
106
|
+
field_dict["volumeMounts"] = volume_mounts
|
|
107
|
+
|
|
108
|
+
return field_dict
|
|
109
|
+
|
|
110
|
+
@classmethod
|
|
111
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
112
|
+
from ..models.sandbox_volume_mount import SandboxVolumeMount
|
|
113
|
+
|
|
114
|
+
d = dict(src_dict)
|
|
115
|
+
client_id = d.pop("clientID")
|
|
116
|
+
|
|
117
|
+
cpu_count = d.pop("cpuCount")
|
|
118
|
+
|
|
119
|
+
disk_size_mb = d.pop("diskSizeMB")
|
|
120
|
+
|
|
121
|
+
end_at = isoparse(d.pop("endAt"))
|
|
122
|
+
|
|
123
|
+
envd_version = d.pop("envdVersion")
|
|
124
|
+
|
|
125
|
+
memory_mb = d.pop("memoryMB")
|
|
126
|
+
|
|
127
|
+
sandbox_id = d.pop("sandboxID")
|
|
128
|
+
|
|
129
|
+
started_at = isoparse(d.pop("startedAt"))
|
|
130
|
+
|
|
131
|
+
state = SandboxState(d.pop("state"))
|
|
132
|
+
|
|
133
|
+
template_id = d.pop("templateID")
|
|
134
|
+
|
|
135
|
+
alias = d.pop("alias", UNSET)
|
|
136
|
+
|
|
137
|
+
metadata = d.pop("metadata", UNSET)
|
|
138
|
+
|
|
139
|
+
volume_mounts = []
|
|
140
|
+
_volume_mounts = d.pop("volumeMounts", UNSET)
|
|
141
|
+
for volume_mounts_item_data in _volume_mounts or []:
|
|
142
|
+
volume_mounts_item = SandboxVolumeMount.from_dict(volume_mounts_item_data)
|
|
143
|
+
|
|
144
|
+
volume_mounts.append(volume_mounts_item)
|
|
145
|
+
|
|
146
|
+
listed_sandbox = cls(
|
|
147
|
+
client_id=client_id,
|
|
148
|
+
cpu_count=cpu_count,
|
|
149
|
+
disk_size_mb=disk_size_mb,
|
|
150
|
+
end_at=end_at,
|
|
151
|
+
envd_version=envd_version,
|
|
152
|
+
memory_mb=memory_mb,
|
|
153
|
+
sandbox_id=sandbox_id,
|
|
154
|
+
started_at=started_at,
|
|
155
|
+
state=state,
|
|
156
|
+
template_id=template_id,
|
|
157
|
+
alias=alias,
|
|
158
|
+
metadata=metadata,
|
|
159
|
+
volume_mounts=volume_mounts,
|
|
160
|
+
)
|
|
161
|
+
|
|
162
|
+
listed_sandbox.additional_properties = d
|
|
163
|
+
return listed_sandbox
|
|
164
|
+
|
|
165
|
+
@property
|
|
166
|
+
def additional_keys(self) -> list[str]:
|
|
167
|
+
return list(self.additional_properties.keys())
|
|
168
|
+
|
|
169
|
+
def __getitem__(self, key: str) -> Any:
|
|
170
|
+
return self.additional_properties[key]
|
|
171
|
+
|
|
172
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
173
|
+
self.additional_properties[key] = value
|
|
174
|
+
|
|
175
|
+
def __delitem__(self, key: str) -> None:
|
|
176
|
+
del self.additional_properties[key]
|
|
177
|
+
|
|
178
|
+
def __contains__(self, key: str) -> bool:
|
|
179
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="MachineInfo")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class MachineInfo:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
cpu_architecture (str): CPU architecture of the node
|
|
15
|
+
cpu_family (str): CPU family of the node
|
|
16
|
+
cpu_model (str): CPU model of the node
|
|
17
|
+
cpu_model_name (str): CPU model name of the node
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
cpu_architecture: str
|
|
21
|
+
cpu_family: str
|
|
22
|
+
cpu_model: str
|
|
23
|
+
cpu_model_name: str
|
|
24
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
25
|
+
|
|
26
|
+
def to_dict(self) -> dict[str, Any]:
|
|
27
|
+
cpu_architecture = self.cpu_architecture
|
|
28
|
+
|
|
29
|
+
cpu_family = self.cpu_family
|
|
30
|
+
|
|
31
|
+
cpu_model = self.cpu_model
|
|
32
|
+
|
|
33
|
+
cpu_model_name = self.cpu_model_name
|
|
34
|
+
|
|
35
|
+
field_dict: dict[str, Any] = {}
|
|
36
|
+
field_dict.update(self.additional_properties)
|
|
37
|
+
field_dict.update(
|
|
38
|
+
{
|
|
39
|
+
"cpuArchitecture": cpu_architecture,
|
|
40
|
+
"cpuFamily": cpu_family,
|
|
41
|
+
"cpuModel": cpu_model,
|
|
42
|
+
"cpuModelName": cpu_model_name,
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
return field_dict
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
50
|
+
d = dict(src_dict)
|
|
51
|
+
cpu_architecture = d.pop("cpuArchitecture")
|
|
52
|
+
|
|
53
|
+
cpu_family = d.pop("cpuFamily")
|
|
54
|
+
|
|
55
|
+
cpu_model = d.pop("cpuModel")
|
|
56
|
+
|
|
57
|
+
cpu_model_name = d.pop("cpuModelName")
|
|
58
|
+
|
|
59
|
+
machine_info = cls(
|
|
60
|
+
cpu_architecture=cpu_architecture,
|
|
61
|
+
cpu_family=cpu_family,
|
|
62
|
+
cpu_model=cpu_model,
|
|
63
|
+
cpu_model_name=cpu_model_name,
|
|
64
|
+
)
|
|
65
|
+
|
|
66
|
+
machine_info.additional_properties = d
|
|
67
|
+
return machine_info
|
|
68
|
+
|
|
69
|
+
@property
|
|
70
|
+
def additional_keys(self) -> list[str]:
|
|
71
|
+
return list(self.additional_properties.keys())
|
|
72
|
+
|
|
73
|
+
def __getitem__(self, key: str) -> Any:
|
|
74
|
+
return self.additional_properties[key]
|
|
75
|
+
|
|
76
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
77
|
+
self.additional_properties[key] = value
|
|
78
|
+
|
|
79
|
+
def __delitem__(self, key: str) -> None:
|
|
80
|
+
del self.additional_properties[key]
|
|
81
|
+
|
|
82
|
+
def __contains__(self, key: str) -> bool:
|
|
83
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar
|
|
4
|
+
|
|
5
|
+
from attrs import define as _attrs_define
|
|
6
|
+
from attrs import field as _attrs_field
|
|
7
|
+
from dateutil.parser import isoparse
|
|
8
|
+
|
|
9
|
+
T = TypeVar("T", bound="MaxTeamMetric")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class MaxTeamMetric:
|
|
14
|
+
"""Team metric with timestamp
|
|
15
|
+
|
|
16
|
+
Attributes:
|
|
17
|
+
timestamp (datetime.datetime): Timestamp of the metric entry
|
|
18
|
+
timestamp_unix (int): Timestamp of the metric entry in Unix time (seconds since epoch)
|
|
19
|
+
value (float): The maximum value of the requested metric in the given interval
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
timestamp: datetime.datetime
|
|
23
|
+
timestamp_unix: int
|
|
24
|
+
value: float
|
|
25
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
26
|
+
|
|
27
|
+
def to_dict(self) -> dict[str, Any]:
|
|
28
|
+
timestamp = self.timestamp.isoformat()
|
|
29
|
+
|
|
30
|
+
timestamp_unix = self.timestamp_unix
|
|
31
|
+
|
|
32
|
+
value = self.value
|
|
33
|
+
|
|
34
|
+
field_dict: dict[str, Any] = {}
|
|
35
|
+
field_dict.update(self.additional_properties)
|
|
36
|
+
field_dict.update(
|
|
37
|
+
{
|
|
38
|
+
"timestamp": timestamp,
|
|
39
|
+
"timestampUnix": timestamp_unix,
|
|
40
|
+
"value": value,
|
|
41
|
+
}
|
|
42
|
+
)
|
|
43
|
+
|
|
44
|
+
return field_dict
|
|
45
|
+
|
|
46
|
+
@classmethod
|
|
47
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
48
|
+
d = dict(src_dict)
|
|
49
|
+
timestamp = isoparse(d.pop("timestamp"))
|
|
50
|
+
|
|
51
|
+
timestamp_unix = d.pop("timestampUnix")
|
|
52
|
+
|
|
53
|
+
value = d.pop("value")
|
|
54
|
+
|
|
55
|
+
max_team_metric = cls(
|
|
56
|
+
timestamp=timestamp,
|
|
57
|
+
timestamp_unix=timestamp_unix,
|
|
58
|
+
value=value,
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
max_team_metric.additional_properties = d
|
|
62
|
+
return max_team_metric
|
|
63
|
+
|
|
64
|
+
@property
|
|
65
|
+
def additional_keys(self) -> list[str]:
|
|
66
|
+
return list(self.additional_properties.keys())
|
|
67
|
+
|
|
68
|
+
def __getitem__(self, key: str) -> Any:
|
|
69
|
+
return self.additional_properties[key]
|
|
70
|
+
|
|
71
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
72
|
+
self.additional_properties[key] = value
|
|
73
|
+
|
|
74
|
+
def __delitem__(self, key: str) -> None:
|
|
75
|
+
del self.additional_properties[key]
|
|
76
|
+
|
|
77
|
+
def __contains__(self, key: str) -> bool:
|
|
78
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="McpType0")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class McpType0:
|
|
12
|
+
"""MCP configuration for the sandbox"""
|
|
13
|
+
|
|
14
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
15
|
+
|
|
16
|
+
def to_dict(self) -> dict[str, Any]:
|
|
17
|
+
field_dict: dict[str, Any] = {}
|
|
18
|
+
field_dict.update(self.additional_properties)
|
|
19
|
+
|
|
20
|
+
return field_dict
|
|
21
|
+
|
|
22
|
+
@classmethod
|
|
23
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
24
|
+
d = dict(src_dict)
|
|
25
|
+
mcp_type_0 = cls()
|
|
26
|
+
|
|
27
|
+
mcp_type_0.additional_properties = d
|
|
28
|
+
return mcp_type_0
|
|
29
|
+
|
|
30
|
+
@property
|
|
31
|
+
def additional_keys(self) -> list[str]:
|
|
32
|
+
return list(self.additional_properties.keys())
|
|
33
|
+
|
|
34
|
+
def __getitem__(self, key: str) -> Any:
|
|
35
|
+
return self.additional_properties[key]
|
|
36
|
+
|
|
37
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
38
|
+
self.additional_properties[key] = value
|
|
39
|
+
|
|
40
|
+
def __delitem__(self, key: str) -> None:
|
|
41
|
+
del self.additional_properties[key]
|
|
42
|
+
|
|
43
|
+
def __contains__(self, key: str) -> bool:
|
|
44
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
T = TypeVar("T", bound="NewAccessToken")
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
@_attrs_define
|
|
11
|
+
class NewAccessToken:
|
|
12
|
+
"""
|
|
13
|
+
Attributes:
|
|
14
|
+
name (str): Name of the access token
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
name: str
|
|
18
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
19
|
+
|
|
20
|
+
def to_dict(self) -> dict[str, Any]:
|
|
21
|
+
name = self.name
|
|
22
|
+
|
|
23
|
+
field_dict: dict[str, Any] = {}
|
|
24
|
+
field_dict.update(self.additional_properties)
|
|
25
|
+
field_dict.update(
|
|
26
|
+
{
|
|
27
|
+
"name": name,
|
|
28
|
+
}
|
|
29
|
+
)
|
|
30
|
+
|
|
31
|
+
return field_dict
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
35
|
+
d = dict(src_dict)
|
|
36
|
+
name = d.pop("name")
|
|
37
|
+
|
|
38
|
+
new_access_token = cls(
|
|
39
|
+
name=name,
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
new_access_token.additional_properties = d
|
|
43
|
+
return new_access_token
|
|
44
|
+
|
|
45
|
+
@property
|
|
46
|
+
def additional_keys(self) -> list[str]:
|
|
47
|
+
return list(self.additional_properties.keys())
|
|
48
|
+
|
|
49
|
+
def __getitem__(self, key: str) -> Any:
|
|
50
|
+
return self.additional_properties[key]
|
|
51
|
+
|
|
52
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
53
|
+
self.additional_properties[key] = value
|
|
54
|
+
|
|
55
|
+
def __delitem__(self, key: str) -> None:
|
|
56
|
+
del self.additional_properties[key]
|
|
57
|
+
|
|
58
|
+
def __contains__(self, key: str) -> bool:
|
|
59
|
+
return key in self.additional_properties
|