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,139 @@
|
|
|
1
|
+
import datetime
|
|
2
|
+
from collections.abc import Mapping
|
|
3
|
+
from typing import Any, TypeVar, Union
|
|
4
|
+
from uuid import UUID
|
|
5
|
+
|
|
6
|
+
from attrs import define as _attrs_define
|
|
7
|
+
from attrs import field as _attrs_field
|
|
8
|
+
from dateutil.parser import isoparse
|
|
9
|
+
|
|
10
|
+
from ..models.template_build_status import TemplateBuildStatus
|
|
11
|
+
from ..types import UNSET, Unset
|
|
12
|
+
|
|
13
|
+
T = TypeVar("T", bound="TemplateBuild")
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
@_attrs_define
|
|
17
|
+
class TemplateBuild:
|
|
18
|
+
"""
|
|
19
|
+
Attributes:
|
|
20
|
+
build_id (UUID): Identifier of the build
|
|
21
|
+
cpu_count (int): CPU cores for the sandbox
|
|
22
|
+
created_at (datetime.datetime): Time when the build was created
|
|
23
|
+
memory_mb (int): Memory for the sandbox in MiB
|
|
24
|
+
status (TemplateBuildStatus): Status of the template build
|
|
25
|
+
updated_at (datetime.datetime): Time when the build was last updated
|
|
26
|
+
disk_size_mb (Union[Unset, int]): Disk size for the sandbox in MiB
|
|
27
|
+
envd_version (Union[Unset, str]): Version of the envd running in the sandbox
|
|
28
|
+
finished_at (Union[Unset, datetime.datetime]): Time when the build was finished
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
build_id: UUID
|
|
32
|
+
cpu_count: int
|
|
33
|
+
created_at: datetime.datetime
|
|
34
|
+
memory_mb: int
|
|
35
|
+
status: TemplateBuildStatus
|
|
36
|
+
updated_at: datetime.datetime
|
|
37
|
+
disk_size_mb: Union[Unset, int] = UNSET
|
|
38
|
+
envd_version: Union[Unset, str] = UNSET
|
|
39
|
+
finished_at: Union[Unset, datetime.datetime] = UNSET
|
|
40
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
41
|
+
|
|
42
|
+
def to_dict(self) -> dict[str, Any]:
|
|
43
|
+
build_id = str(self.build_id)
|
|
44
|
+
|
|
45
|
+
cpu_count = self.cpu_count
|
|
46
|
+
|
|
47
|
+
created_at = self.created_at.isoformat()
|
|
48
|
+
|
|
49
|
+
memory_mb = self.memory_mb
|
|
50
|
+
|
|
51
|
+
status = self.status.value
|
|
52
|
+
|
|
53
|
+
updated_at = self.updated_at.isoformat()
|
|
54
|
+
|
|
55
|
+
disk_size_mb = self.disk_size_mb
|
|
56
|
+
|
|
57
|
+
envd_version = self.envd_version
|
|
58
|
+
|
|
59
|
+
finished_at: Union[Unset, str] = UNSET
|
|
60
|
+
if not isinstance(self.finished_at, Unset):
|
|
61
|
+
finished_at = self.finished_at.isoformat()
|
|
62
|
+
|
|
63
|
+
field_dict: dict[str, Any] = {}
|
|
64
|
+
field_dict.update(self.additional_properties)
|
|
65
|
+
field_dict.update(
|
|
66
|
+
{
|
|
67
|
+
"buildID": build_id,
|
|
68
|
+
"cpuCount": cpu_count,
|
|
69
|
+
"createdAt": created_at,
|
|
70
|
+
"memoryMB": memory_mb,
|
|
71
|
+
"status": status,
|
|
72
|
+
"updatedAt": updated_at,
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
if disk_size_mb is not UNSET:
|
|
76
|
+
field_dict["diskSizeMB"] = disk_size_mb
|
|
77
|
+
if envd_version is not UNSET:
|
|
78
|
+
field_dict["envdVersion"] = envd_version
|
|
79
|
+
if finished_at is not UNSET:
|
|
80
|
+
field_dict["finishedAt"] = finished_at
|
|
81
|
+
|
|
82
|
+
return field_dict
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
86
|
+
d = dict(src_dict)
|
|
87
|
+
build_id = UUID(d.pop("buildID"))
|
|
88
|
+
|
|
89
|
+
cpu_count = d.pop("cpuCount")
|
|
90
|
+
|
|
91
|
+
created_at = isoparse(d.pop("createdAt"))
|
|
92
|
+
|
|
93
|
+
memory_mb = d.pop("memoryMB")
|
|
94
|
+
|
|
95
|
+
status = TemplateBuildStatus(d.pop("status"))
|
|
96
|
+
|
|
97
|
+
updated_at = isoparse(d.pop("updatedAt"))
|
|
98
|
+
|
|
99
|
+
disk_size_mb = d.pop("diskSizeMB", UNSET)
|
|
100
|
+
|
|
101
|
+
envd_version = d.pop("envdVersion", UNSET)
|
|
102
|
+
|
|
103
|
+
_finished_at = d.pop("finishedAt", UNSET)
|
|
104
|
+
finished_at: Union[Unset, datetime.datetime]
|
|
105
|
+
if isinstance(_finished_at, Unset):
|
|
106
|
+
finished_at = UNSET
|
|
107
|
+
else:
|
|
108
|
+
finished_at = isoparse(_finished_at)
|
|
109
|
+
|
|
110
|
+
template_build = cls(
|
|
111
|
+
build_id=build_id,
|
|
112
|
+
cpu_count=cpu_count,
|
|
113
|
+
created_at=created_at,
|
|
114
|
+
memory_mb=memory_mb,
|
|
115
|
+
status=status,
|
|
116
|
+
updated_at=updated_at,
|
|
117
|
+
disk_size_mb=disk_size_mb,
|
|
118
|
+
envd_version=envd_version,
|
|
119
|
+
finished_at=finished_at,
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
template_build.additional_properties = d
|
|
123
|
+
return template_build
|
|
124
|
+
|
|
125
|
+
@property
|
|
126
|
+
def additional_keys(self) -> list[str]:
|
|
127
|
+
return list(self.additional_properties.keys())
|
|
128
|
+
|
|
129
|
+
def __getitem__(self, key: str) -> Any:
|
|
130
|
+
return self.additional_properties[key]
|
|
131
|
+
|
|
132
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
133
|
+
self.additional_properties[key] = value
|
|
134
|
+
|
|
135
|
+
def __delitem__(self, key: str) -> None:
|
|
136
|
+
del self.additional_properties[key]
|
|
137
|
+
|
|
138
|
+
def __contains__(self, key: str) -> bool:
|
|
139
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
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="TemplateBuildFileUpload")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class TemplateBuildFileUpload:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
present (bool): Whether the file is already present in the cache
|
|
17
|
+
url (Union[Unset, str]): Url where the file should be uploaded to
|
|
18
|
+
"""
|
|
19
|
+
|
|
20
|
+
present: bool
|
|
21
|
+
url: Union[Unset, str] = UNSET
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
present = self.present
|
|
26
|
+
|
|
27
|
+
url = self.url
|
|
28
|
+
|
|
29
|
+
field_dict: dict[str, Any] = {}
|
|
30
|
+
field_dict.update(self.additional_properties)
|
|
31
|
+
field_dict.update(
|
|
32
|
+
{
|
|
33
|
+
"present": present,
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
if url is not UNSET:
|
|
37
|
+
field_dict["url"] = url
|
|
38
|
+
|
|
39
|
+
return field_dict
|
|
40
|
+
|
|
41
|
+
@classmethod
|
|
42
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
43
|
+
d = dict(src_dict)
|
|
44
|
+
present = d.pop("present")
|
|
45
|
+
|
|
46
|
+
url = d.pop("url", UNSET)
|
|
47
|
+
|
|
48
|
+
template_build_file_upload = cls(
|
|
49
|
+
present=present,
|
|
50
|
+
url=url,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
template_build_file_upload.additional_properties = d
|
|
54
|
+
return template_build_file_upload
|
|
55
|
+
|
|
56
|
+
@property
|
|
57
|
+
def additional_keys(self) -> list[str]:
|
|
58
|
+
return list(self.additional_properties.keys())
|
|
59
|
+
|
|
60
|
+
def __getitem__(self, key: str) -> Any:
|
|
61
|
+
return self.additional_properties[key]
|
|
62
|
+
|
|
63
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
64
|
+
self.additional_properties[key] = value
|
|
65
|
+
|
|
66
|
+
def __delitem__(self, key: str) -> None:
|
|
67
|
+
del self.additional_properties[key]
|
|
68
|
+
|
|
69
|
+
def __contains__(self, key: str) -> bool:
|
|
70
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar, Union, cast
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
from ..models.template_build_status import TemplateBuildStatus
|
|
8
|
+
from ..types import UNSET, Unset
|
|
9
|
+
|
|
10
|
+
if TYPE_CHECKING:
|
|
11
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
12
|
+
from ..models.build_status_reason import BuildStatusReason
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
T = TypeVar("T", bound="TemplateBuildInfo")
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
@_attrs_define
|
|
19
|
+
class TemplateBuildInfo:
|
|
20
|
+
"""
|
|
21
|
+
Attributes:
|
|
22
|
+
build_id (str): Identifier of the build
|
|
23
|
+
log_entries (list['BuildLogEntry']): Build logs structured
|
|
24
|
+
logs (list[str]): Build logs
|
|
25
|
+
status (TemplateBuildStatus): Status of the template build
|
|
26
|
+
template_id (str): Identifier of the template
|
|
27
|
+
reason (Union[Unset, BuildStatusReason]):
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
build_id: str
|
|
31
|
+
log_entries: list["BuildLogEntry"]
|
|
32
|
+
logs: list[str]
|
|
33
|
+
status: TemplateBuildStatus
|
|
34
|
+
template_id: str
|
|
35
|
+
reason: Union[Unset, "BuildStatusReason"] = UNSET
|
|
36
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
37
|
+
|
|
38
|
+
def to_dict(self) -> dict[str, Any]:
|
|
39
|
+
build_id = self.build_id
|
|
40
|
+
|
|
41
|
+
log_entries = []
|
|
42
|
+
for log_entries_item_data in self.log_entries:
|
|
43
|
+
log_entries_item = log_entries_item_data.to_dict()
|
|
44
|
+
log_entries.append(log_entries_item)
|
|
45
|
+
|
|
46
|
+
logs = self.logs
|
|
47
|
+
|
|
48
|
+
status = self.status.value
|
|
49
|
+
|
|
50
|
+
template_id = self.template_id
|
|
51
|
+
|
|
52
|
+
reason: Union[Unset, dict[str, Any]] = UNSET
|
|
53
|
+
if not isinstance(self.reason, Unset):
|
|
54
|
+
reason = self.reason.to_dict()
|
|
55
|
+
|
|
56
|
+
field_dict: dict[str, Any] = {}
|
|
57
|
+
field_dict.update(self.additional_properties)
|
|
58
|
+
field_dict.update(
|
|
59
|
+
{
|
|
60
|
+
"buildID": build_id,
|
|
61
|
+
"logEntries": log_entries,
|
|
62
|
+
"logs": logs,
|
|
63
|
+
"status": status,
|
|
64
|
+
"templateID": template_id,
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
if reason is not UNSET:
|
|
68
|
+
field_dict["reason"] = reason
|
|
69
|
+
|
|
70
|
+
return field_dict
|
|
71
|
+
|
|
72
|
+
@classmethod
|
|
73
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
74
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
75
|
+
from ..models.build_status_reason import BuildStatusReason
|
|
76
|
+
|
|
77
|
+
d = dict(src_dict)
|
|
78
|
+
build_id = d.pop("buildID")
|
|
79
|
+
|
|
80
|
+
log_entries = []
|
|
81
|
+
_log_entries = d.pop("logEntries")
|
|
82
|
+
for log_entries_item_data in _log_entries:
|
|
83
|
+
log_entries_item = BuildLogEntry.from_dict(log_entries_item_data)
|
|
84
|
+
|
|
85
|
+
log_entries.append(log_entries_item)
|
|
86
|
+
|
|
87
|
+
logs = cast(list[str], d.pop("logs"))
|
|
88
|
+
|
|
89
|
+
status = TemplateBuildStatus(d.pop("status"))
|
|
90
|
+
|
|
91
|
+
template_id = d.pop("templateID")
|
|
92
|
+
|
|
93
|
+
_reason = d.pop("reason", UNSET)
|
|
94
|
+
reason: Union[Unset, BuildStatusReason]
|
|
95
|
+
if isinstance(_reason, Unset):
|
|
96
|
+
reason = UNSET
|
|
97
|
+
else:
|
|
98
|
+
reason = BuildStatusReason.from_dict(_reason)
|
|
99
|
+
|
|
100
|
+
template_build_info = cls(
|
|
101
|
+
build_id=build_id,
|
|
102
|
+
log_entries=log_entries,
|
|
103
|
+
logs=logs,
|
|
104
|
+
status=status,
|
|
105
|
+
template_id=template_id,
|
|
106
|
+
reason=reason,
|
|
107
|
+
)
|
|
108
|
+
|
|
109
|
+
template_build_info.additional_properties = d
|
|
110
|
+
return template_build_info
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def additional_keys(self) -> list[str]:
|
|
114
|
+
return list(self.additional_properties.keys())
|
|
115
|
+
|
|
116
|
+
def __getitem__(self, key: str) -> Any:
|
|
117
|
+
return self.additional_properties[key]
|
|
118
|
+
|
|
119
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
120
|
+
self.additional_properties[key] = value
|
|
121
|
+
|
|
122
|
+
def __delitem__(self, key: str) -> None:
|
|
123
|
+
del self.additional_properties[key]
|
|
124
|
+
|
|
125
|
+
def __contains__(self, key: str) -> bool:
|
|
126
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import TYPE_CHECKING, Any, TypeVar
|
|
3
|
+
|
|
4
|
+
from attrs import define as _attrs_define
|
|
5
|
+
from attrs import field as _attrs_field
|
|
6
|
+
|
|
7
|
+
if TYPE_CHECKING:
|
|
8
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
T = TypeVar("T", bound="TemplateBuildLogsResponse")
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@_attrs_define
|
|
15
|
+
class TemplateBuildLogsResponse:
|
|
16
|
+
"""
|
|
17
|
+
Attributes:
|
|
18
|
+
logs (list['BuildLogEntry']): Build logs structured
|
|
19
|
+
"""
|
|
20
|
+
|
|
21
|
+
logs: list["BuildLogEntry"]
|
|
22
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
23
|
+
|
|
24
|
+
def to_dict(self) -> dict[str, Any]:
|
|
25
|
+
logs = []
|
|
26
|
+
for logs_item_data in self.logs:
|
|
27
|
+
logs_item = logs_item_data.to_dict()
|
|
28
|
+
logs.append(logs_item)
|
|
29
|
+
|
|
30
|
+
field_dict: dict[str, Any] = {}
|
|
31
|
+
field_dict.update(self.additional_properties)
|
|
32
|
+
field_dict.update(
|
|
33
|
+
{
|
|
34
|
+
"logs": logs,
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
return field_dict
|
|
39
|
+
|
|
40
|
+
@classmethod
|
|
41
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
42
|
+
from ..models.build_log_entry import BuildLogEntry
|
|
43
|
+
|
|
44
|
+
d = dict(src_dict)
|
|
45
|
+
logs = []
|
|
46
|
+
_logs = d.pop("logs")
|
|
47
|
+
for logs_item_data in _logs:
|
|
48
|
+
logs_item = BuildLogEntry.from_dict(logs_item_data)
|
|
49
|
+
|
|
50
|
+
logs.append(logs_item)
|
|
51
|
+
|
|
52
|
+
template_build_logs_response = cls(
|
|
53
|
+
logs=logs,
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
template_build_logs_response.additional_properties = d
|
|
57
|
+
return template_build_logs_response
|
|
58
|
+
|
|
59
|
+
@property
|
|
60
|
+
def additional_keys(self) -> list[str]:
|
|
61
|
+
return list(self.additional_properties.keys())
|
|
62
|
+
|
|
63
|
+
def __getitem__(self, key: str) -> Any:
|
|
64
|
+
return self.additional_properties[key]
|
|
65
|
+
|
|
66
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
67
|
+
self.additional_properties[key] = value
|
|
68
|
+
|
|
69
|
+
def __delitem__(self, key: str) -> None:
|
|
70
|
+
del self.additional_properties[key]
|
|
71
|
+
|
|
72
|
+
def __contains__(self, key: str) -> bool:
|
|
73
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
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="TemplateBuildRequest")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class TemplateBuildRequest:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
dockerfile (str): Dockerfile for the template
|
|
17
|
+
alias (Union[Unset, str]): Alias of the template
|
|
18
|
+
cpu_count (Union[Unset, int]): CPU cores for the sandbox
|
|
19
|
+
memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
|
|
20
|
+
ready_cmd (Union[Unset, str]): Ready check command to execute in the template after the build
|
|
21
|
+
start_cmd (Union[Unset, str]): Start command to execute in the template after the build
|
|
22
|
+
team_id (Union[Unset, str]): Identifier of the team
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
dockerfile: str
|
|
26
|
+
alias: Union[Unset, str] = UNSET
|
|
27
|
+
cpu_count: Union[Unset, int] = UNSET
|
|
28
|
+
memory_mb: Union[Unset, int] = UNSET
|
|
29
|
+
ready_cmd: Union[Unset, str] = UNSET
|
|
30
|
+
start_cmd: Union[Unset, str] = UNSET
|
|
31
|
+
team_id: Union[Unset, str] = UNSET
|
|
32
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
33
|
+
|
|
34
|
+
def to_dict(self) -> dict[str, Any]:
|
|
35
|
+
dockerfile = self.dockerfile
|
|
36
|
+
|
|
37
|
+
alias = self.alias
|
|
38
|
+
|
|
39
|
+
cpu_count = self.cpu_count
|
|
40
|
+
|
|
41
|
+
memory_mb = self.memory_mb
|
|
42
|
+
|
|
43
|
+
ready_cmd = self.ready_cmd
|
|
44
|
+
|
|
45
|
+
start_cmd = self.start_cmd
|
|
46
|
+
|
|
47
|
+
team_id = self.team_id
|
|
48
|
+
|
|
49
|
+
field_dict: dict[str, Any] = {}
|
|
50
|
+
field_dict.update(self.additional_properties)
|
|
51
|
+
field_dict.update(
|
|
52
|
+
{
|
|
53
|
+
"dockerfile": dockerfile,
|
|
54
|
+
}
|
|
55
|
+
)
|
|
56
|
+
if alias is not UNSET:
|
|
57
|
+
field_dict["alias"] = alias
|
|
58
|
+
if cpu_count is not UNSET:
|
|
59
|
+
field_dict["cpuCount"] = cpu_count
|
|
60
|
+
if memory_mb is not UNSET:
|
|
61
|
+
field_dict["memoryMB"] = memory_mb
|
|
62
|
+
if ready_cmd is not UNSET:
|
|
63
|
+
field_dict["readyCmd"] = ready_cmd
|
|
64
|
+
if start_cmd is not UNSET:
|
|
65
|
+
field_dict["startCmd"] = start_cmd
|
|
66
|
+
if team_id is not UNSET:
|
|
67
|
+
field_dict["teamID"] = team_id
|
|
68
|
+
|
|
69
|
+
return field_dict
|
|
70
|
+
|
|
71
|
+
@classmethod
|
|
72
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
73
|
+
d = dict(src_dict)
|
|
74
|
+
dockerfile = d.pop("dockerfile")
|
|
75
|
+
|
|
76
|
+
alias = d.pop("alias", UNSET)
|
|
77
|
+
|
|
78
|
+
cpu_count = d.pop("cpuCount", UNSET)
|
|
79
|
+
|
|
80
|
+
memory_mb = d.pop("memoryMB", UNSET)
|
|
81
|
+
|
|
82
|
+
ready_cmd = d.pop("readyCmd", UNSET)
|
|
83
|
+
|
|
84
|
+
start_cmd = d.pop("startCmd", UNSET)
|
|
85
|
+
|
|
86
|
+
team_id = d.pop("teamID", UNSET)
|
|
87
|
+
|
|
88
|
+
template_build_request = cls(
|
|
89
|
+
dockerfile=dockerfile,
|
|
90
|
+
alias=alias,
|
|
91
|
+
cpu_count=cpu_count,
|
|
92
|
+
memory_mb=memory_mb,
|
|
93
|
+
ready_cmd=ready_cmd,
|
|
94
|
+
start_cmd=start_cmd,
|
|
95
|
+
team_id=team_id,
|
|
96
|
+
)
|
|
97
|
+
|
|
98
|
+
template_build_request.additional_properties = d
|
|
99
|
+
return template_build_request
|
|
100
|
+
|
|
101
|
+
@property
|
|
102
|
+
def additional_keys(self) -> list[str]:
|
|
103
|
+
return list(self.additional_properties.keys())
|
|
104
|
+
|
|
105
|
+
def __getitem__(self, key: str) -> Any:
|
|
106
|
+
return self.additional_properties[key]
|
|
107
|
+
|
|
108
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
109
|
+
self.additional_properties[key] = value
|
|
110
|
+
|
|
111
|
+
def __delitem__(self, key: str) -> None:
|
|
112
|
+
del self.additional_properties[key]
|
|
113
|
+
|
|
114
|
+
def __contains__(self, key: str) -> bool:
|
|
115
|
+
return key in self.additional_properties
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
from collections.abc import Mapping
|
|
2
|
+
from typing import Any, TypeVar, Union
|
|
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="TemplateBuildRequestV2")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
@_attrs_define
|
|
13
|
+
class TemplateBuildRequestV2:
|
|
14
|
+
"""
|
|
15
|
+
Attributes:
|
|
16
|
+
alias (str): Alias of the template
|
|
17
|
+
cpu_count (Union[Unset, int]): CPU cores for the sandbox
|
|
18
|
+
memory_mb (Union[Unset, int]): Memory for the sandbox in MiB
|
|
19
|
+
team_id (Union[Unset, str]): Identifier of the team
|
|
20
|
+
"""
|
|
21
|
+
|
|
22
|
+
alias: str
|
|
23
|
+
cpu_count: Union[Unset, int] = UNSET
|
|
24
|
+
memory_mb: Union[Unset, int] = UNSET
|
|
25
|
+
team_id: Union[Unset, str] = UNSET
|
|
26
|
+
additional_properties: dict[str, Any] = _attrs_field(init=False, factory=dict)
|
|
27
|
+
|
|
28
|
+
def to_dict(self) -> dict[str, Any]:
|
|
29
|
+
alias = self.alias
|
|
30
|
+
|
|
31
|
+
cpu_count = self.cpu_count
|
|
32
|
+
|
|
33
|
+
memory_mb = self.memory_mb
|
|
34
|
+
|
|
35
|
+
team_id = self.team_id
|
|
36
|
+
|
|
37
|
+
field_dict: dict[str, Any] = {}
|
|
38
|
+
field_dict.update(self.additional_properties)
|
|
39
|
+
field_dict.update(
|
|
40
|
+
{
|
|
41
|
+
"alias": alias,
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
if cpu_count is not UNSET:
|
|
45
|
+
field_dict["cpuCount"] = cpu_count
|
|
46
|
+
if memory_mb is not UNSET:
|
|
47
|
+
field_dict["memoryMB"] = memory_mb
|
|
48
|
+
if team_id is not UNSET:
|
|
49
|
+
field_dict["teamID"] = team_id
|
|
50
|
+
|
|
51
|
+
return field_dict
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_dict(cls: type[T], src_dict: Mapping[str, Any]) -> T:
|
|
55
|
+
d = dict(src_dict)
|
|
56
|
+
alias = d.pop("alias")
|
|
57
|
+
|
|
58
|
+
cpu_count = d.pop("cpuCount", UNSET)
|
|
59
|
+
|
|
60
|
+
memory_mb = d.pop("memoryMB", UNSET)
|
|
61
|
+
|
|
62
|
+
team_id = d.pop("teamID", UNSET)
|
|
63
|
+
|
|
64
|
+
template_build_request_v2 = cls(
|
|
65
|
+
alias=alias,
|
|
66
|
+
cpu_count=cpu_count,
|
|
67
|
+
memory_mb=memory_mb,
|
|
68
|
+
team_id=team_id,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
template_build_request_v2.additional_properties = d
|
|
72
|
+
return template_build_request_v2
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def additional_keys(self) -> list[str]:
|
|
76
|
+
return list(self.additional_properties.keys())
|
|
77
|
+
|
|
78
|
+
def __getitem__(self, key: str) -> Any:
|
|
79
|
+
return self.additional_properties[key]
|
|
80
|
+
|
|
81
|
+
def __setitem__(self, key: str, value: Any) -> None:
|
|
82
|
+
self.additional_properties[key] = value
|
|
83
|
+
|
|
84
|
+
def __delitem__(self, key: str) -> None:
|
|
85
|
+
del self.additional_properties[key]
|
|
86
|
+
|
|
87
|
+
def __contains__(self, key: str) -> bool:
|
|
88
|
+
return key in self.additional_properties
|