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,474 @@
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
+ uploader: None | str | Unset = UNSET,
15
+ operator: None | str | Unset = UNSET,
16
+ patch_id: None | str | Unset = UNSET,
17
+ collection_method: None | str | Unset = UNSET,
18
+ collector_type: None | str | Unset = UNSET,
19
+ collector_id: None | str | Unset = UNSET,
20
+ task_id: None | str | Unset = UNSET,
21
+ task_success: int | None | Unset = UNSET,
22
+ scene_type: None | str | Unset = UNSET,
23
+ review_status: None | str | Unset = UNSET,
24
+ uploaded: bool | None | Unset = UNSET,
25
+ time_field: str | Unset = "collection_time",
26
+ start_ts: int | None | Unset = UNSET,
27
+ end_ts: int | None | Unset = UNSET,
28
+ checker_result: None | str | Unset = UNSET,
29
+ page: int | Unset = 1,
30
+ size: int | Unset = 10,
31
+ ) -> dict[str, Any]:
32
+
33
+ params: dict[str, Any] = {}
34
+
35
+ json_uploader: None | str | Unset
36
+ if isinstance(uploader, Unset):
37
+ json_uploader = UNSET
38
+ else:
39
+ json_uploader = uploader
40
+ params["uploader"] = json_uploader
41
+
42
+ json_operator: None | str | Unset
43
+ if isinstance(operator, Unset):
44
+ json_operator = UNSET
45
+ else:
46
+ json_operator = operator
47
+ params["operator"] = json_operator
48
+
49
+ json_patch_id: None | str | Unset
50
+ if isinstance(patch_id, Unset):
51
+ json_patch_id = UNSET
52
+ else:
53
+ json_patch_id = patch_id
54
+ params["patch_id"] = json_patch_id
55
+
56
+ json_collection_method: None | str | Unset
57
+ if isinstance(collection_method, Unset):
58
+ json_collection_method = UNSET
59
+ else:
60
+ json_collection_method = collection_method
61
+ params["collection_method"] = json_collection_method
62
+
63
+ json_collector_type: None | str | Unset
64
+ if isinstance(collector_type, Unset):
65
+ json_collector_type = UNSET
66
+ else:
67
+ json_collector_type = collector_type
68
+ params["collector_type"] = json_collector_type
69
+
70
+ json_collector_id: None | str | Unset
71
+ if isinstance(collector_id, Unset):
72
+ json_collector_id = UNSET
73
+ else:
74
+ json_collector_id = collector_id
75
+ params["collector_id"] = json_collector_id
76
+
77
+ json_task_id: None | str | Unset
78
+ if isinstance(task_id, Unset):
79
+ json_task_id = UNSET
80
+ else:
81
+ json_task_id = task_id
82
+ params["task_id"] = json_task_id
83
+
84
+ json_task_success: int | None | Unset
85
+ if isinstance(task_success, Unset):
86
+ json_task_success = UNSET
87
+ else:
88
+ json_task_success = task_success
89
+ params["task_success"] = json_task_success
90
+
91
+ json_scene_type: None | str | Unset
92
+ if isinstance(scene_type, Unset):
93
+ json_scene_type = UNSET
94
+ else:
95
+ json_scene_type = scene_type
96
+ params["scene_type"] = json_scene_type
97
+
98
+ json_review_status: None | str | Unset
99
+ if isinstance(review_status, Unset):
100
+ json_review_status = UNSET
101
+ else:
102
+ json_review_status = review_status
103
+ params["review_status"] = json_review_status
104
+
105
+ json_uploaded: bool | None | Unset
106
+ if isinstance(uploaded, Unset):
107
+ json_uploaded = UNSET
108
+ else:
109
+ json_uploaded = uploaded
110
+ params["uploaded"] = json_uploaded
111
+
112
+ params["time_field"] = time_field
113
+
114
+ json_start_ts: int | None | Unset
115
+ if isinstance(start_ts, Unset):
116
+ json_start_ts = UNSET
117
+ else:
118
+ json_start_ts = start_ts
119
+ params["start_ts"] = json_start_ts
120
+
121
+ json_end_ts: int | None | Unset
122
+ if isinstance(end_ts, Unset):
123
+ json_end_ts = UNSET
124
+ else:
125
+ json_end_ts = end_ts
126
+ params["end_ts"] = json_end_ts
127
+
128
+ json_checker_result: None | str | Unset
129
+ if isinstance(checker_result, Unset):
130
+ json_checker_result = UNSET
131
+ else:
132
+ json_checker_result = checker_result
133
+ params["checker_result"] = json_checker_result
134
+
135
+ params["page"] = page
136
+
137
+ params["size"] = size
138
+
139
+ params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
140
+
141
+ _kwargs: dict[str, Any] = {
142
+ "method": "get",
143
+ "url": "/api/p/v1/data-ops/patches",
144
+ "params": params,
145
+ }
146
+
147
+ return _kwargs
148
+
149
+
150
+ def _parse_response(
151
+ *, client: AuthenticatedClient | Client, response: httpx.Response
152
+ ) -> Any | HTTPValidationError | None:
153
+ if response.status_code == 200:
154
+ response_200 = response.json()
155
+ return response_200
156
+
157
+ if response.status_code == 422:
158
+ response_422 = HTTPValidationError.from_dict(response.json())
159
+
160
+ return response_422
161
+
162
+ if client.raise_on_unexpected_status:
163
+ raise errors.UnexpectedStatus(response.status_code, response.content)
164
+ else:
165
+ return None
166
+
167
+
168
+ def _build_response(
169
+ *, client: AuthenticatedClient | Client, response: httpx.Response
170
+ ) -> Response[Any | HTTPValidationError]:
171
+ return Response(
172
+ status_code=HTTPStatus(response.status_code),
173
+ content=response.content,
174
+ headers=response.headers,
175
+ parsed=_parse_response(client=client, response=response),
176
+ )
177
+
178
+
179
+ def sync_detailed(
180
+ *,
181
+ client: AuthenticatedClient | Client,
182
+ uploader: None | str | Unset = UNSET,
183
+ operator: None | str | Unset = UNSET,
184
+ patch_id: None | str | Unset = UNSET,
185
+ collection_method: None | str | Unset = UNSET,
186
+ collector_type: None | str | Unset = UNSET,
187
+ collector_id: None | str | Unset = UNSET,
188
+ task_id: None | str | Unset = UNSET,
189
+ task_success: int | None | Unset = UNSET,
190
+ scene_type: None | str | Unset = UNSET,
191
+ review_status: None | str | Unset = UNSET,
192
+ uploaded: bool | None | Unset = UNSET,
193
+ time_field: str | Unset = "collection_time",
194
+ start_ts: int | None | Unset = UNSET,
195
+ end_ts: int | None | Unset = UNSET,
196
+ checker_result: None | str | Unset = UNSET,
197
+ page: int | Unset = 1,
198
+ size: int | Unset = 10,
199
+ ) -> Response[Any | HTTPValidationError]:
200
+ """Data Ops Patches
201
+
202
+ Args:
203
+ uploader (None | str | Unset):
204
+ operator (None | str | Unset):
205
+ patch_id (None | str | Unset):
206
+ collection_method (None | str | Unset):
207
+ collector_type (None | str | Unset):
208
+ collector_id (None | str | Unset):
209
+ task_id (None | str | Unset):
210
+ task_success (int | None | Unset):
211
+ scene_type (None | str | Unset):
212
+ review_status (None | str | Unset):
213
+ uploaded (bool | None | Unset):
214
+ time_field (str | Unset): Default: 'collection_time'.
215
+ start_ts (int | None | Unset):
216
+ end_ts (int | None | Unset):
217
+ checker_result (None | str | Unset):
218
+ page (int | Unset): Default: 1.
219
+ size (int | Unset): Default: 10.
220
+
221
+ Raises:
222
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
223
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
224
+
225
+ Returns:
226
+ Response[Any | HTTPValidationError]
227
+ """
228
+
229
+ kwargs = _get_kwargs(
230
+ uploader=uploader,
231
+ operator=operator,
232
+ patch_id=patch_id,
233
+ collection_method=collection_method,
234
+ collector_type=collector_type,
235
+ collector_id=collector_id,
236
+ task_id=task_id,
237
+ task_success=task_success,
238
+ scene_type=scene_type,
239
+ review_status=review_status,
240
+ uploaded=uploaded,
241
+ time_field=time_field,
242
+ start_ts=start_ts,
243
+ end_ts=end_ts,
244
+ checker_result=checker_result,
245
+ page=page,
246
+ size=size,
247
+ )
248
+
249
+ response = client.get_httpx_client().request(
250
+ **kwargs,
251
+ )
252
+
253
+ return _build_response(client=client, response=response)
254
+
255
+
256
+ def sync(
257
+ *,
258
+ client: AuthenticatedClient | Client,
259
+ uploader: None | str | Unset = UNSET,
260
+ operator: None | str | Unset = UNSET,
261
+ patch_id: None | str | Unset = UNSET,
262
+ collection_method: None | str | Unset = UNSET,
263
+ collector_type: None | str | Unset = UNSET,
264
+ collector_id: None | str | Unset = UNSET,
265
+ task_id: None | str | Unset = UNSET,
266
+ task_success: int | None | Unset = UNSET,
267
+ scene_type: None | str | Unset = UNSET,
268
+ review_status: None | str | Unset = UNSET,
269
+ uploaded: bool | None | Unset = UNSET,
270
+ time_field: str | Unset = "collection_time",
271
+ start_ts: int | None | Unset = UNSET,
272
+ end_ts: int | None | Unset = UNSET,
273
+ checker_result: None | str | Unset = UNSET,
274
+ page: int | Unset = 1,
275
+ size: int | Unset = 10,
276
+ ) -> Any | HTTPValidationError | None:
277
+ """Data Ops Patches
278
+
279
+ Args:
280
+ uploader (None | str | Unset):
281
+ operator (None | str | Unset):
282
+ patch_id (None | str | Unset):
283
+ collection_method (None | str | Unset):
284
+ collector_type (None | str | Unset):
285
+ collector_id (None | str | Unset):
286
+ task_id (None | str | Unset):
287
+ task_success (int | None | Unset):
288
+ scene_type (None | str | Unset):
289
+ review_status (None | str | Unset):
290
+ uploaded (bool | None | Unset):
291
+ time_field (str | Unset): Default: 'collection_time'.
292
+ start_ts (int | None | Unset):
293
+ end_ts (int | None | Unset):
294
+ checker_result (None | str | Unset):
295
+ page (int | Unset): Default: 1.
296
+ size (int | Unset): Default: 10.
297
+
298
+ Raises:
299
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
300
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
301
+
302
+ Returns:
303
+ Any | HTTPValidationError
304
+ """
305
+
306
+ return sync_detailed(
307
+ client=client,
308
+ uploader=uploader,
309
+ operator=operator,
310
+ patch_id=patch_id,
311
+ collection_method=collection_method,
312
+ collector_type=collector_type,
313
+ collector_id=collector_id,
314
+ task_id=task_id,
315
+ task_success=task_success,
316
+ scene_type=scene_type,
317
+ review_status=review_status,
318
+ uploaded=uploaded,
319
+ time_field=time_field,
320
+ start_ts=start_ts,
321
+ end_ts=end_ts,
322
+ checker_result=checker_result,
323
+ page=page,
324
+ size=size,
325
+ ).parsed
326
+
327
+
328
+ async def asyncio_detailed(
329
+ *,
330
+ client: AuthenticatedClient | Client,
331
+ uploader: None | str | Unset = UNSET,
332
+ operator: None | str | Unset = UNSET,
333
+ patch_id: None | str | Unset = UNSET,
334
+ collection_method: None | str | Unset = UNSET,
335
+ collector_type: None | str | Unset = UNSET,
336
+ collector_id: None | str | Unset = UNSET,
337
+ task_id: None | str | Unset = UNSET,
338
+ task_success: int | None | Unset = UNSET,
339
+ scene_type: None | str | Unset = UNSET,
340
+ review_status: None | str | Unset = UNSET,
341
+ uploaded: bool | None | Unset = UNSET,
342
+ time_field: str | Unset = "collection_time",
343
+ start_ts: int | None | Unset = UNSET,
344
+ end_ts: int | None | Unset = UNSET,
345
+ checker_result: None | str | Unset = UNSET,
346
+ page: int | Unset = 1,
347
+ size: int | Unset = 10,
348
+ ) -> Response[Any | HTTPValidationError]:
349
+ """Data Ops Patches
350
+
351
+ Args:
352
+ uploader (None | str | Unset):
353
+ operator (None | str | Unset):
354
+ patch_id (None | str | Unset):
355
+ collection_method (None | str | Unset):
356
+ collector_type (None | str | Unset):
357
+ collector_id (None | str | Unset):
358
+ task_id (None | str | Unset):
359
+ task_success (int | None | Unset):
360
+ scene_type (None | str | Unset):
361
+ review_status (None | str | Unset):
362
+ uploaded (bool | None | Unset):
363
+ time_field (str | Unset): Default: 'collection_time'.
364
+ start_ts (int | None | Unset):
365
+ end_ts (int | None | Unset):
366
+ checker_result (None | str | Unset):
367
+ page (int | Unset): Default: 1.
368
+ size (int | Unset): Default: 10.
369
+
370
+ Raises:
371
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
372
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
373
+
374
+ Returns:
375
+ Response[Any | HTTPValidationError]
376
+ """
377
+
378
+ kwargs = _get_kwargs(
379
+ uploader=uploader,
380
+ operator=operator,
381
+ patch_id=patch_id,
382
+ collection_method=collection_method,
383
+ collector_type=collector_type,
384
+ collector_id=collector_id,
385
+ task_id=task_id,
386
+ task_success=task_success,
387
+ scene_type=scene_type,
388
+ review_status=review_status,
389
+ uploaded=uploaded,
390
+ time_field=time_field,
391
+ start_ts=start_ts,
392
+ end_ts=end_ts,
393
+ checker_result=checker_result,
394
+ page=page,
395
+ size=size,
396
+ )
397
+
398
+ response = await client.get_async_httpx_client().request(**kwargs)
399
+
400
+ return _build_response(client=client, response=response)
401
+
402
+
403
+ async def asyncio(
404
+ *,
405
+ client: AuthenticatedClient | Client,
406
+ uploader: None | str | Unset = UNSET,
407
+ operator: None | str | Unset = UNSET,
408
+ patch_id: None | str | Unset = UNSET,
409
+ collection_method: None | str | Unset = UNSET,
410
+ collector_type: None | str | Unset = UNSET,
411
+ collector_id: None | str | Unset = UNSET,
412
+ task_id: None | str | Unset = UNSET,
413
+ task_success: int | None | Unset = UNSET,
414
+ scene_type: None | str | Unset = UNSET,
415
+ review_status: None | str | Unset = UNSET,
416
+ uploaded: bool | None | Unset = UNSET,
417
+ time_field: str | Unset = "collection_time",
418
+ start_ts: int | None | Unset = UNSET,
419
+ end_ts: int | None | Unset = UNSET,
420
+ checker_result: None | str | Unset = UNSET,
421
+ page: int | Unset = 1,
422
+ size: int | Unset = 10,
423
+ ) -> Any | HTTPValidationError | None:
424
+ """Data Ops Patches
425
+
426
+ Args:
427
+ uploader (None | str | Unset):
428
+ operator (None | str | Unset):
429
+ patch_id (None | str | Unset):
430
+ collection_method (None | str | Unset):
431
+ collector_type (None | str | Unset):
432
+ collector_id (None | str | Unset):
433
+ task_id (None | str | Unset):
434
+ task_success (int | None | Unset):
435
+ scene_type (None | str | Unset):
436
+ review_status (None | str | Unset):
437
+ uploaded (bool | None | Unset):
438
+ time_field (str | Unset): Default: 'collection_time'.
439
+ start_ts (int | None | Unset):
440
+ end_ts (int | None | Unset):
441
+ checker_result (None | str | Unset):
442
+ page (int | Unset): Default: 1.
443
+ size (int | Unset): Default: 10.
444
+
445
+ Raises:
446
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
447
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
448
+
449
+ Returns:
450
+ Any | HTTPValidationError
451
+ """
452
+
453
+ return (
454
+ await asyncio_detailed(
455
+ client=client,
456
+ uploader=uploader,
457
+ operator=operator,
458
+ patch_id=patch_id,
459
+ collection_method=collection_method,
460
+ collector_type=collector_type,
461
+ collector_id=collector_id,
462
+ task_id=task_id,
463
+ task_success=task_success,
464
+ scene_type=scene_type,
465
+ review_status=review_status,
466
+ uploaded=uploaded,
467
+ time_field=time_field,
468
+ start_ts=start_ts,
469
+ end_ts=end_ts,
470
+ checker_result=checker_result,
471
+ page=page,
472
+ size=size,
473
+ )
474
+ ).parsed
@@ -0,0 +1,167 @@
1
+ from http import HTTPStatus
2
+ from typing import Any
3
+ from urllib.parse import quote
4
+
5
+ import httpx
6
+
7
+ from ... import errors
8
+ from ...client import AuthenticatedClient, Client
9
+ from ...models.http_validation_error import HTTPValidationError
10
+ from ...types import Response
11
+
12
+
13
+ def _get_kwargs(
14
+ dataset_uuid: str,
15
+ ) -> dict[str, Any]:
16
+
17
+ _kwargs: dict[str, Any] = {
18
+ "method": "delete",
19
+ "url": "/api/p/v1/dataset/{dataset_uuid}".format(
20
+ dataset_uuid=quote(str(dataset_uuid), safe=""),
21
+ ),
22
+ }
23
+
24
+ return _kwargs
25
+
26
+
27
+ def _parse_response(
28
+ *, client: AuthenticatedClient | Client, response: httpx.Response
29
+ ) -> Any | HTTPValidationError | None:
30
+ if response.status_code == 200:
31
+ response_200 = response.json()
32
+ return response_200
33
+
34
+ if response.status_code == 422:
35
+ response_422 = HTTPValidationError.from_dict(response.json())
36
+
37
+ return response_422
38
+
39
+ if client.raise_on_unexpected_status:
40
+ raise errors.UnexpectedStatus(response.status_code, response.content)
41
+ else:
42
+ return None
43
+
44
+
45
+ def _build_response(
46
+ *, client: AuthenticatedClient | Client, response: httpx.Response
47
+ ) -> Response[Any | HTTPValidationError]:
48
+ return Response(
49
+ status_code=HTTPStatus(response.status_code),
50
+ content=response.content,
51
+ headers=response.headers,
52
+ parsed=_parse_response(client=client, response=response),
53
+ )
54
+
55
+
56
+ def sync_detailed(
57
+ dataset_uuid: str,
58
+ *,
59
+ client: AuthenticatedClient,
60
+ ) -> Response[Any | HTTPValidationError]:
61
+ """Delete Dataset
62
+
63
+ 删除数据集(需认证 + 归属校验)
64
+
65
+ Args:
66
+ dataset_uuid (str):
67
+
68
+ Raises:
69
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
70
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
71
+
72
+ Returns:
73
+ Response[Any | HTTPValidationError]
74
+ """
75
+
76
+ kwargs = _get_kwargs(
77
+ dataset_uuid=dataset_uuid,
78
+ )
79
+
80
+ response = client.get_httpx_client().request(
81
+ **kwargs,
82
+ )
83
+
84
+ return _build_response(client=client, response=response)
85
+
86
+
87
+ def sync(
88
+ dataset_uuid: str,
89
+ *,
90
+ client: AuthenticatedClient,
91
+ ) -> Any | HTTPValidationError | None:
92
+ """Delete Dataset
93
+
94
+ 删除数据集(需认证 + 归属校验)
95
+
96
+ Args:
97
+ dataset_uuid (str):
98
+
99
+ Raises:
100
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
101
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
102
+
103
+ Returns:
104
+ Any | HTTPValidationError
105
+ """
106
+
107
+ return sync_detailed(
108
+ dataset_uuid=dataset_uuid,
109
+ client=client,
110
+ ).parsed
111
+
112
+
113
+ async def asyncio_detailed(
114
+ dataset_uuid: str,
115
+ *,
116
+ client: AuthenticatedClient,
117
+ ) -> Response[Any | HTTPValidationError]:
118
+ """Delete Dataset
119
+
120
+ 删除数据集(需认证 + 归属校验)
121
+
122
+ Args:
123
+ dataset_uuid (str):
124
+
125
+ Raises:
126
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
127
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
128
+
129
+ Returns:
130
+ Response[Any | HTTPValidationError]
131
+ """
132
+
133
+ kwargs = _get_kwargs(
134
+ dataset_uuid=dataset_uuid,
135
+ )
136
+
137
+ response = await client.get_async_httpx_client().request(**kwargs)
138
+
139
+ return _build_response(client=client, response=response)
140
+
141
+
142
+ async def asyncio(
143
+ dataset_uuid: str,
144
+ *,
145
+ client: AuthenticatedClient,
146
+ ) -> Any | HTTPValidationError | None:
147
+ """Delete Dataset
148
+
149
+ 删除数据集(需认证 + 归属校验)
150
+
151
+ Args:
152
+ dataset_uuid (str):
153
+
154
+ Raises:
155
+ errors.UnexpectedStatus: If the server returns an undocumented status code and Client.raise_on_unexpected_status is True.
156
+ httpx.TimeoutException: If the request takes longer than Client.timeout.
157
+
158
+ Returns:
159
+ Any | HTTPValidationError
160
+ """
161
+
162
+ return (
163
+ await asyncio_detailed(
164
+ dataset_uuid=dataset_uuid,
165
+ client=client,
166
+ )
167
+ ).parsed