daytona_api_client_async 0.0.0.dev0__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.
- daytona_api_client_async/__init__.py +195 -0
- daytona_api_client_async/api/__init__.py +21 -0
- daytona_api_client_async/api/api_keys_api.py +1673 -0
- daytona_api_client_async/api/audit_api.py +750 -0
- daytona_api_client_async/api/config_api.py +279 -0
- daytona_api_client_async/api/default_api.py +1884 -0
- daytona_api_client_async/api/docker_registry_api.py +1965 -0
- daytona_api_client_async/api/health_api.py +282 -0
- daytona_api_client_async/api/object_storage_api.py +299 -0
- daytona_api_client_async/api/organizations_api.py +7836 -0
- daytona_api_client_async/api/preview_api.py +826 -0
- daytona_api_client_async/api/regions_api.py +316 -0
- daytona_api_client_async/api/runners_api.py +1560 -0
- daytona_api_client_async/api/sandbox_api.py +6927 -0
- daytona_api_client_async/api/snapshots_api.py +2630 -0
- daytona_api_client_async/api/toolbox_api.py +20759 -0
- daytona_api_client_async/api/users_api.py +2319 -0
- daytona_api_client_async/api/volumes_api.py +1419 -0
- daytona_api_client_async/api/webhooks_api.py +1704 -0
- daytona_api_client_async/api/workspace_api.py +4036 -0
- daytona_api_client_async/api_client.py +801 -0
- daytona_api_client_async/api_response.py +21 -0
- daytona_api_client_async/configuration.py +579 -0
- daytona_api_client_async/exceptions.py +217 -0
- daytona_api_client_async/models/__init__.py +162 -0
- daytona_api_client_async/models/account_provider.py +103 -0
- daytona_api_client_async/models/announcement.py +103 -0
- daytona_api_client_async/models/api_key_list.py +132 -0
- daytona_api_client_async/models/api_key_response.py +123 -0
- daytona_api_client_async/models/audit_log.py +128 -0
- daytona_api_client_async/models/build_info.py +108 -0
- daytona_api_client_async/models/command.py +105 -0
- daytona_api_client_async/models/completion_context.py +103 -0
- daytona_api_client_async/models/completion_item.py +113 -0
- daytona_api_client_async/models/completion_list.py +111 -0
- daytona_api_client_async/models/compressed_screenshot_response.py +105 -0
- daytona_api_client_async/models/computer_use_start_response.py +103 -0
- daytona_api_client_async/models/computer_use_status_response.py +108 -0
- daytona_api_client_async/models/computer_use_stop_response.py +103 -0
- daytona_api_client_async/models/configuration.py +145 -0
- daytona_api_client_async/models/create_api_key.py +119 -0
- daytona_api_client_async/models/create_audit_log.py +128 -0
- daytona_api_client_async/models/create_build_info.py +103 -0
- daytona_api_client_async/models/create_docker_registry.py +120 -0
- daytona_api_client_async/models/create_linked_account.py +103 -0
- daytona_api_client_async/models/create_organization.py +103 -0
- daytona_api_client_async/models/create_organization_invitation.py +115 -0
- daytona_api_client_async/models/create_organization_quota.py +117 -0
- daytona_api_client_async/models/create_organization_role.py +113 -0
- daytona_api_client_async/models/create_runner.py +130 -0
- daytona_api_client_async/models/create_sandbox.py +159 -0
- daytona_api_client_async/models/create_session_request.py +101 -0
- daytona_api_client_async/models/create_snapshot.py +121 -0
- daytona_api_client_async/models/create_user.py +127 -0
- daytona_api_client_async/models/create_volume.py +101 -0
- daytona_api_client_async/models/create_workspace.py +161 -0
- daytona_api_client_async/models/daytona_configuration.py +158 -0
- daytona_api_client_async/models/display_info_response.py +101 -0
- daytona_api_client_async/models/docker_registry.py +123 -0
- daytona_api_client_async/models/download_files.py +101 -0
- daytona_api_client_async/models/empty_response.py +101 -0
- daytona_api_client_async/models/execute_request.py +105 -0
- daytona_api_client_async/models/execute_response.py +103 -0
- daytona_api_client_async/models/file_info.py +115 -0
- daytona_api_client_async/models/file_status.py +107 -0
- daytona_api_client_async/models/git_add_request.py +103 -0
- daytona_api_client_async/models/git_branch_request.py +103 -0
- daytona_api_client_async/models/git_checkout_request.py +103 -0
- daytona_api_client_async/models/git_clone_request.py +111 -0
- daytona_api_client_async/models/git_commit_info.py +109 -0
- daytona_api_client_async/models/git_commit_request.py +109 -0
- daytona_api_client_async/models/git_commit_response.py +101 -0
- daytona_api_client_async/models/git_delete_branch_request.py +103 -0
- daytona_api_client_async/models/git_repo_request.py +105 -0
- daytona_api_client_async/models/git_status.py +117 -0
- daytona_api_client_async/models/health_controller_check200_response.py +154 -0
- daytona_api_client_async/models/health_controller_check200_response_info_value.py +101 -0
- daytona_api_client_async/models/health_controller_check503_response.py +154 -0
- daytona_api_client_async/models/keyboard_hotkey_request.py +101 -0
- daytona_api_client_async/models/keyboard_hotkey_response.py +103 -0
- daytona_api_client_async/models/keyboard_press_request.py +103 -0
- daytona_api_client_async/models/keyboard_press_response.py +105 -0
- daytona_api_client_async/models/keyboard_type_request.py +103 -0
- daytona_api_client_async/models/keyboard_type_response.py +103 -0
- daytona_api_client_async/models/list_branch_response.py +101 -0
- daytona_api_client_async/models/lsp_completion_params.py +117 -0
- daytona_api_client_async/models/lsp_document_request.py +105 -0
- daytona_api_client_async/models/lsp_location.py +107 -0
- daytona_api_client_async/models/lsp_server_request.py +103 -0
- daytona_api_client_async/models/lsp_symbol.py +109 -0
- daytona_api_client_async/models/match.py +105 -0
- daytona_api_client_async/models/mouse_click_request.py +107 -0
- daytona_api_client_async/models/mouse_click_response.py +103 -0
- daytona_api_client_async/models/mouse_drag_request.py +109 -0
- daytona_api_client_async/models/mouse_drag_response.py +103 -0
- daytona_api_client_async/models/mouse_move_request.py +103 -0
- daytona_api_client_async/models/mouse_move_response.py +103 -0
- daytona_api_client_async/models/mouse_position.py +103 -0
- daytona_api_client_async/models/mouse_scroll_request.py +107 -0
- daytona_api_client_async/models/mouse_scroll_response.py +101 -0
- daytona_api_client_async/models/oidc_config.py +105 -0
- daytona_api_client_async/models/organization.py +153 -0
- daytona_api_client_async/models/organization_invitation.py +144 -0
- daytona_api_client_async/models/organization_role.py +122 -0
- daytona_api_client_async/models/organization_sandbox_default_limited_network_egress.py +101 -0
- daytona_api_client_async/models/organization_sandbox_default_network_block_all.py +101 -0
- daytona_api_client_async/models/organization_suspension.py +106 -0
- daytona_api_client_async/models/organization_usage_overview.py +117 -0
- daytona_api_client_async/models/organization_user.py +131 -0
- daytona_api_client_async/models/paginated_audit_logs.py +117 -0
- daytona_api_client_async/models/paginated_sandboxes.py +115 -0
- daytona_api_client_async/models/paginated_snapshots.py +115 -0
- daytona_api_client_async/models/paginated_snapshots_dto.py +115 -0
- daytona_api_client_async/models/paginated_workspaces.py +115 -0
- daytona_api_client_async/models/port_preview_url.py +105 -0
- daytona_api_client_async/models/position.py +103 -0
- daytona_api_client_async/models/posthog_config.py +103 -0
- daytona_api_client_async/models/process_errors_response.py +103 -0
- daytona_api_client_async/models/process_logs_response.py +103 -0
- daytona_api_client_async/models/process_restart_response.py +103 -0
- daytona_api_client_async/models/process_status_response.py +103 -0
- daytona_api_client_async/models/project_dir_response.py +101 -0
- daytona_api_client_async/models/pty_create_request.py +111 -0
- daytona_api_client_async/models/pty_create_response.py +101 -0
- daytona_api_client_async/models/pty_list_response.py +109 -0
- daytona_api_client_async/models/pty_resize_request.py +103 -0
- daytona_api_client_async/models/pty_session_info.py +115 -0
- daytona_api_client_async/models/range.py +110 -0
- daytona_api_client_async/models/rate_limit_config.py +120 -0
- daytona_api_client_async/models/rate_limit_entry.py +103 -0
- daytona_api_client_async/models/region.py +114 -0
- daytona_api_client_async/models/region_quota.py +109 -0
- daytona_api_client_async/models/region_screenshot_response.py +105 -0
- daytona_api_client_async/models/region_usage_overview.py +113 -0
- daytona_api_client_async/models/registry_push_access_dto.py +111 -0
- daytona_api_client_async/models/replace_request.py +105 -0
- daytona_api_client_async/models/replace_result.py +105 -0
- daytona_api_client_async/models/runner.py +153 -0
- daytona_api_client_async/models/runner_region.py +39 -0
- daytona_api_client_async/models/runner_snapshot_dto.py +105 -0
- daytona_api_client_async/models/runner_state.py +41 -0
- daytona_api_client_async/models/sandbox.py +193 -0
- daytona_api_client_async/models/sandbox_class.py +39 -0
- daytona_api_client_async/models/sandbox_created_post_request.py +110 -0
- daytona_api_client_async/models/sandbox_created_post_request_data.py +152 -0
- daytona_api_client_async/models/sandbox_desired_state.py +41 -0
- daytona_api_client_async/models/sandbox_info.py +105 -0
- daytona_api_client_async/models/sandbox_labels.py +101 -0
- daytona_api_client_async/models/sandbox_state.py +52 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/sandbox_state_updated_post_request_data_sandbox.py +115 -0
- daytona_api_client_async/models/sandbox_volume.py +105 -0
- daytona_api_client_async/models/screenshot_response.py +105 -0
- daytona_api_client_async/models/search_files_response.py +101 -0
- daytona_api_client_async/models/send_webhook_dto.py +105 -0
- daytona_api_client_async/models/session.py +116 -0
- daytona_api_client_async/models/session_command_logs_response.py +103 -0
- daytona_api_client_async/models/session_execute_request.py +105 -0
- daytona_api_client_async/models/session_execute_response.py +105 -0
- daytona_api_client_async/models/set_snapshot_general_status_dto.py +101 -0
- daytona_api_client_async/models/snapshot_created_post_request.py +110 -0
- daytona_api_client_async/models/snapshot_created_post_request_data.py +136 -0
- daytona_api_client_async/models/snapshot_dto.py +159 -0
- daytona_api_client_async/models/snapshot_removed_post_request.py +106 -0
- daytona_api_client_async/models/snapshot_state.py +44 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/snapshot_state_updated_post_request_data_snapshot.py +115 -0
- daytona_api_client_async/models/ssh_access_dto.py +112 -0
- daytona_api_client_async/models/ssh_access_validation_dto.py +103 -0
- daytona_api_client_async/models/storage_access_dto.py +111 -0
- daytona_api_client_async/models/update_assigned_organization_roles.py +101 -0
- daytona_api_client_async/models/update_docker_registry.py +109 -0
- daytona_api_client_async/models/update_organization_default_region.py +101 -0
- daytona_api_client_async/models/update_organization_invitation.py +113 -0
- daytona_api_client_async/models/update_organization_member_access.py +110 -0
- daytona_api_client_async/models/update_organization_member_role.py +108 -0
- daytona_api_client_async/models/update_organization_quota.py +162 -0
- daytona_api_client_async/models/update_organization_region_quota.py +120 -0
- daytona_api_client_async/models/update_organization_role.py +113 -0
- daytona_api_client_async/models/update_sandbox_state_dto.py +110 -0
- daytona_api_client_async/models/user.py +118 -0
- daytona_api_client_async/models/user_home_dir_response.py +101 -0
- daytona_api_client_async/models/user_public_key.py +103 -0
- daytona_api_client_async/models/volume_created_post_request.py +110 -0
- daytona_api_client_async/models/volume_created_post_request_data.py +126 -0
- daytona_api_client_async/models/volume_dto.py +126 -0
- daytona_api_client_async/models/volume_state.py +43 -0
- daytona_api_client_async/models/volume_state_updated_post_request.py +110 -0
- daytona_api_client_async/models/volume_state_updated_post_request_data.py +129 -0
- daytona_api_client_async/models/volume_state_updated_post_request_data_volume.py +115 -0
- daytona_api_client_async/models/webhook_app_portal_access.py +101 -0
- daytona_api_client_async/models/webhook_controller_get_app_portal_access200_response.py +101 -0
- daytona_api_client_async/models/webhook_controller_get_initialization_status200_response.py +118 -0
- daytona_api_client_async/models/webhook_controller_get_status200_response.py +101 -0
- daytona_api_client_async/models/webhook_initialization_status.py +121 -0
- daytona_api_client_async/models/windows_response.py +103 -0
- daytona_api_client_async/models/work_dir_response.py +101 -0
- daytona_api_client_async/models/workdir_response.py +101 -0
- daytona_api_client_async/models/workspace.py +215 -0
- daytona_api_client_async/models/workspace_port_preview_url.py +103 -0
- daytona_api_client_async/py.typed +0 -0
- daytona_api_client_async/rest.py +214 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/METADATA +27 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/RECORD +209 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/WHEEL +5 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/licenses/LICENSE +190 -0
- daytona_api_client_async-0.0.0.dev0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class WorkdirResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WorkdirResponse
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
dir: Optional[StrictStr] = None
|
|
31
|
+
additional_properties: Dict[str, Any] = {}
|
|
32
|
+
__properties: ClassVar[List[str]] = ["dir"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of WorkdirResponse from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
"additional_properties",
|
|
68
|
+
])
|
|
69
|
+
|
|
70
|
+
_dict = self.model_dump(
|
|
71
|
+
by_alias=True,
|
|
72
|
+
exclude=excluded_fields,
|
|
73
|
+
exclude_none=True,
|
|
74
|
+
)
|
|
75
|
+
# puts key-value pairs in additional_properties in the top level
|
|
76
|
+
if self.additional_properties is not None:
|
|
77
|
+
for _key, _value in self.additional_properties.items():
|
|
78
|
+
_dict[_key] = _value
|
|
79
|
+
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of WorkdirResponse from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"dir": obj.get("dir")
|
|
93
|
+
})
|
|
94
|
+
# store additional fields in additional_properties
|
|
95
|
+
for _key in obj.keys():
|
|
96
|
+
if _key not in cls.__properties:
|
|
97
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
98
|
+
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
23
|
+
from daytona_api_client_async.models.build_info import BuildInfo
|
|
24
|
+
from daytona_api_client_async.models.sandbox_desired_state import SandboxDesiredState
|
|
25
|
+
from daytona_api_client_async.models.sandbox_info import SandboxInfo
|
|
26
|
+
from daytona_api_client_async.models.sandbox_state import SandboxState
|
|
27
|
+
from daytona_api_client_async.models.sandbox_volume import SandboxVolume
|
|
28
|
+
from typing import Optional, Set
|
|
29
|
+
from typing_extensions import Self
|
|
30
|
+
|
|
31
|
+
class Workspace(BaseModel):
|
|
32
|
+
"""
|
|
33
|
+
Workspace
|
|
34
|
+
""" # noqa: E501
|
|
35
|
+
id: StrictStr = Field(description="The ID of the sandbox")
|
|
36
|
+
organization_id: StrictStr = Field(description="The organization ID of the sandbox", alias="organizationId")
|
|
37
|
+
name: StrictStr = Field(description="The name of the sandbox")
|
|
38
|
+
snapshot: Optional[StrictStr] = Field(default=None, description="The snapshot used for the sandbox")
|
|
39
|
+
user: StrictStr = Field(description="The user associated with the project")
|
|
40
|
+
env: Dict[str, StrictStr] = Field(description="Environment variables for the sandbox")
|
|
41
|
+
labels: Dict[str, StrictStr] = Field(description="Labels for the sandbox")
|
|
42
|
+
public: StrictBool = Field(description="Whether the sandbox http preview is public")
|
|
43
|
+
network_block_all: StrictBool = Field(description="Whether to block all network access for the sandbox", alias="networkBlockAll")
|
|
44
|
+
network_allow_list: Optional[StrictStr] = Field(default=None, description="Comma-separated list of allowed CIDR network addresses for the sandbox", alias="networkAllowList")
|
|
45
|
+
target: StrictStr = Field(description="The target environment for the sandbox")
|
|
46
|
+
cpu: Union[StrictFloat, StrictInt] = Field(description="The CPU quota for the sandbox")
|
|
47
|
+
gpu: Union[StrictFloat, StrictInt] = Field(description="The GPU quota for the sandbox")
|
|
48
|
+
memory: Union[StrictFloat, StrictInt] = Field(description="The memory quota for the sandbox")
|
|
49
|
+
disk: Union[StrictFloat, StrictInt] = Field(description="The disk quota for the sandbox")
|
|
50
|
+
state: Optional[SandboxState] = Field(default=None, description="The state of the sandbox")
|
|
51
|
+
desired_state: Optional[SandboxDesiredState] = Field(default=None, description="The desired state of the sandbox", alias="desiredState")
|
|
52
|
+
error_reason: Optional[StrictStr] = Field(default=None, description="The error reason of the sandbox", alias="errorReason")
|
|
53
|
+
recoverable: Optional[StrictBool] = Field(default=None, description="Whether the sandbox error is recoverable.")
|
|
54
|
+
backup_state: Optional[StrictStr] = Field(default=None, description="The state of the backup", alias="backupState")
|
|
55
|
+
backup_created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the last backup", alias="backupCreatedAt")
|
|
56
|
+
auto_stop_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Auto-stop interval in minutes (0 means disabled)", alias="autoStopInterval")
|
|
57
|
+
auto_archive_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Auto-archive interval in minutes", alias="autoArchiveInterval")
|
|
58
|
+
auto_delete_interval: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Auto-delete interval in minutes (negative value means disabled, 0 means delete immediately upon stopping)", alias="autoDeleteInterval")
|
|
59
|
+
volumes: Optional[List[SandboxVolume]] = Field(default=None, description="Array of volumes attached to the sandbox")
|
|
60
|
+
build_info: Optional[BuildInfo] = Field(default=None, description="Build information for the sandbox", alias="buildInfo")
|
|
61
|
+
created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the sandbox", alias="createdAt")
|
|
62
|
+
updated_at: Optional[StrictStr] = Field(default=None, description="The last update timestamp of the sandbox", alias="updatedAt")
|
|
63
|
+
var_class: Optional[StrictStr] = Field(default=None, description="The class of the sandbox", alias="class")
|
|
64
|
+
daemon_version: Optional[StrictStr] = Field(default=None, description="The version of the daemon running in the sandbox", alias="daemonVersion")
|
|
65
|
+
image: Optional[StrictStr] = Field(default=None, description="The image used for the workspace")
|
|
66
|
+
snapshot_state: Optional[StrictStr] = Field(default=None, description="The state of the snapshot", alias="snapshotState")
|
|
67
|
+
snapshot_created_at: Optional[StrictStr] = Field(default=None, description="The creation timestamp of the last snapshot", alias="snapshotCreatedAt")
|
|
68
|
+
info: Optional[SandboxInfo] = Field(default=None, description="Additional information about the sandbox")
|
|
69
|
+
additional_properties: Dict[str, Any] = {}
|
|
70
|
+
__properties: ClassVar[List[str]] = ["id", "organizationId", "name", "snapshot", "user", "env", "labels", "public", "networkBlockAll", "networkAllowList", "target", "cpu", "gpu", "memory", "disk", "state", "desiredState", "errorReason", "recoverable", "backupState", "backupCreatedAt", "autoStopInterval", "autoArchiveInterval", "autoDeleteInterval", "volumes", "buildInfo", "createdAt", "updatedAt", "class", "daemonVersion", "image", "snapshotState", "snapshotCreatedAt", "info"]
|
|
71
|
+
|
|
72
|
+
@field_validator('backup_state')
|
|
73
|
+
def backup_state_validate_enum(cls, value):
|
|
74
|
+
"""Validates the enum"""
|
|
75
|
+
if value is None:
|
|
76
|
+
return value
|
|
77
|
+
|
|
78
|
+
if value not in set(['None', 'Pending', 'InProgress', 'Completed', 'Error']):
|
|
79
|
+
raise ValueError("must be one of enum values ('None', 'Pending', 'InProgress', 'Completed', 'Error')")
|
|
80
|
+
return value
|
|
81
|
+
|
|
82
|
+
@field_validator('var_class')
|
|
83
|
+
def var_class_validate_enum(cls, value):
|
|
84
|
+
"""Validates the enum"""
|
|
85
|
+
if value is None:
|
|
86
|
+
return value
|
|
87
|
+
|
|
88
|
+
if value not in set(['small', 'medium', 'large']):
|
|
89
|
+
raise ValueError("must be one of enum values ('small', 'medium', 'large')")
|
|
90
|
+
return value
|
|
91
|
+
|
|
92
|
+
@field_validator('snapshot_state')
|
|
93
|
+
def snapshot_state_validate_enum(cls, value):
|
|
94
|
+
"""Validates the enum"""
|
|
95
|
+
if value is None:
|
|
96
|
+
return value
|
|
97
|
+
|
|
98
|
+
if value not in set(['None', 'Pending', 'InProgress', 'Completed', 'Error']):
|
|
99
|
+
raise ValueError("must be one of enum values ('None', 'Pending', 'InProgress', 'Completed', 'Error')")
|
|
100
|
+
return value
|
|
101
|
+
|
|
102
|
+
model_config = ConfigDict(
|
|
103
|
+
populate_by_name=True,
|
|
104
|
+
validate_assignment=True,
|
|
105
|
+
protected_namespaces=(),
|
|
106
|
+
)
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def to_str(self) -> str:
|
|
110
|
+
"""Returns the string representation of the model using alias"""
|
|
111
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
112
|
+
|
|
113
|
+
def to_json(self) -> str:
|
|
114
|
+
"""Returns the JSON representation of the model using alias"""
|
|
115
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
116
|
+
return json.dumps(self.to_dict())
|
|
117
|
+
|
|
118
|
+
@classmethod
|
|
119
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
120
|
+
"""Create an instance of Workspace from a JSON string"""
|
|
121
|
+
return cls.from_dict(json.loads(json_str))
|
|
122
|
+
|
|
123
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
124
|
+
"""Return the dictionary representation of the model using alias.
|
|
125
|
+
|
|
126
|
+
This has the following differences from calling pydantic's
|
|
127
|
+
`self.model_dump(by_alias=True)`:
|
|
128
|
+
|
|
129
|
+
* `None` is only added to the output dict for nullable fields that
|
|
130
|
+
were set at model initialization. Other fields with value `None`
|
|
131
|
+
are ignored.
|
|
132
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
133
|
+
"""
|
|
134
|
+
excluded_fields: Set[str] = set([
|
|
135
|
+
"additional_properties",
|
|
136
|
+
])
|
|
137
|
+
|
|
138
|
+
_dict = self.model_dump(
|
|
139
|
+
by_alias=True,
|
|
140
|
+
exclude=excluded_fields,
|
|
141
|
+
exclude_none=True,
|
|
142
|
+
)
|
|
143
|
+
# override the default output from pydantic by calling `to_dict()` of each item in volumes (list)
|
|
144
|
+
_items = []
|
|
145
|
+
if self.volumes:
|
|
146
|
+
for _item_volumes in self.volumes:
|
|
147
|
+
if _item_volumes:
|
|
148
|
+
_items.append(_item_volumes.to_dict())
|
|
149
|
+
_dict['volumes'] = _items
|
|
150
|
+
# override the default output from pydantic by calling `to_dict()` of build_info
|
|
151
|
+
if self.build_info:
|
|
152
|
+
_dict['buildInfo'] = self.build_info.to_dict()
|
|
153
|
+
# override the default output from pydantic by calling `to_dict()` of info
|
|
154
|
+
if self.info:
|
|
155
|
+
_dict['info'] = self.info.to_dict()
|
|
156
|
+
# puts key-value pairs in additional_properties in the top level
|
|
157
|
+
if self.additional_properties is not None:
|
|
158
|
+
for _key, _value in self.additional_properties.items():
|
|
159
|
+
_dict[_key] = _value
|
|
160
|
+
|
|
161
|
+
return _dict
|
|
162
|
+
|
|
163
|
+
@classmethod
|
|
164
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
165
|
+
"""Create an instance of Workspace from a dict"""
|
|
166
|
+
if obj is None:
|
|
167
|
+
return None
|
|
168
|
+
|
|
169
|
+
if not isinstance(obj, dict):
|
|
170
|
+
return cls.model_validate(obj)
|
|
171
|
+
|
|
172
|
+
_obj = cls.model_validate({
|
|
173
|
+
"id": obj.get("id"),
|
|
174
|
+
"organizationId": obj.get("organizationId"),
|
|
175
|
+
"name": obj.get("name"),
|
|
176
|
+
"snapshot": obj.get("snapshot"),
|
|
177
|
+
"user": obj.get("user"),
|
|
178
|
+
"env": obj.get("env"),
|
|
179
|
+
"labels": obj.get("labels"),
|
|
180
|
+
"public": obj.get("public"),
|
|
181
|
+
"networkBlockAll": obj.get("networkBlockAll"),
|
|
182
|
+
"networkAllowList": obj.get("networkAllowList"),
|
|
183
|
+
"target": obj.get("target"),
|
|
184
|
+
"cpu": obj.get("cpu"),
|
|
185
|
+
"gpu": obj.get("gpu"),
|
|
186
|
+
"memory": obj.get("memory"),
|
|
187
|
+
"disk": obj.get("disk"),
|
|
188
|
+
"state": obj.get("state"),
|
|
189
|
+
"desiredState": obj.get("desiredState"),
|
|
190
|
+
"errorReason": obj.get("errorReason"),
|
|
191
|
+
"recoverable": obj.get("recoverable"),
|
|
192
|
+
"backupState": obj.get("backupState"),
|
|
193
|
+
"backupCreatedAt": obj.get("backupCreatedAt"),
|
|
194
|
+
"autoStopInterval": obj.get("autoStopInterval"),
|
|
195
|
+
"autoArchiveInterval": obj.get("autoArchiveInterval"),
|
|
196
|
+
"autoDeleteInterval": obj.get("autoDeleteInterval"),
|
|
197
|
+
"volumes": [SandboxVolume.from_dict(_item) for _item in obj["volumes"]] if obj.get("volumes") is not None else None,
|
|
198
|
+
"buildInfo": BuildInfo.from_dict(obj["buildInfo"]) if obj.get("buildInfo") is not None else None,
|
|
199
|
+
"createdAt": obj.get("createdAt"),
|
|
200
|
+
"updatedAt": obj.get("updatedAt"),
|
|
201
|
+
"class": obj.get("class"),
|
|
202
|
+
"daemonVersion": obj.get("daemonVersion"),
|
|
203
|
+
"image": obj.get("image"),
|
|
204
|
+
"snapshotState": obj.get("snapshotState"),
|
|
205
|
+
"snapshotCreatedAt": obj.get("snapshotCreatedAt"),
|
|
206
|
+
"info": SandboxInfo.from_dict(obj["info"]) if obj.get("info") is not None else None
|
|
207
|
+
})
|
|
208
|
+
# store additional fields in additional_properties
|
|
209
|
+
for _key in obj.keys():
|
|
210
|
+
if _key not in cls.__properties:
|
|
211
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
212
|
+
|
|
213
|
+
return _obj
|
|
214
|
+
|
|
215
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class WorkspacePortPreviewUrl(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WorkspacePortPreviewUrl
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
url: StrictStr = Field(description="Preview url")
|
|
31
|
+
token: StrictStr = Field(description="Access token")
|
|
32
|
+
additional_properties: Dict[str, Any] = {}
|
|
33
|
+
__properties: ClassVar[List[str]] = ["url", "token"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of WorkspacePortPreviewUrl from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
* Fields in `self.additional_properties` are added to the output dict.
|
|
66
|
+
"""
|
|
67
|
+
excluded_fields: Set[str] = set([
|
|
68
|
+
"additional_properties",
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
# puts key-value pairs in additional_properties in the top level
|
|
77
|
+
if self.additional_properties is not None:
|
|
78
|
+
for _key, _value in self.additional_properties.items():
|
|
79
|
+
_dict[_key] = _value
|
|
80
|
+
|
|
81
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of WorkspacePortPreviewUrl from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"url": obj.get("url"),
|
|
94
|
+
"token": obj.get("token")
|
|
95
|
+
})
|
|
96
|
+
# store additional fields in additional_properties
|
|
97
|
+
for _key in obj.keys():
|
|
98
|
+
if _key not in cls.__properties:
|
|
99
|
+
_obj.additional_properties[_key] = obj.get(_key)
|
|
100
|
+
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
File without changes
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Daytona
|
|
5
|
+
|
|
6
|
+
Daytona AI platform API Docs
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0
|
|
9
|
+
Contact: support@daytona.com
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import io
|
|
17
|
+
import json
|
|
18
|
+
import re
|
|
19
|
+
import ssl
|
|
20
|
+
from typing import Optional, Union
|
|
21
|
+
|
|
22
|
+
import aiohttp
|
|
23
|
+
import aiohttp_retry
|
|
24
|
+
|
|
25
|
+
from daytona_api_client_async.exceptions import ApiException, ApiValueError
|
|
26
|
+
|
|
27
|
+
RESTResponseType = aiohttp.ClientResponse
|
|
28
|
+
|
|
29
|
+
ALLOW_RETRY_METHODS = frozenset({'DELETE', 'GET', 'HEAD', 'OPTIONS', 'PUT', 'TRACE'})
|
|
30
|
+
|
|
31
|
+
class RESTResponse(io.IOBase):
|
|
32
|
+
|
|
33
|
+
def __init__(self, resp) -> None:
|
|
34
|
+
self.response = resp
|
|
35
|
+
self.status = resp.status
|
|
36
|
+
self.reason = resp.reason
|
|
37
|
+
self.data = None
|
|
38
|
+
|
|
39
|
+
async def read(self):
|
|
40
|
+
if self.data is None:
|
|
41
|
+
self.data = await self.response.read()
|
|
42
|
+
return self.data
|
|
43
|
+
|
|
44
|
+
def getheaders(self):
|
|
45
|
+
"""Returns a CIMultiDictProxy of the response headers."""
|
|
46
|
+
return self.response.headers
|
|
47
|
+
|
|
48
|
+
def getheader(self, name, default=None):
|
|
49
|
+
"""Returns a given response header."""
|
|
50
|
+
return self.response.headers.get(name, default)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
class RESTClientObject:
|
|
54
|
+
|
|
55
|
+
def __init__(self, configuration) -> None:
|
|
56
|
+
|
|
57
|
+
# maxsize is number of requests to host that are allowed in parallel
|
|
58
|
+
self.maxsize = configuration.connection_pool_maxsize
|
|
59
|
+
|
|
60
|
+
self.ssl_context = ssl.create_default_context(
|
|
61
|
+
cafile=configuration.ssl_ca_cert,
|
|
62
|
+
cadata=configuration.ca_cert_data,
|
|
63
|
+
)
|
|
64
|
+
if configuration.cert_file:
|
|
65
|
+
self.ssl_context.load_cert_chain(
|
|
66
|
+
configuration.cert_file, keyfile=configuration.key_file
|
|
67
|
+
)
|
|
68
|
+
|
|
69
|
+
if not configuration.verify_ssl:
|
|
70
|
+
self.ssl_context.check_hostname = False
|
|
71
|
+
self.ssl_context.verify_mode = ssl.CERT_NONE
|
|
72
|
+
|
|
73
|
+
self.proxy = configuration.proxy
|
|
74
|
+
self.proxy_headers = configuration.proxy_headers
|
|
75
|
+
|
|
76
|
+
self.retries = configuration.retries
|
|
77
|
+
|
|
78
|
+
self.pool_manager: Optional[aiohttp.ClientSession] = None
|
|
79
|
+
self.retry_client: Optional[aiohttp_retry.RetryClient] = None
|
|
80
|
+
|
|
81
|
+
async def close(self) -> None:
|
|
82
|
+
if self.pool_manager:
|
|
83
|
+
await self.pool_manager.close()
|
|
84
|
+
if self.retry_client is not None:
|
|
85
|
+
await self.retry_client.close()
|
|
86
|
+
|
|
87
|
+
async def request(
|
|
88
|
+
self,
|
|
89
|
+
method,
|
|
90
|
+
url,
|
|
91
|
+
headers=None,
|
|
92
|
+
body=None,
|
|
93
|
+
post_params=None,
|
|
94
|
+
_request_timeout=None
|
|
95
|
+
):
|
|
96
|
+
"""Execute request
|
|
97
|
+
|
|
98
|
+
:param method: http request method
|
|
99
|
+
:param url: http request url
|
|
100
|
+
:param headers: http request headers
|
|
101
|
+
:param body: request json body, for `application/json`
|
|
102
|
+
:param post_params: request post parameters,
|
|
103
|
+
`application/x-www-form-urlencoded`
|
|
104
|
+
and `multipart/form-data`
|
|
105
|
+
:param _request_timeout: timeout setting for this request. If one
|
|
106
|
+
number provided, it will be total request
|
|
107
|
+
timeout. It can also be a pair (tuple) of
|
|
108
|
+
(connection, read) timeouts.
|
|
109
|
+
"""
|
|
110
|
+
method = method.upper()
|
|
111
|
+
assert method in [
|
|
112
|
+
'GET',
|
|
113
|
+
'HEAD',
|
|
114
|
+
'DELETE',
|
|
115
|
+
'POST',
|
|
116
|
+
'PUT',
|
|
117
|
+
'PATCH',
|
|
118
|
+
'OPTIONS'
|
|
119
|
+
]
|
|
120
|
+
|
|
121
|
+
if post_params and body:
|
|
122
|
+
raise ApiValueError(
|
|
123
|
+
"body parameter cannot be used with post_params parameter."
|
|
124
|
+
)
|
|
125
|
+
|
|
126
|
+
post_params = post_params or {}
|
|
127
|
+
headers = headers or {}
|
|
128
|
+
# url already contains the URL query string
|
|
129
|
+
timeout = _request_timeout or 5 * 60
|
|
130
|
+
|
|
131
|
+
if 'Content-Type' not in headers:
|
|
132
|
+
headers['Content-Type'] = 'application/json'
|
|
133
|
+
|
|
134
|
+
args = {
|
|
135
|
+
"method": method,
|
|
136
|
+
"url": url,
|
|
137
|
+
"timeout": timeout,
|
|
138
|
+
"headers": headers
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
if self.proxy:
|
|
142
|
+
args["proxy"] = self.proxy
|
|
143
|
+
if self.proxy_headers:
|
|
144
|
+
args["proxy_headers"] = self.proxy_headers
|
|
145
|
+
|
|
146
|
+
# For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
|
|
147
|
+
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
|
148
|
+
if re.search('json', headers['Content-Type'], re.IGNORECASE):
|
|
149
|
+
if body is not None:
|
|
150
|
+
body = json.dumps(body)
|
|
151
|
+
args["data"] = body
|
|
152
|
+
elif headers['Content-Type'] == 'application/x-www-form-urlencoded':
|
|
153
|
+
args["data"] = aiohttp.FormData(post_params)
|
|
154
|
+
elif headers['Content-Type'] == 'multipart/form-data':
|
|
155
|
+
# must del headers['Content-Type'], or the correct
|
|
156
|
+
# Content-Type which generated by aiohttp
|
|
157
|
+
del headers['Content-Type']
|
|
158
|
+
data = aiohttp.FormData()
|
|
159
|
+
for param in post_params:
|
|
160
|
+
k, v = param
|
|
161
|
+
if isinstance(v, tuple) and len(v) == 3:
|
|
162
|
+
data.add_field(
|
|
163
|
+
k,
|
|
164
|
+
value=v[1],
|
|
165
|
+
filename=v[0],
|
|
166
|
+
content_type=v[2]
|
|
167
|
+
)
|
|
168
|
+
else:
|
|
169
|
+
# Ensures that dict objects are serialized
|
|
170
|
+
if isinstance(v, dict):
|
|
171
|
+
v = json.dumps(v)
|
|
172
|
+
elif isinstance(v, int):
|
|
173
|
+
v = str(v)
|
|
174
|
+
data.add_field(k, v)
|
|
175
|
+
args["data"] = data
|
|
176
|
+
|
|
177
|
+
# Pass a `bytes` or `str` parameter directly in the body to support
|
|
178
|
+
# other content types than Json when `body` argument is provided
|
|
179
|
+
# in serialized form
|
|
180
|
+
elif isinstance(body, str) or isinstance(body, bytes):
|
|
181
|
+
args["data"] = body
|
|
182
|
+
else:
|
|
183
|
+
# Cannot generate the request from given parameters
|
|
184
|
+
msg = """Cannot prepare a request message for provided
|
|
185
|
+
arguments. Please check that your arguments match
|
|
186
|
+
declared content type."""
|
|
187
|
+
raise ApiException(status=0, reason=msg)
|
|
188
|
+
|
|
189
|
+
pool_manager: Union[aiohttp.ClientSession, aiohttp_retry.RetryClient]
|
|
190
|
+
|
|
191
|
+
# https pool manager
|
|
192
|
+
if self.pool_manager is None:
|
|
193
|
+
self.pool_manager = aiohttp.ClientSession(
|
|
194
|
+
connector=aiohttp.TCPConnector(limit=self.maxsize, ssl=self.ssl_context),
|
|
195
|
+
trust_env=True,
|
|
196
|
+
)
|
|
197
|
+
pool_manager = self.pool_manager
|
|
198
|
+
|
|
199
|
+
if self.retries is not None and method in ALLOW_RETRY_METHODS:
|
|
200
|
+
if self.retry_client is None:
|
|
201
|
+
self.retry_client = aiohttp_retry.RetryClient(
|
|
202
|
+
client_session=self.pool_manager,
|
|
203
|
+
retry_options=aiohttp_retry.ExponentialRetry(
|
|
204
|
+
attempts=self.retries,
|
|
205
|
+
factor=2.0,
|
|
206
|
+
start_timeout=0.1,
|
|
207
|
+
max_timeout=120.0
|
|
208
|
+
)
|
|
209
|
+
)
|
|
210
|
+
pool_manager = self.retry_client
|
|
211
|
+
|
|
212
|
+
r = await pool_manager.request(**args)
|
|
213
|
+
|
|
214
|
+
return RESTResponse(r)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: daytona_api_client_async
|
|
3
|
+
Version: 0.0.0.dev0
|
|
4
|
+
Summary: Daytona
|
|
5
|
+
Home-page:
|
|
6
|
+
Author: Daytona Platforms Inc.
|
|
7
|
+
Author-email: support@daytona.com
|
|
8
|
+
Keywords: OpenAPI,OpenAPI-Generator,Daytona
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: urllib3<3.0.0,>=2.1.0
|
|
12
|
+
Requires-Dist: python-dateutil>=2.8.2
|
|
13
|
+
Requires-Dist: aiohttp>=3.8.4
|
|
14
|
+
Requires-Dist: aiohttp-retry>=2.8.3
|
|
15
|
+
Requires-Dist: pydantic>=2
|
|
16
|
+
Requires-Dist: typing-extensions>=4.7.1
|
|
17
|
+
Dynamic: author
|
|
18
|
+
Dynamic: author-email
|
|
19
|
+
Dynamic: description
|
|
20
|
+
Dynamic: description-content-type
|
|
21
|
+
Dynamic: keywords
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
Dynamic: requires-dist
|
|
24
|
+
Dynamic: summary
|
|
25
|
+
|
|
26
|
+
Daytona AI platform API Docs
|
|
27
|
+
|