robodock-cli 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. app/__init__.py +1 -0
  2. app/app.py +14 -0
  3. app/auth.py +58 -0
  4. app/task_management.py +97 -0
  5. config.py +9 -0
  6. fast_api_client/__init__.py +8 -0
  7. fast_api_client/api/__init__.py +1 -0
  8. fast_api_client/api/auth/__init__.py +1 -0
  9. fast_api_client/api/auth/change_password_api_p_v1_auth_change_password_post.py +172 -0
  10. fast_api_client/api/auth/forgot_password_api_p_v1_auth_forgot_password_post.py +172 -0
  11. fast_api_client/api/auth/login_api_p_v1_auth_login_post.py +172 -0
  12. fast_api_client/api/auth/logout_api_p_v1_auth_logout_post.py +172 -0
  13. fast_api_client/api/auth/me_api_p_v1_auth_me_get.py +85 -0
  14. fast_api_client/api/auth/refresh_token_api_p_v1_auth_refresh_post.py +172 -0
  15. fast_api_client/api/auth/reset_password_api_p_v1_auth_reset_password_post.py +172 -0
  16. fast_api_client/api/auth/switch_group_api_p_v1_auth_switch_group_post.py +176 -0
  17. fast_api_client/api/config/__init__.py +1 -0
  18. fast_api_client/api/config/get_config_api_p_v1_config_get.py +85 -0
  19. fast_api_client/api/default/__init__.py +1 -0
  20. fast_api_client/api/default/root_get.py +81 -0
  21. fast_api_client/api/groups/__init__.py +1 -0
  22. fast_api_client/api/groups/add_member_api_p_v1_groups_group_id_members_post.py +188 -0
  23. fast_api_client/api/groups/create_group_api_p_v1_groups_post.py +172 -0
  24. fast_api_client/api/groups/create_platform_role_binding_api_p_v1_admin_platform_roles_bindings_post.py +172 -0
  25. fast_api_client/api/groups/delete_group_api_p_v1_groups_group_id_delete.py +167 -0
  26. fast_api_client/api/groups/delete_platform_role_binding_api_p_v1_admin_platform_roles_bindings_user_id_delete.py +167 -0
  27. fast_api_client/api/groups/get_group_api_p_v1_groups_group_id_get.py +167 -0
  28. fast_api_client/api/groups/list_groups_api_p_v1_groups_get.py +85 -0
  29. fast_api_client/api/groups/list_members_api_p_v1_groups_group_id_members_get.py +167 -0
  30. fast_api_client/api/groups/list_platform_role_bindings_api_p_v1_admin_platform_roles_bindings_get.py +85 -0
  31. fast_api_client/api/groups/remove_member_api_p_v1_groups_group_id_members_user_id_delete.py +181 -0
  32. fast_api_client/api/groups/reset_member_password_api_p_v1_groups_group_id_members_user_id_reset_password_post.py +181 -0
  33. fast_api_client/api/groups/update_group_api_p_v1_groups_group_id_patch.py +188 -0
  34. fast_api_client/api/groups/update_member_role_api_p_v1_groups_group_id_members_user_id_patch.py +202 -0
  35. fast_api_client/api/post_train/__init__.py +1 -0
  36. fast_api_client/api/post_train/check_patch_duplicate_api_p_v1_singledata_patch_check_post.py +164 -0
  37. fast_api_client/api/post_train/check_patch_duplicate_batch_api_p_v1_singledata_patch_check_batch_post.py +164 -0
  38. fast_api_client/api/post_train/create_dataset_api_p_v1_dataset_post.py +172 -0
  39. fast_api_client/api/post_train/create_patch_upload_api_p_v1_singledata_patch_upload_post.py +164 -0
  40. fast_api_client/api/post_train/data_ops_overview_api_p_v1_data_ops_overview_get.py +624 -0
  41. fast_api_client/api/post_train/data_ops_patches_api_p_v1_data_ops_patches_get.py +474 -0
  42. fast_api_client/api/post_train/delete_dataset_api_p_v1_dataset_dataset_uuid_delete.py +167 -0
  43. fast_api_client/api/post_train/delete_singledata_api_p_v1_singledata_uuid_delete.py +167 -0
  44. fast_api_client/api/post_train/delete_singledata_by_patch_api_p_v1_singledata_patch_patch_id_delete.py +167 -0
  45. fast_api_client/api/post_train/delete_singledata_list_api_p_v1_singledata_delete.py +172 -0
  46. fast_api_client/api/post_train/download_singledata_api_p_v1_singledata_download_uuid_get.py +167 -0
  47. fast_api_client/api/post_train/download_singledata_list_api_p_v1_singledata_download_get.py +178 -0
  48. fast_api_client/api/post_train/get_singledata_api_p_v1_singledata_uuid_get.py +167 -0
  49. fast_api_client/api/post_train/link_singledata_api_p_v1_singledata_link_post.py +172 -0
  50. fast_api_client/api/post_train/list_dataset_api_p_v1_dataset_get.py +307 -0
  51. fast_api_client/api/post_train/list_singledata_api_p_v1_singledata_get.py +737 -0
  52. fast_api_client/api/post_train/trigger_process_api_p_v1_singledata_trigger_post.py +172 -0
  53. fast_api_client/api/post_train/unlink_singledata_api_p_v1_singledata_unlink_post.py +172 -0
  54. fast_api_client/api/post_train/update_dataset_add_api_p_v1_dataset_update_dataset_uuid_post.py +188 -0
  55. fast_api_client/api/post_train/update_dataset_all_fields_api_p_v1_dataset_uuid_patch.py +188 -0
  56. fast_api_client/api/post_train/update_dataset_info_api_p_v1_dataset_update_post.py +172 -0
  57. fast_api_client/api/post_train/update_dataset_reduce_api_p_v1_dataset_reduce_dataset_uuid_post.py +188 -0
  58. fast_api_client/api/post_train/update_singledata_api_p_v1_singledata_uuid_patch.py +188 -0
  59. fast_api_client/api/post_train/update_singledata_tag_api_p_v1_singledata_tag_post.py +176 -0
  60. fast_api_client/api/post_train/update_upload_status_api_p_v1_singledata_upload_status_patch.py +176 -0
  61. fast_api_client/api/post_train/upload_singledata_api_p_v1_singledata_post.py +172 -0
  62. fast_api_client/api/post_train/upload_singledata_list_api_p_v1_singledata_list_post.py +172 -0
  63. fast_api_client/api/task_management/__init__.py +1 -0
  64. fast_api_client/api/task_management/create_project_api_p_v1_project_project_name_post.py +204 -0
  65. fast_api_client/api/task_management/create_rl_stage_api_p_v1_run_run_uuid_stage_rl_post.py +180 -0
  66. fast_api_client/api/task_management/create_run_api_p_v1_run_post.py +172 -0
  67. fast_api_client/api/task_management/delete_project_api_p_v1_project_uuid_delete.py +159 -0
  68. fast_api_client/api/task_management/delete_run_api_p_v1_run_uuid_delete.py +159 -0
  69. fast_api_client/api/task_management/delete_run_stage_api_p_v1_run_run_uuid_stage_stage_name_delete.py +181 -0
  70. fast_api_client/api/task_management/get_checkpoint_download_url_api_p_v1_run_checkpoint_download_post.py +172 -0
  71. fast_api_client/api/task_management/get_project_api_p_v1_project_uuid_get.py +159 -0
  72. fast_api_client/api/task_management/get_run_api_p_v1_run_unique_id_get.py +180 -0
  73. fast_api_client/api/task_management/get_run_log_info_api_p_v1_run_log_get.py +206 -0
  74. fast_api_client/api/task_management/get_run_stage_api_p_v1_run_run_uuid_stage_stage_name_get.py +173 -0
  75. fast_api_client/api/task_management/get_run_status_api_p_v1_run_status_uuid_get.py +159 -0
  76. fast_api_client/api/task_management/list_projects_api_p_v1_project_get.py +359 -0
  77. fast_api_client/api/task_management/list_runs_api_p_v1_run_get.py +399 -0
  78. fast_api_client/api/task_management/open_artifact_api_p_v1_run_artifact_open_post.py +164 -0
  79. fast_api_client/api/task_management/proxy_argo_log_api_p_v1_run_log_proxy_get.py +85 -0
  80. fast_api_client/api/task_management/resubmit_run_api_p_v1_run_resubmit_unique_id_post.py +180 -0
  81. fast_api_client/api/task_management/retry_run_api_p_v1_run_retry_unique_id_post.py +180 -0
  82. fast_api_client/api/task_management/stop_run_api_p_v1_run_stop_uuid_post.py +159 -0
  83. fast_api_client/api/task_management/trigger_model_convert_api_p_v1_run_model_convert_trigger_post.py +172 -0
  84. fast_api_client/api/task_management/update_project_api_p_v1_project_uuid_patch.py +180 -0
  85. fast_api_client/api/task_management/update_run_api_p_v1_run_unique_id_patch.py +200 -0
  86. fast_api_client/api/task_mapping/__init__.py +1 -0
  87. fast_api_client/api/task_mapping/create_task_mapping_api_p_v1_task_mapping_post.py +164 -0
  88. fast_api_client/api/task_mapping/delete_task_mapping_api_p_v1_task_mapping_task_id_delete.py +159 -0
  89. fast_api_client/api/task_mapping/get_task_mapping_api_p_v1_task_mapping_task_id_get.py +159 -0
  90. fast_api_client/api/task_mapping/list_task_mapping_patches_api_p_v1_task_mapping_task_id_patches_get.py +195 -0
  91. fast_api_client/api/task_mapping/list_task_mappings_api_p_v1_task_mapping_get.py +279 -0
  92. fast_api_client/api/task_mapping/update_task_mapping_api_p_v1_task_mapping_task_id_patch.py +180 -0
  93. fast_api_client/client.py +268 -0
  94. fast_api_client/errors.py +16 -0
  95. fast_api_client/models/__init__.py +121 -0
  96. fast_api_client/models/add_member_request.py +89 -0
  97. fast_api_client/models/artifact_item.py +251 -0
  98. fast_api_client/models/artifact_item_extra_info_type_0.py +45 -0
  99. fast_api_client/models/artifact_open_request.py +93 -0
  100. fast_api_client/models/body_download_singledata_list_api_pv1_singledata_download_get.py +61 -0
  101. fast_api_client/models/change_password_request.py +69 -0
  102. fast_api_client/models/checkpoint_download_request.py +69 -0
  103. fast_api_client/models/create_group_request.py +72 -0
  104. fast_api_client/models/create_platform_role_binding_request.py +69 -0
  105. fast_api_client/models/dataset_add_request.py +165 -0
  106. fast_api_client/models/dataset_create_request.py +253 -0
  107. fast_api_client/models/dataset_full_update_request.py +133 -0
  108. fast_api_client/models/dataset_reduce_request.py +84 -0
  109. fast_api_client/models/dataset_update_request.py +123 -0
  110. fast_api_client/models/forgot_password_request.py +61 -0
  111. fast_api_client/models/http_validation_error.py +79 -0
  112. fast_api_client/models/login_request.py +69 -0
  113. fast_api_client/models/logout_request.py +61 -0
  114. fast_api_client/models/model_convert_trigger_request.py +69 -0
  115. fast_api_client/models/patch_duplicate_batch_item_request.py +69 -0
  116. fast_api_client/models/patch_duplicate_batch_request.py +75 -0
  117. fast_api_client/models/patch_duplicate_check_request.py +69 -0
  118. fast_api_client/models/patch_episode_create_request.py +547 -0
  119. fast_api_client/models/patch_episode_create_request_lable_info.py +47 -0
  120. fast_api_client/models/patch_upload_create_request.py +94 -0
  121. fast_api_client/models/project_create_request.py +174 -0
  122. fast_api_client/models/project_create_request_default_configs.py +47 -0
  123. fast_api_client/models/project_update_request.py +175 -0
  124. fast_api_client/models/project_update_request_default_configs_type_0.py +45 -0
  125. fast_api_client/models/refresh_request.py +61 -0
  126. fast_api_client/models/reset_password_request.py +69 -0
  127. fast_api_client/models/rl_stage_create_request.py +75 -0
  128. fast_api_client/models/rl_stage_create_request_configs.py +47 -0
  129. fast_api_client/models/run_create_request.py +243 -0
  130. fast_api_client/models/run_create_request_configs.py +47 -0
  131. fast_api_client/models/run_update_request.py +533 -0
  132. fast_api_client/models/run_update_request_artifacts_type_0.py +45 -0
  133. fast_api_client/models/run_update_request_configs_type_0.py +45 -0
  134. fast_api_client/models/run_update_request_stages_type_0_item.py +45 -0
  135. fast_api_client/models/single_data_create_request.py +189 -0
  136. fast_api_client/models/single_data_link_request.py +69 -0
  137. fast_api_client/models/single_data_list_request.py +169 -0
  138. fast_api_client/models/single_data_tag_request.py +69 -0
  139. fast_api_client/models/single_data_trigger_request.py +61 -0
  140. fast_api_client/models/single_data_unlink_request.py +69 -0
  141. fast_api_client/models/single_data_update_request.py +775 -0
  142. fast_api_client/models/single_data_update_request_lable_info_type_0.py +45 -0
  143. fast_api_client/models/stage_artifact_append.py +85 -0
  144. fast_api_client/models/stage_artifact_append_category.py +10 -0
  145. fast_api_client/models/switch_group_request.py +61 -0
  146. fast_api_client/models/task_mapping_create_request.py +111 -0
  147. fast_api_client/models/task_mapping_update_request.py +93 -0
  148. fast_api_client/models/update_group_request.py +93 -0
  149. fast_api_client/models/update_member_request.py +61 -0
  150. fast_api_client/models/upload_status_request.py +69 -0
  151. fast_api_client/models/validation_error.py +123 -0
  152. fast_api_client/models/validation_error_context.py +45 -0
  153. fast_api_client/py.typed +1 -0
  154. fast_api_client/types.py +54 -0
  155. robodock_cli-0.1.0.dist-info/METADATA +97 -0
  156. robodock_cli-0.1.0.dist-info/RECORD +167 -0
  157. robodock_cli-0.1.0.dist-info/WHEEL +5 -0
  158. robodock_cli-0.1.0.dist-info/entry_points.txt +2 -0
  159. robodock_cli-0.1.0.dist-info/top_level.txt +4 -0
  160. sdk/__init__.py +1 -0
  161. sdk/client/__init__.py +1 -0
  162. sdk/client/auth.py +171 -0
  163. sdk/client/client.py +9 -0
  164. sdk/client/task_management.py +29 -0
  165. sdk/exception.py +95 -0
  166. sdk/utils/__init__.py +1 -0
  167. sdk/utils/downloader.py +267 -0
@@ -0,0 +1,399 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.http_validation_error import HTTPValidationError
9
+ from ...types import UNSET, Response, Unset
10
+
11
+
12
+ def _get_kwargs(
13
+ *,
14
+ uuid: None | str | Unset = UNSET,
15
+ project_name: None | str | Unset = UNSET,
16
+ run_name: None | str | Unset = UNSET,
17
+ creator: None | str | Unset = UNSET,
18
+ start_ts: int | None | Unset = UNSET,
19
+ end_ts: int | None | Unset = UNSET,
20
+ label: None | str | Unset = UNSET,
21
+ train_arc: None | str | Unset = UNSET,
22
+ robot_type: None | str | Unset = UNSET,
23
+ linked_dataset: None | str | Unset = UNSET,
24
+ status: None | str | Unset = UNSET,
25
+ page: int | Unset = 1,
26
+ size: int | Unset = 10,
27
+ ) -> dict[str, Any]:
28
+
29
+ params: dict[str, Any] = {}
30
+
31
+ json_uuid: None | str | Unset
32
+ if isinstance(uuid, Unset):
33
+ json_uuid = UNSET
34
+ else:
35
+ json_uuid = uuid
36
+ params["uuid"] = json_uuid
37
+
38
+ json_project_name: None | str | Unset
39
+ if isinstance(project_name, Unset):
40
+ json_project_name = UNSET
41
+ else:
42
+ json_project_name = project_name
43
+ params["project_name"] = json_project_name
44
+
45
+ json_run_name: None | str | Unset
46
+ if isinstance(run_name, Unset):
47
+ json_run_name = UNSET
48
+ else:
49
+ json_run_name = run_name
50
+ params["run_name"] = json_run_name
51
+
52
+ json_creator: None | str | Unset
53
+ if isinstance(creator, Unset):
54
+ json_creator = UNSET
55
+ else:
56
+ json_creator = creator
57
+ params["creator"] = json_creator
58
+
59
+ json_start_ts: int | None | Unset
60
+ if isinstance(start_ts, Unset):
61
+ json_start_ts = UNSET
62
+ else:
63
+ json_start_ts = start_ts
64
+ params["start_ts"] = json_start_ts
65
+
66
+ json_end_ts: int | None | Unset
67
+ if isinstance(end_ts, Unset):
68
+ json_end_ts = UNSET
69
+ else:
70
+ json_end_ts = end_ts
71
+ params["end_ts"] = json_end_ts
72
+
73
+ json_label: None | str | Unset
74
+ if isinstance(label, Unset):
75
+ json_label = UNSET
76
+ else:
77
+ json_label = label
78
+ params["label"] = json_label
79
+
80
+ json_train_arc: None | str | Unset
81
+ if isinstance(train_arc, Unset):
82
+ json_train_arc = UNSET
83
+ else:
84
+ json_train_arc = train_arc
85
+ params["train_arc"] = json_train_arc
86
+
87
+ json_robot_type: None | str | Unset
88
+ if isinstance(robot_type, Unset):
89
+ json_robot_type = UNSET
90
+ else:
91
+ json_robot_type = robot_type
92
+ params["robot_type"] = json_robot_type
93
+
94
+ json_linked_dataset: None | str | Unset
95
+ if isinstance(linked_dataset, Unset):
96
+ json_linked_dataset = UNSET
97
+ else:
98
+ json_linked_dataset = linked_dataset
99
+ params["linked_dataset"] = json_linked_dataset
100
+
101
+ json_status: None | str | Unset
102
+ if isinstance(status, Unset):
103
+ json_status = UNSET
104
+ else:
105
+ json_status = status
106
+ params["status"] = json_status
107
+
108
+ params["page"] = page
109
+
110
+ params["size"] = size
111
+
112
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
113
+
114
+ _kwargs: dict[str, Any] = {
115
+ "method": "get",
116
+ "url": "/api/p/v1/run",
117
+ "params": params,
118
+ }
119
+
120
+ return _kwargs
121
+
122
+
123
+ def _parse_response(
124
+ *, client: AuthenticatedClient | Client, response: httpx.Response
125
+ ) -> Any | HTTPValidationError | None:
126
+ if response.status_code == 200:
127
+ response_200 = response.json()
128
+ return response_200
129
+
130
+ if response.status_code == 422:
131
+ response_422 = HTTPValidationError.from_dict(response.json())
132
+
133
+ return response_422
134
+
135
+ if client.raise_on_unexpected_status:
136
+ raise errors.UnexpectedStatus(response.status_code, response.content)
137
+ else:
138
+ return None
139
+
140
+
141
+ def _build_response(
142
+ *, client: AuthenticatedClient | Client, response: httpx.Response
143
+ ) -> Response[Any | HTTPValidationError]:
144
+ return Response(
145
+ status_code=HTTPStatus(response.status_code),
146
+ content=response.content,
147
+ headers=response.headers,
148
+ parsed=_parse_response(client=client, response=response),
149
+ )
150
+
151
+
152
+ def sync_detailed(
153
+ *,
154
+ client: AuthenticatedClient,
155
+ uuid: None | str | Unset = UNSET,
156
+ project_name: None | str | Unset = UNSET,
157
+ run_name: None | str | Unset = UNSET,
158
+ creator: None | str | Unset = UNSET,
159
+ start_ts: int | None | Unset = UNSET,
160
+ end_ts: int | None | Unset = UNSET,
161
+ label: None | str | Unset = UNSET,
162
+ train_arc: None | str | Unset = UNSET,
163
+ robot_type: None | str | Unset = UNSET,
164
+ linked_dataset: None | str | Unset = UNSET,
165
+ status: None | str | Unset = UNSET,
166
+ page: int | Unset = 1,
167
+ size: int | Unset = 10,
168
+ ) -> Response[Any | HTTPValidationError]:
169
+ """List Runs
170
+
171
+ Args:
172
+ uuid (None | str | Unset):
173
+ project_name (None | str | Unset):
174
+ run_name (None | str | Unset):
175
+ creator (None | str | Unset):
176
+ start_ts (int | None | Unset):
177
+ end_ts (int | None | Unset):
178
+ label (None | str | Unset):
179
+ train_arc (None | str | Unset):
180
+ robot_type (None | str | Unset):
181
+ linked_dataset (None | str | Unset):
182
+ status (None | str | Unset):
183
+ page (int | Unset): Default: 1.
184
+ size (int | Unset): Default: 10.
185
+
186
+ Raises:
187
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
188
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
189
+
190
+ Returns:
191
+ Response[Any | HTTPValidationError]
192
+ """
193
+
194
+ kwargs = _get_kwargs(
195
+ uuid=uuid,
196
+ project_name=project_name,
197
+ run_name=run_name,
198
+ creator=creator,
199
+ start_ts=start_ts,
200
+ end_ts=end_ts,
201
+ label=label,
202
+ train_arc=train_arc,
203
+ robot_type=robot_type,
204
+ linked_dataset=linked_dataset,
205
+ status=status,
206
+ page=page,
207
+ size=size,
208
+ )
209
+
210
+ response = client.get_httpx_client().request(
211
+ **kwargs,
212
+ )
213
+
214
+ return _build_response(client=client, response=response)
215
+
216
+
217
+ def sync(
218
+ *,
219
+ client: AuthenticatedClient,
220
+ uuid: None | str | Unset = UNSET,
221
+ project_name: None | str | Unset = UNSET,
222
+ run_name: None | str | Unset = UNSET,
223
+ creator: None | str | Unset = UNSET,
224
+ start_ts: int | None | Unset = UNSET,
225
+ end_ts: int | None | Unset = UNSET,
226
+ label: None | str | Unset = UNSET,
227
+ train_arc: None | str | Unset = UNSET,
228
+ robot_type: None | str | Unset = UNSET,
229
+ linked_dataset: None | str | Unset = UNSET,
230
+ status: None | str | Unset = UNSET,
231
+ page: int | Unset = 1,
232
+ size: int | Unset = 10,
233
+ ) -> Any | HTTPValidationError | None:
234
+ """List Runs
235
+
236
+ Args:
237
+ uuid (None | str | Unset):
238
+ project_name (None | str | Unset):
239
+ run_name (None | str | Unset):
240
+ creator (None | str | Unset):
241
+ start_ts (int | None | Unset):
242
+ end_ts (int | None | Unset):
243
+ label (None | str | Unset):
244
+ train_arc (None | str | Unset):
245
+ robot_type (None | str | Unset):
246
+ linked_dataset (None | str | Unset):
247
+ status (None | str | Unset):
248
+ page (int | Unset): Default: 1.
249
+ size (int | Unset): Default: 10.
250
+
251
+ Raises:
252
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
253
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
254
+
255
+ Returns:
256
+ Any | HTTPValidationError
257
+ """
258
+
259
+ return sync_detailed(
260
+ client=client,
261
+ uuid=uuid,
262
+ project_name=project_name,
263
+ run_name=run_name,
264
+ creator=creator,
265
+ start_ts=start_ts,
266
+ end_ts=end_ts,
267
+ label=label,
268
+ train_arc=train_arc,
269
+ robot_type=robot_type,
270
+ linked_dataset=linked_dataset,
271
+ status=status,
272
+ page=page,
273
+ size=size,
274
+ ).parsed
275
+
276
+
277
+ async def asyncio_detailed(
278
+ *,
279
+ client: AuthenticatedClient,
280
+ uuid: None | str | Unset = UNSET,
281
+ project_name: None | str | Unset = UNSET,
282
+ run_name: None | str | Unset = UNSET,
283
+ creator: None | str | Unset = UNSET,
284
+ start_ts: int | None | Unset = UNSET,
285
+ end_ts: int | None | Unset = UNSET,
286
+ label: None | str | Unset = UNSET,
287
+ train_arc: None | str | Unset = UNSET,
288
+ robot_type: None | str | Unset = UNSET,
289
+ linked_dataset: None | str | Unset = UNSET,
290
+ status: None | str | Unset = UNSET,
291
+ page: int | Unset = 1,
292
+ size: int | Unset = 10,
293
+ ) -> Response[Any | HTTPValidationError]:
294
+ """List Runs
295
+
296
+ Args:
297
+ uuid (None | str | Unset):
298
+ project_name (None | str | Unset):
299
+ run_name (None | str | Unset):
300
+ creator (None | str | Unset):
301
+ start_ts (int | None | Unset):
302
+ end_ts (int | None | Unset):
303
+ label (None | str | Unset):
304
+ train_arc (None | str | Unset):
305
+ robot_type (None | str | Unset):
306
+ linked_dataset (None | str | Unset):
307
+ status (None | str | Unset):
308
+ page (int | Unset): Default: 1.
309
+ size (int | Unset): Default: 10.
310
+
311
+ Raises:
312
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
313
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
314
+
315
+ Returns:
316
+ Response[Any | HTTPValidationError]
317
+ """
318
+
319
+ kwargs = _get_kwargs(
320
+ uuid=uuid,
321
+ project_name=project_name,
322
+ run_name=run_name,
323
+ creator=creator,
324
+ start_ts=start_ts,
325
+ end_ts=end_ts,
326
+ label=label,
327
+ train_arc=train_arc,
328
+ robot_type=robot_type,
329
+ linked_dataset=linked_dataset,
330
+ status=status,
331
+ page=page,
332
+ size=size,
333
+ )
334
+
335
+ response = await client.get_async_httpx_client().request(**kwargs)
336
+
337
+ return _build_response(client=client, response=response)
338
+
339
+
340
+ async def asyncio(
341
+ *,
342
+ client: AuthenticatedClient,
343
+ uuid: None | str | Unset = UNSET,
344
+ project_name: None | str | Unset = UNSET,
345
+ run_name: None | str | Unset = UNSET,
346
+ creator: None | str | Unset = UNSET,
347
+ start_ts: int | None | Unset = UNSET,
348
+ end_ts: int | None | Unset = UNSET,
349
+ label: None | str | Unset = UNSET,
350
+ train_arc: None | str | Unset = UNSET,
351
+ robot_type: None | str | Unset = UNSET,
352
+ linked_dataset: None | str | Unset = UNSET,
353
+ status: None | str | Unset = UNSET,
354
+ page: int | Unset = 1,
355
+ size: int | Unset = 10,
356
+ ) -> Any | HTTPValidationError | None:
357
+ """List Runs
358
+
359
+ Args:
360
+ uuid (None | str | Unset):
361
+ project_name (None | str | Unset):
362
+ run_name (None | str | Unset):
363
+ creator (None | str | Unset):
364
+ start_ts (int | None | Unset):
365
+ end_ts (int | None | Unset):
366
+ label (None | str | Unset):
367
+ train_arc (None | str | Unset):
368
+ robot_type (None | str | Unset):
369
+ linked_dataset (None | str | Unset):
370
+ status (None | str | Unset):
371
+ page (int | Unset): Default: 1.
372
+ size (int | Unset): Default: 10.
373
+
374
+ Raises:
375
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
376
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
377
+
378
+ Returns:
379
+ Any | HTTPValidationError
380
+ """
381
+
382
+ return (
383
+ await asyncio_detailed(
384
+ client=client,
385
+ uuid=uuid,
386
+ project_name=project_name,
387
+ run_name=run_name,
388
+ creator=creator,
389
+ start_ts=start_ts,
390
+ end_ts=end_ts,
391
+ label=label,
392
+ train_arc=train_arc,
393
+ robot_type=robot_type,
394
+ linked_dataset=linked_dataset,
395
+ status=status,
396
+ page=page,
397
+ size=size,
398
+ )
399
+ ).parsed
@@ -0,0 +1,164 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...models.artifact_open_request import ArtifactOpenRequest
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ *,
15
+ body: ArtifactOpenRequest,
16
+ ) -> dict[str, Any]:
17
+ headers: dict[str, Any] = {}
18
+
19
+ _kwargs: dict[str, Any] = {
20
+ "method": "post",
21
+ "url": "/api/p/v1/run/artifact/open",
22
+ }
23
+
24
+ _kwargs["json"] = body.to_dict()
25
+
26
+ headers["Content-Type"] = "application/json"
27
+
28
+ _kwargs["headers"] = headers
29
+ return _kwargs
30
+
31
+
32
+ def _parse_response(
33
+ *, client: AuthenticatedClient | Client, response: httpx.Response
34
+ ) -> Any | HTTPValidationError | None:
35
+ if response.status_code == 200:
36
+ response_200 = response.json()
37
+ return response_200
38
+
39
+ if response.status_code == 422:
40
+ response_422 = HTTPValidationError.from_dict(response.json())
41
+
42
+ return response_422
43
+
44
+ if client.raise_on_unexpected_status:
45
+ raise errors.UnexpectedStatus(response.status_code, response.content)
46
+ else:
47
+ return None
48
+
49
+
50
+ def _build_response(
51
+ *, client: AuthenticatedClient | Client, response: httpx.Response
52
+ ) -> Response[Any | HTTPValidationError]:
53
+ return Response(
54
+ status_code=HTTPStatus(response.status_code),
55
+ content=response.content,
56
+ headers=response.headers,
57
+ parsed=_parse_response(client=client, response=response),
58
+ )
59
+
60
+
61
+ def sync_detailed(
62
+ *,
63
+ client: AuthenticatedClient,
64
+ body: ArtifactOpenRequest,
65
+ ) -> Response[Any | HTTPValidationError]:
66
+ """Open Artifact
67
+
68
+ Args:
69
+ body (ArtifactOpenRequest):
70
+
71
+ Raises:
72
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
73
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
74
+
75
+ Returns:
76
+ Response[Any | HTTPValidationError]
77
+ """
78
+
79
+ kwargs = _get_kwargs(
80
+ body=body,
81
+ )
82
+
83
+ response = client.get_httpx_client().request(
84
+ **kwargs,
85
+ )
86
+
87
+ return _build_response(client=client, response=response)
88
+
89
+
90
+ def sync(
91
+ *,
92
+ client: AuthenticatedClient,
93
+ body: ArtifactOpenRequest,
94
+ ) -> Any | HTTPValidationError | None:
95
+ """Open Artifact
96
+
97
+ Args:
98
+ body (ArtifactOpenRequest):
99
+
100
+ Raises:
101
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
102
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
103
+
104
+ Returns:
105
+ Any | HTTPValidationError
106
+ """
107
+
108
+ return sync_detailed(
109
+ client=client,
110
+ body=body,
111
+ ).parsed
112
+
113
+
114
+ async def asyncio_detailed(
115
+ *,
116
+ client: AuthenticatedClient,
117
+ body: ArtifactOpenRequest,
118
+ ) -> Response[Any | HTTPValidationError]:
119
+ """Open Artifact
120
+
121
+ Args:
122
+ body (ArtifactOpenRequest):
123
+
124
+ Raises:
125
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
126
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
127
+
128
+ Returns:
129
+ Response[Any | HTTPValidationError]
130
+ """
131
+
132
+ kwargs = _get_kwargs(
133
+ body=body,
134
+ )
135
+
136
+ response = await client.get_async_httpx_client().request(**kwargs)
137
+
138
+ return _build_response(client=client, response=response)
139
+
140
+
141
+ async def asyncio(
142
+ *,
143
+ client: AuthenticatedClient,
144
+ body: ArtifactOpenRequest,
145
+ ) -> Any | HTTPValidationError | None:
146
+ """Open Artifact
147
+
148
+ Args:
149
+ body (ArtifactOpenRequest):
150
+
151
+ Raises:
152
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
153
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
154
+
155
+ Returns:
156
+ Any | HTTPValidationError
157
+ """
158
+
159
+ return (
160
+ await asyncio_detailed(
161
+ client=client,
162
+ body=body,
163
+ )
164
+ ).parsed
@@ -0,0 +1,85 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+
4
+ import httpx
5
+
6
+ from ... import errors
7
+ from ...client import AuthenticatedClient, Client
8
+ from ...types import Response
9
+
10
+
11
+ def _get_kwargs() -> dict[str, Any]:
12
+
13
+ _kwargs: dict[str, Any] = {
14
+ "method": "get",
15
+ "url": "/api/p/v1/run/log/proxy",
16
+ }
17
+
18
+ return _kwargs
19
+
20
+
21
+ def _parse_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Any | None:
22
+ if response.status_code == 200:
23
+ return None
24
+
25
+ if client.raise_on_unexpected_status:
26
+ raise errors.UnexpectedStatus(response.status_code, response.content)
27
+ else:
28
+ return None
29
+
30
+
31
+ def _build_response(*, client: AuthenticatedClient | Client, response: httpx.Response) -> Response[Any]:
32
+ return Response(
33
+ status_code=HTTPStatus(response.status_code),
34
+ content=response.content,
35
+ headers=response.headers,
36
+ parsed=_parse_response(client=client, response=response),
37
+ )
38
+
39
+
40
+ def sync_detailed(
41
+ *,
42
+ client: AuthenticatedClient | Client,
43
+ ) -> Response[Any]:
44
+ """Proxy Argo Log
45
+
46
+ 代理 Argo 日志请求。通过 _token query param 或 X-Runs-Token header 认证。
47
+
48
+ Raises:
49
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
50
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
51
+
52
+ Returns:
53
+ Response[Any]
54
+ """
55
+
56
+ kwargs = _get_kwargs()
57
+
58
+ response = client.get_httpx_client().request(
59
+ **kwargs,
60
+ )
61
+
62
+ return _build_response(client=client, response=response)
63
+
64
+
65
+ async def asyncio_detailed(
66
+ *,
67
+ client: AuthenticatedClient | Client,
68
+ ) -> Response[Any]:
69
+ """Proxy Argo Log
70
+
71
+ 代理 Argo 日志请求。通过 _token query param 或 X-Runs-Token header 认证。
72
+
73
+ Raises:
74
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
75
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
76
+
77
+ Returns:
78
+ Response[Any]
79
+ """
80
+
81
+ kwargs = _get_kwargs()
82
+
83
+ response = await client.get_async_httpx_client().request(**kwargs)
84
+
85
+ return _build_response(client=client, response=response)