label-studio-sdk 2.0.1__py3-none-any.whl → 2.0.2__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.
Potentially problematic release.
This version of label-studio-sdk might be problematic. Click here for more details.
- label_studio_sdk/__init__.py +4 -0
- label_studio_sdk/actions/client.py +13 -13
- label_studio_sdk/actions/types/actions_list_response_item.py +3 -3
- label_studio_sdk/actions/types/actions_list_response_item_dialog.py +2 -2
- label_studio_sdk/annotations/client.py +441 -441
- label_studio_sdk/comments/client.py +176 -176
- label_studio_sdk/export_storage/azure/client.py +274 -274
- label_studio_sdk/export_storage/gcs/client.py +263 -263
- label_studio_sdk/export_storage/local/client.py +206 -206
- label_studio_sdk/export_storage/redis/client.py +287 -287
- label_studio_sdk/export_storage/s3/client.py +347 -347
- label_studio_sdk/export_storage/s3s/client.py +678 -678
- label_studio_sdk/import_storage/azure/client.py +357 -357
- label_studio_sdk/import_storage/gcs/client.py +357 -357
- label_studio_sdk/import_storage/local/client.py +206 -206
- label_studio_sdk/import_storage/redis/client.py +309 -309
- label_studio_sdk/import_storage/s3/client.py +452 -452
- label_studio_sdk/import_storage/s3s/client.py +735 -735
- label_studio_sdk/jwt_settings/client.py +10 -10
- label_studio_sdk/ml/client.py +118 -118
- label_studio_sdk/ml/types/ml_list_model_versions_response.py +1 -1
- label_studio_sdk/model_providers/client.py +181 -181
- label_studio_sdk/organizations/members/client.py +8 -8
- label_studio_sdk/predictions/client.py +60 -60
- label_studio_sdk/projects/__init__.py +30 -1
- label_studio_sdk/projects/assignments/__init__.py +33 -0
- label_studio_sdk/projects/assignments/client.py +764 -0
- label_studio_sdk/projects/assignments/types/__init__.py +35 -0
- label_studio_sdk/projects/assignments/types/assignments_assign_request_type.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters.py +33 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_conjunction.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item.py +44 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_filter.py +31 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_operator.py +23 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_value.py +7 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items.py +9 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_excluded.py +29 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_included.py +29 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_type.py +5 -0
- label_studio_sdk/projects/assignments/types/assignments_bulk_assign_response.py +22 -0
- label_studio_sdk/projects/assignments/types/assignments_update_request_type.py +5 -0
- label_studio_sdk/projects/client.py +441 -425
- label_studio_sdk/projects/exports/client.py +55 -55
- label_studio_sdk/projects/exports/types/exports_convert_response.py +1 -1
- label_studio_sdk/projects/stats/types/stats_iaa_response.py +5 -5
- label_studio_sdk/projects/types/projects_import_tasks_response.py +12 -12
- label_studio_sdk/prompts/client.py +211 -211
- label_studio_sdk/prompts/runs/client.py +33 -33
- label_studio_sdk/prompts/versions/client.py +72 -72
- label_studio_sdk/tasks/client.py +174 -174
- label_studio_sdk/types/__init__.py +4 -0
- label_studio_sdk/types/all_roles_project_list.py +94 -94
- label_studio_sdk/types/annotation.py +35 -35
- label_studio_sdk/types/annotation_request.py +27 -27
- label_studio_sdk/types/azure_blob_export_storage.py +29 -29
- label_studio_sdk/types/azure_blob_import_storage.py +33 -33
- label_studio_sdk/types/batch_failed_predictions.py +1 -1
- label_studio_sdk/types/billing_checks.py +14 -14
- label_studio_sdk/types/billing_flags.py +16 -16
- label_studio_sdk/types/blueprint_list.py +7 -8
- label_studio_sdk/types/child_filter.py +11 -10
- label_studio_sdk/types/comment.py +15 -15
- label_studio_sdk/types/comment_request.py +7 -8
- label_studio_sdk/types/comment_serializer_with_expanded_user.py +17 -18
- label_studio_sdk/types/converted_format.py +1 -1
- label_studio_sdk/types/converted_format_request.py +1 -1
- label_studio_sdk/types/export.py +8 -8
- label_studio_sdk/types/file_upload.py +3 -2
- label_studio_sdk/types/filter.py +10 -9
- label_studio_sdk/types/filter_group.py +4 -3
- label_studio_sdk/types/gcs_export_storage.py +23 -23
- label_studio_sdk/types/gcs_import_storage.py +27 -27
- label_studio_sdk/types/import_api_request.py +26 -26
- label_studio_sdk/types/inference_run_cost_estimate.py +10 -10
- label_studio_sdk/types/local_files_export_storage.py +23 -23
- label_studio_sdk/types/local_files_import_storage.py +26 -26
- label_studio_sdk/types/lse_annotation_filter_options.py +10 -10
- label_studio_sdk/types/lse_annotation_filter_options_request.py +10 -10
- label_studio_sdk/types/lse_export_create.py +12 -12
- label_studio_sdk/types/lse_fields.py +14 -14
- label_studio_sdk/types/lse_organization.py +17 -17
- label_studio_sdk/types/lse_organization_member_list.py +1 -1
- label_studio_sdk/types/lse_project_create.py +72 -72
- label_studio_sdk/types/lse_project_update.py +89 -89
- label_studio_sdk/types/lse_s3export_storage.py +46 -46
- label_studio_sdk/types/lse_s3export_storage_request.py +43 -43
- label_studio_sdk/types/lse_s3import_storage.py +53 -53
- label_studio_sdk/types/lse_s3import_storage_request.py +49 -49
- label_studio_sdk/types/lse_task.py +49 -49
- label_studio_sdk/types/lse_task_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_filter_options.py +14 -14
- label_studio_sdk/types/lse_task_filter_options_request.py +14 -14
- label_studio_sdk/types/lse_task_predictions_item.py +5 -5
- label_studio_sdk/types/lse_task_serializer_for_annotators.py +12 -12
- label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +5 -5
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +49 -49
- label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +1 -1
- label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +5 -5
- label_studio_sdk/types/lse_user.py +13 -13
- label_studio_sdk/types/lse_user_api.py +11 -11
- label_studio_sdk/types/lse_user_organization_member_list.py +13 -13
- label_studio_sdk/types/lseapi_token_create.py +1 -1
- label_studio_sdk/types/lseapi_token_list.py +1 -1
- label_studio_sdk/types/lsejwt_settings.py +5 -5
- label_studio_sdk/types/ml_backend.py +27 -28
- label_studio_sdk/types/model_interface.py +12 -12
- label_studio_sdk/types/model_interface_request.py +7 -8
- label_studio_sdk/types/model_interface_serializer_get.py +13 -13
- label_studio_sdk/types/model_provider_connection.py +34 -34
- label_studio_sdk/types/model_provider_connection_request.py +15 -14
- label_studio_sdk/types/model_run.py +12 -12
- label_studio_sdk/types/organization_billing.py +1 -1
- label_studio_sdk/types/organization_id.py +2 -2
- label_studio_sdk/types/organization_invite.py +1 -1
- label_studio_sdk/types/organization_member.py +8 -9
- label_studio_sdk/types/organization_membership.py +2 -1
- label_studio_sdk/types/pause.py +23 -23
- label_studio_sdk/types/prediction.py +21 -21
- label_studio_sdk/types/prediction_request.py +16 -16
- label_studio_sdk/types/project.py +72 -72
- label_studio_sdk/types/project_import.py +21 -21
- label_studio_sdk/types/redis_export_storage.py +34 -34
- label_studio_sdk/types/redis_import_storage.py +37 -37
- label_studio_sdk/types/refined_prompt_response.py +11 -11
- label_studio_sdk/types/review_settings.py +29 -30
- label_studio_sdk/types/review_settings_request.py +29 -30
- label_studio_sdk/types/s3export_storage.py +45 -45
- label_studio_sdk/types/s3import_storage.py +44 -44
- label_studio_sdk/types/selected_items_request.py +1 -1
- label_studio_sdk/types/serialization_options.py +10 -10
- label_studio_sdk/types/serialization_options_request.py +10 -10
- label_studio_sdk/types/task_assignment.py +43 -0
- label_studio_sdk/types/third_party_model_version.py +11 -11
- label_studio_sdk/types/third_party_model_version_request.py +6 -7
- label_studio_sdk/types/type_enum.py +5 -0
- label_studio_sdk/types/user_simple.py +3 -3
- label_studio_sdk/types/user_simple_request.py +1 -1
- label_studio_sdk/types/version_response.py +19 -20
- label_studio_sdk/types/view.py +8 -8
- label_studio_sdk/types/webhook.py +16 -16
- label_studio_sdk/types/webhook_serializer_for_update.py +16 -16
- label_studio_sdk/types/workspace.py +10 -11
- label_studio_sdk/users/client.py +160 -160
- label_studio_sdk/views/client.py +164 -164
- label_studio_sdk/webhooks/client.py +183 -183
- label_studio_sdk/webhooks/types/webhooks_info_response.py +32 -32
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +1 -1
- label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +1 -1
- label_studio_sdk/workspaces/client.py +40 -40
- {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.2.dist-info}/METADATA +1 -1
- {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.2.dist-info}/RECORD +167 -149
- {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.2.dist-info}/LICENSE +0 -0
- {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.2.dist-info}/WHEEL +0 -0
|
@@ -79,15 +79,15 @@ class RedisClient:
|
|
|
79
79
|
def create(
|
|
80
80
|
self,
|
|
81
81
|
*,
|
|
82
|
-
db: typing.Optional[int] = OMIT,
|
|
83
82
|
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
84
|
-
|
|
83
|
+
db: typing.Optional[int] = OMIT,
|
|
85
84
|
description: typing.Optional[str] = OMIT,
|
|
86
|
-
project: typing.Optional[int] = OMIT,
|
|
87
|
-
path: typing.Optional[str] = OMIT,
|
|
88
85
|
host: typing.Optional[str] = OMIT,
|
|
89
|
-
port: typing.Optional[str] = OMIT,
|
|
90
86
|
password: typing.Optional[str] = OMIT,
|
|
87
|
+
path: typing.Optional[str] = OMIT,
|
|
88
|
+
port: typing.Optional[str] = OMIT,
|
|
89
|
+
project: typing.Optional[int] = OMIT,
|
|
90
|
+
title: typing.Optional[str] = OMIT,
|
|
91
91
|
request_options: typing.Optional[RequestOptions] = None,
|
|
92
92
|
) -> RedisExportStorage:
|
|
93
93
|
"""
|
|
@@ -95,32 +95,32 @@ class RedisClient:
|
|
|
95
95
|
|
|
96
96
|
Parameters
|
|
97
97
|
----------
|
|
98
|
-
db : typing.Optional[int]
|
|
99
|
-
Database ID of database to use
|
|
100
|
-
|
|
101
98
|
can_delete_objects : typing.Optional[bool]
|
|
102
99
|
Deletion from storage enabled.
|
|
103
100
|
|
|
104
|
-
|
|
105
|
-
|
|
101
|
+
db : typing.Optional[int]
|
|
102
|
+
Database ID of database to use
|
|
106
103
|
|
|
107
104
|
description : typing.Optional[str]
|
|
108
105
|
Storage description
|
|
109
106
|
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
host : typing.Optional[str]
|
|
108
|
+
Server Host IP (optional)
|
|
109
|
+
|
|
110
|
+
password : typing.Optional[str]
|
|
111
|
+
Server Password (optional)
|
|
112
112
|
|
|
113
113
|
path : typing.Optional[str]
|
|
114
114
|
Storage prefix (optional)
|
|
115
115
|
|
|
116
|
-
host : typing.Optional[str]
|
|
117
|
-
Server Host IP (optional)
|
|
118
|
-
|
|
119
116
|
port : typing.Optional[str]
|
|
120
117
|
Server Port (optional)
|
|
121
118
|
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
project : typing.Optional[int]
|
|
120
|
+
Project ID
|
|
121
|
+
|
|
122
|
+
title : typing.Optional[str]
|
|
123
|
+
Storage title
|
|
124
124
|
|
|
125
125
|
request_options : typing.Optional[RequestOptions]
|
|
126
126
|
Request-specific configuration.
|
|
@@ -143,15 +143,15 @@ class RedisClient:
|
|
|
143
143
|
"api/storages/export/redis",
|
|
144
144
|
method="POST",
|
|
145
145
|
json={
|
|
146
|
-
"db": db,
|
|
147
146
|
"can_delete_objects": can_delete_objects,
|
|
148
|
-
"
|
|
147
|
+
"db": db,
|
|
149
148
|
"description": description,
|
|
150
|
-
"project": project,
|
|
151
|
-
"path": path,
|
|
152
149
|
"host": host,
|
|
153
|
-
"port": port,
|
|
154
150
|
"password": password,
|
|
151
|
+
"path": path,
|
|
152
|
+
"port": port,
|
|
153
|
+
"project": project,
|
|
154
|
+
"title": title,
|
|
155
155
|
},
|
|
156
156
|
headers={
|
|
157
157
|
"content-type": "application/json",
|
|
@@ -173,6 +173,101 @@ class RedisClient:
|
|
|
173
173
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
174
174
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
175
175
|
|
|
176
|
+
def validate(
|
|
177
|
+
self,
|
|
178
|
+
*,
|
|
179
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
180
|
+
db: typing.Optional[int] = OMIT,
|
|
181
|
+
description: typing.Optional[str] = OMIT,
|
|
182
|
+
host: typing.Optional[str] = OMIT,
|
|
183
|
+
id: typing.Optional[int] = OMIT,
|
|
184
|
+
password: typing.Optional[str] = OMIT,
|
|
185
|
+
path: typing.Optional[str] = OMIT,
|
|
186
|
+
port: typing.Optional[str] = OMIT,
|
|
187
|
+
project: typing.Optional[int] = OMIT,
|
|
188
|
+
title: typing.Optional[str] = OMIT,
|
|
189
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
190
|
+
) -> None:
|
|
191
|
+
"""
|
|
192
|
+
Validate a specific Redis export storage connection.
|
|
193
|
+
|
|
194
|
+
Parameters
|
|
195
|
+
----------
|
|
196
|
+
can_delete_objects : typing.Optional[bool]
|
|
197
|
+
Deletion from storage enabled.
|
|
198
|
+
|
|
199
|
+
db : typing.Optional[int]
|
|
200
|
+
Database ID of database to use
|
|
201
|
+
|
|
202
|
+
description : typing.Optional[str]
|
|
203
|
+
Storage description
|
|
204
|
+
|
|
205
|
+
host : typing.Optional[str]
|
|
206
|
+
Server Host IP (optional)
|
|
207
|
+
|
|
208
|
+
id : typing.Optional[int]
|
|
209
|
+
Storage ID. If set, storage with specified ID will be updated
|
|
210
|
+
|
|
211
|
+
password : typing.Optional[str]
|
|
212
|
+
Server Password (optional)
|
|
213
|
+
|
|
214
|
+
path : typing.Optional[str]
|
|
215
|
+
Storage prefix (optional)
|
|
216
|
+
|
|
217
|
+
port : typing.Optional[str]
|
|
218
|
+
Server Port (optional)
|
|
219
|
+
|
|
220
|
+
project : typing.Optional[int]
|
|
221
|
+
Project ID
|
|
222
|
+
|
|
223
|
+
title : typing.Optional[str]
|
|
224
|
+
Storage title
|
|
225
|
+
|
|
226
|
+
request_options : typing.Optional[RequestOptions]
|
|
227
|
+
Request-specific configuration.
|
|
228
|
+
|
|
229
|
+
Returns
|
|
230
|
+
-------
|
|
231
|
+
None
|
|
232
|
+
|
|
233
|
+
Examples
|
|
234
|
+
--------
|
|
235
|
+
from label_studio_sdk import LabelStudio
|
|
236
|
+
|
|
237
|
+
client = LabelStudio(
|
|
238
|
+
api_key="YOUR_API_KEY",
|
|
239
|
+
)
|
|
240
|
+
client.export_storage.redis.validate()
|
|
241
|
+
"""
|
|
242
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
243
|
+
"api/storages/export/redis/validate",
|
|
244
|
+
method="POST",
|
|
245
|
+
json={
|
|
246
|
+
"can_delete_objects": can_delete_objects,
|
|
247
|
+
"db": db,
|
|
248
|
+
"description": description,
|
|
249
|
+
"host": host,
|
|
250
|
+
"id": id,
|
|
251
|
+
"password": password,
|
|
252
|
+
"path": path,
|
|
253
|
+
"port": port,
|
|
254
|
+
"project": project,
|
|
255
|
+
"title": title,
|
|
256
|
+
},
|
|
257
|
+
headers={
|
|
258
|
+
"content-type": "application/json",
|
|
259
|
+
},
|
|
260
|
+
request_options=request_options,
|
|
261
|
+
omit=OMIT,
|
|
262
|
+
)
|
|
263
|
+
try:
|
|
264
|
+
if 200 <= _response.status_code < 300:
|
|
265
|
+
return
|
|
266
|
+
_response_json = _response.json()
|
|
267
|
+
except JSONDecodeError:
|
|
268
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
269
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
270
|
+
|
|
176
271
|
def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> RedisExportStorage:
|
|
177
272
|
"""
|
|
178
273
|
Get a specific Redis export storage connection.
|
|
@@ -262,15 +357,15 @@ class RedisClient:
|
|
|
262
357
|
self,
|
|
263
358
|
id: int,
|
|
264
359
|
*,
|
|
265
|
-
db: typing.Optional[int] = OMIT,
|
|
266
360
|
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
267
|
-
|
|
361
|
+
db: typing.Optional[int] = OMIT,
|
|
268
362
|
description: typing.Optional[str] = OMIT,
|
|
269
|
-
project: typing.Optional[int] = OMIT,
|
|
270
|
-
path: typing.Optional[str] = OMIT,
|
|
271
363
|
host: typing.Optional[str] = OMIT,
|
|
272
|
-
port: typing.Optional[str] = OMIT,
|
|
273
364
|
password: typing.Optional[str] = OMIT,
|
|
365
|
+
path: typing.Optional[str] = OMIT,
|
|
366
|
+
port: typing.Optional[str] = OMIT,
|
|
367
|
+
project: typing.Optional[int] = OMIT,
|
|
368
|
+
title: typing.Optional[str] = OMIT,
|
|
274
369
|
request_options: typing.Optional[RequestOptions] = None,
|
|
275
370
|
) -> RedisExportStorage:
|
|
276
371
|
"""
|
|
@@ -280,32 +375,32 @@ class RedisClient:
|
|
|
280
375
|
----------
|
|
281
376
|
id : int
|
|
282
377
|
|
|
283
|
-
db : typing.Optional[int]
|
|
284
|
-
Database ID of database to use
|
|
285
|
-
|
|
286
378
|
can_delete_objects : typing.Optional[bool]
|
|
287
379
|
Deletion from storage enabled.
|
|
288
380
|
|
|
289
|
-
|
|
290
|
-
|
|
381
|
+
db : typing.Optional[int]
|
|
382
|
+
Database ID of database to use
|
|
291
383
|
|
|
292
384
|
description : typing.Optional[str]
|
|
293
385
|
Storage description
|
|
294
386
|
|
|
295
|
-
|
|
296
|
-
|
|
387
|
+
host : typing.Optional[str]
|
|
388
|
+
Server Host IP (optional)
|
|
389
|
+
|
|
390
|
+
password : typing.Optional[str]
|
|
391
|
+
Server Password (optional)
|
|
297
392
|
|
|
298
393
|
path : typing.Optional[str]
|
|
299
394
|
Storage prefix (optional)
|
|
300
395
|
|
|
301
|
-
host : typing.Optional[str]
|
|
302
|
-
Server Host IP (optional)
|
|
303
|
-
|
|
304
396
|
port : typing.Optional[str]
|
|
305
397
|
Server Port (optional)
|
|
306
398
|
|
|
307
|
-
|
|
308
|
-
|
|
399
|
+
project : typing.Optional[int]
|
|
400
|
+
Project ID
|
|
401
|
+
|
|
402
|
+
title : typing.Optional[str]
|
|
403
|
+
Storage title
|
|
309
404
|
|
|
310
405
|
request_options : typing.Optional[RequestOptions]
|
|
311
406
|
Request-specific configuration.
|
|
@@ -330,15 +425,15 @@ class RedisClient:
|
|
|
330
425
|
f"api/storages/export/redis/{jsonable_encoder(id)}",
|
|
331
426
|
method="PATCH",
|
|
332
427
|
json={
|
|
333
|
-
"db": db,
|
|
334
428
|
"can_delete_objects": can_delete_objects,
|
|
335
|
-
"
|
|
429
|
+
"db": db,
|
|
336
430
|
"description": description,
|
|
337
|
-
"project": project,
|
|
338
|
-
"path": path,
|
|
339
431
|
"host": host,
|
|
340
|
-
"port": port,
|
|
341
432
|
"password": password,
|
|
433
|
+
"path": path,
|
|
434
|
+
"port": port,
|
|
435
|
+
"project": project,
|
|
436
|
+
"title": title,
|
|
342
437
|
},
|
|
343
438
|
headers={
|
|
344
439
|
"content-type": "application/json",
|
|
@@ -406,130 +501,129 @@ class RedisClient:
|
|
|
406
501
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
407
502
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
408
503
|
|
|
409
|
-
|
|
504
|
+
|
|
505
|
+
class AsyncRedisClient:
|
|
506
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
507
|
+
self._client_wrapper = client_wrapper
|
|
508
|
+
|
|
509
|
+
async def list(
|
|
410
510
|
self,
|
|
411
511
|
*,
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
415
|
-
title: typing.Optional[str] = OMIT,
|
|
416
|
-
description: typing.Optional[str] = OMIT,
|
|
417
|
-
project: typing.Optional[int] = OMIT,
|
|
418
|
-
path: typing.Optional[str] = OMIT,
|
|
419
|
-
host: typing.Optional[str] = OMIT,
|
|
420
|
-
port: typing.Optional[str] = OMIT,
|
|
421
|
-
password: typing.Optional[str] = OMIT,
|
|
512
|
+
ordering: typing.Optional[str] = None,
|
|
513
|
+
project: typing.Optional[int] = None,
|
|
422
514
|
request_options: typing.Optional[RequestOptions] = None,
|
|
423
|
-
) ->
|
|
515
|
+
) -> typing.List[RedisExportStorage]:
|
|
424
516
|
"""
|
|
425
|
-
|
|
517
|
+
Get a list of all Redis export storage connections.
|
|
426
518
|
|
|
427
519
|
Parameters
|
|
428
520
|
----------
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
db : typing.Optional[int]
|
|
433
|
-
Database ID of database to use
|
|
434
|
-
|
|
435
|
-
can_delete_objects : typing.Optional[bool]
|
|
436
|
-
Deletion from storage enabled.
|
|
437
|
-
|
|
438
|
-
title : typing.Optional[str]
|
|
439
|
-
Storage title
|
|
440
|
-
|
|
441
|
-
description : typing.Optional[str]
|
|
442
|
-
Storage description
|
|
521
|
+
ordering : typing.Optional[str]
|
|
522
|
+
Which field to use when ordering the results.
|
|
443
523
|
|
|
444
524
|
project : typing.Optional[int]
|
|
445
525
|
Project ID
|
|
446
526
|
|
|
447
|
-
path : typing.Optional[str]
|
|
448
|
-
Storage prefix (optional)
|
|
449
|
-
|
|
450
|
-
host : typing.Optional[str]
|
|
451
|
-
Server Host IP (optional)
|
|
452
|
-
|
|
453
|
-
port : typing.Optional[str]
|
|
454
|
-
Server Port (optional)
|
|
455
|
-
|
|
456
|
-
password : typing.Optional[str]
|
|
457
|
-
Server Password (optional)
|
|
458
|
-
|
|
459
527
|
request_options : typing.Optional[RequestOptions]
|
|
460
528
|
Request-specific configuration.
|
|
461
529
|
|
|
462
530
|
Returns
|
|
463
531
|
-------
|
|
464
|
-
|
|
532
|
+
typing.List[RedisExportStorage]
|
|
533
|
+
|
|
465
534
|
|
|
466
535
|
Examples
|
|
467
536
|
--------
|
|
468
|
-
|
|
537
|
+
import asyncio
|
|
469
538
|
|
|
470
|
-
|
|
539
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
540
|
+
|
|
541
|
+
client = AsyncLabelStudio(
|
|
471
542
|
api_key="YOUR_API_KEY",
|
|
472
543
|
)
|
|
473
|
-
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
async def main() -> None:
|
|
547
|
+
await client.export_storage.redis.list()
|
|
548
|
+
|
|
549
|
+
|
|
550
|
+
asyncio.run(main())
|
|
474
551
|
"""
|
|
475
|
-
_response = self._client_wrapper.httpx_client.request(
|
|
476
|
-
"api/storages/export/redis
|
|
477
|
-
method="
|
|
478
|
-
|
|
479
|
-
"
|
|
480
|
-
"db": db,
|
|
481
|
-
"can_delete_objects": can_delete_objects,
|
|
482
|
-
"title": title,
|
|
483
|
-
"description": description,
|
|
552
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
553
|
+
"api/storages/export/redis",
|
|
554
|
+
method="GET",
|
|
555
|
+
params={
|
|
556
|
+
"ordering": ordering,
|
|
484
557
|
"project": project,
|
|
485
|
-
"path": path,
|
|
486
|
-
"host": host,
|
|
487
|
-
"port": port,
|
|
488
|
-
"password": password,
|
|
489
|
-
},
|
|
490
|
-
headers={
|
|
491
|
-
"content-type": "application/json",
|
|
492
558
|
},
|
|
493
559
|
request_options=request_options,
|
|
494
|
-
omit=OMIT,
|
|
495
560
|
)
|
|
496
561
|
try:
|
|
497
562
|
if 200 <= _response.status_code < 300:
|
|
498
|
-
return
|
|
563
|
+
return typing.cast(
|
|
564
|
+
typing.List[RedisExportStorage],
|
|
565
|
+
construct_type(
|
|
566
|
+
type_=typing.List[RedisExportStorage], # type: ignore
|
|
567
|
+
object_=_response.json(),
|
|
568
|
+
),
|
|
569
|
+
)
|
|
499
570
|
_response_json = _response.json()
|
|
500
571
|
except JSONDecodeError:
|
|
501
572
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
502
573
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
503
574
|
|
|
504
|
-
|
|
505
|
-
class AsyncRedisClient:
|
|
506
|
-
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
507
|
-
self._client_wrapper = client_wrapper
|
|
508
|
-
|
|
509
|
-
async def list(
|
|
575
|
+
async def create(
|
|
510
576
|
self,
|
|
511
577
|
*,
|
|
512
|
-
|
|
513
|
-
|
|
578
|
+
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
579
|
+
db: typing.Optional[int] = OMIT,
|
|
580
|
+
description: typing.Optional[str] = OMIT,
|
|
581
|
+
host: typing.Optional[str] = OMIT,
|
|
582
|
+
password: typing.Optional[str] = OMIT,
|
|
583
|
+
path: typing.Optional[str] = OMIT,
|
|
584
|
+
port: typing.Optional[str] = OMIT,
|
|
585
|
+
project: typing.Optional[int] = OMIT,
|
|
586
|
+
title: typing.Optional[str] = OMIT,
|
|
514
587
|
request_options: typing.Optional[RequestOptions] = None,
|
|
515
|
-
) ->
|
|
588
|
+
) -> RedisExportStorage:
|
|
516
589
|
"""
|
|
517
|
-
|
|
590
|
+
Create a new Redis export storage connection to store annotations.
|
|
591
|
+
|
|
592
|
+
Parameters
|
|
593
|
+
----------
|
|
594
|
+
can_delete_objects : typing.Optional[bool]
|
|
595
|
+
Deletion from storage enabled.
|
|
596
|
+
|
|
597
|
+
db : typing.Optional[int]
|
|
598
|
+
Database ID of database to use
|
|
599
|
+
|
|
600
|
+
description : typing.Optional[str]
|
|
601
|
+
Storage description
|
|
602
|
+
|
|
603
|
+
host : typing.Optional[str]
|
|
604
|
+
Server Host IP (optional)
|
|
605
|
+
|
|
606
|
+
password : typing.Optional[str]
|
|
607
|
+
Server Password (optional)
|
|
518
608
|
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
609
|
+
path : typing.Optional[str]
|
|
610
|
+
Storage prefix (optional)
|
|
611
|
+
|
|
612
|
+
port : typing.Optional[str]
|
|
613
|
+
Server Port (optional)
|
|
523
614
|
|
|
524
615
|
project : typing.Optional[int]
|
|
525
616
|
Project ID
|
|
526
617
|
|
|
618
|
+
title : typing.Optional[str]
|
|
619
|
+
Storage title
|
|
620
|
+
|
|
527
621
|
request_options : typing.Optional[RequestOptions]
|
|
528
622
|
Request-specific configuration.
|
|
529
623
|
|
|
530
624
|
Returns
|
|
531
625
|
-------
|
|
532
|
-
|
|
626
|
+
RedisExportStorage
|
|
533
627
|
|
|
534
628
|
|
|
535
629
|
Examples
|
|
@@ -544,26 +638,37 @@ class AsyncRedisClient:
|
|
|
544
638
|
|
|
545
639
|
|
|
546
640
|
async def main() -> None:
|
|
547
|
-
await client.export_storage.redis.
|
|
641
|
+
await client.export_storage.redis.create()
|
|
548
642
|
|
|
549
643
|
|
|
550
644
|
asyncio.run(main())
|
|
551
645
|
"""
|
|
552
646
|
_response = await self._client_wrapper.httpx_client.request(
|
|
553
647
|
"api/storages/export/redis",
|
|
554
|
-
method="
|
|
555
|
-
|
|
556
|
-
"
|
|
648
|
+
method="POST",
|
|
649
|
+
json={
|
|
650
|
+
"can_delete_objects": can_delete_objects,
|
|
651
|
+
"db": db,
|
|
652
|
+
"description": description,
|
|
653
|
+
"host": host,
|
|
654
|
+
"password": password,
|
|
655
|
+
"path": path,
|
|
656
|
+
"port": port,
|
|
557
657
|
"project": project,
|
|
658
|
+
"title": title,
|
|
659
|
+
},
|
|
660
|
+
headers={
|
|
661
|
+
"content-type": "application/json",
|
|
558
662
|
},
|
|
559
663
|
request_options=request_options,
|
|
664
|
+
omit=OMIT,
|
|
560
665
|
)
|
|
561
666
|
try:
|
|
562
667
|
if 200 <= _response.status_code < 300:
|
|
563
668
|
return typing.cast(
|
|
564
|
-
|
|
669
|
+
RedisExportStorage,
|
|
565
670
|
construct_type(
|
|
566
|
-
type_=
|
|
671
|
+
type_=RedisExportStorage, # type: ignore
|
|
567
672
|
object_=_response.json(),
|
|
568
673
|
),
|
|
569
674
|
)
|
|
@@ -572,59 +677,62 @@ class AsyncRedisClient:
|
|
|
572
677
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
573
678
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
574
679
|
|
|
575
|
-
async def
|
|
680
|
+
async def validate(
|
|
576
681
|
self,
|
|
577
682
|
*,
|
|
578
|
-
db: typing.Optional[int] = OMIT,
|
|
579
683
|
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
580
|
-
|
|
684
|
+
db: typing.Optional[int] = OMIT,
|
|
581
685
|
description: typing.Optional[str] = OMIT,
|
|
582
|
-
project: typing.Optional[int] = OMIT,
|
|
583
|
-
path: typing.Optional[str] = OMIT,
|
|
584
686
|
host: typing.Optional[str] = OMIT,
|
|
585
|
-
|
|
687
|
+
id: typing.Optional[int] = OMIT,
|
|
586
688
|
password: typing.Optional[str] = OMIT,
|
|
689
|
+
path: typing.Optional[str] = OMIT,
|
|
690
|
+
port: typing.Optional[str] = OMIT,
|
|
691
|
+
project: typing.Optional[int] = OMIT,
|
|
692
|
+
title: typing.Optional[str] = OMIT,
|
|
587
693
|
request_options: typing.Optional[RequestOptions] = None,
|
|
588
|
-
) ->
|
|
694
|
+
) -> None:
|
|
589
695
|
"""
|
|
590
|
-
|
|
696
|
+
Validate a specific Redis export storage connection.
|
|
591
697
|
|
|
592
698
|
Parameters
|
|
593
699
|
----------
|
|
594
|
-
db : typing.Optional[int]
|
|
595
|
-
Database ID of database to use
|
|
596
|
-
|
|
597
700
|
can_delete_objects : typing.Optional[bool]
|
|
598
701
|
Deletion from storage enabled.
|
|
599
702
|
|
|
600
|
-
|
|
601
|
-
|
|
703
|
+
db : typing.Optional[int]
|
|
704
|
+
Database ID of database to use
|
|
602
705
|
|
|
603
706
|
description : typing.Optional[str]
|
|
604
707
|
Storage description
|
|
605
708
|
|
|
606
|
-
|
|
607
|
-
|
|
709
|
+
host : typing.Optional[str]
|
|
710
|
+
Server Host IP (optional)
|
|
711
|
+
|
|
712
|
+
id : typing.Optional[int]
|
|
713
|
+
Storage ID. If set, storage with specified ID will be updated
|
|
714
|
+
|
|
715
|
+
password : typing.Optional[str]
|
|
716
|
+
Server Password (optional)
|
|
608
717
|
|
|
609
718
|
path : typing.Optional[str]
|
|
610
719
|
Storage prefix (optional)
|
|
611
720
|
|
|
612
|
-
host : typing.Optional[str]
|
|
613
|
-
Server Host IP (optional)
|
|
614
|
-
|
|
615
721
|
port : typing.Optional[str]
|
|
616
722
|
Server Port (optional)
|
|
617
723
|
|
|
618
|
-
|
|
619
|
-
|
|
724
|
+
project : typing.Optional[int]
|
|
725
|
+
Project ID
|
|
726
|
+
|
|
727
|
+
title : typing.Optional[str]
|
|
728
|
+
Storage title
|
|
620
729
|
|
|
621
730
|
request_options : typing.Optional[RequestOptions]
|
|
622
731
|
Request-specific configuration.
|
|
623
732
|
|
|
624
733
|
Returns
|
|
625
734
|
-------
|
|
626
|
-
|
|
627
|
-
|
|
735
|
+
None
|
|
628
736
|
|
|
629
737
|
Examples
|
|
630
738
|
--------
|
|
@@ -638,24 +746,25 @@ class AsyncRedisClient:
|
|
|
638
746
|
|
|
639
747
|
|
|
640
748
|
async def main() -> None:
|
|
641
|
-
await client.export_storage.redis.
|
|
749
|
+
await client.export_storage.redis.validate()
|
|
642
750
|
|
|
643
751
|
|
|
644
752
|
asyncio.run(main())
|
|
645
753
|
"""
|
|
646
754
|
_response = await self._client_wrapper.httpx_client.request(
|
|
647
|
-
"api/storages/export/redis",
|
|
755
|
+
"api/storages/export/redis/validate",
|
|
648
756
|
method="POST",
|
|
649
757
|
json={
|
|
650
|
-
"db": db,
|
|
651
758
|
"can_delete_objects": can_delete_objects,
|
|
652
|
-
"
|
|
759
|
+
"db": db,
|
|
653
760
|
"description": description,
|
|
654
|
-
"project": project,
|
|
655
|
-
"path": path,
|
|
656
761
|
"host": host,
|
|
657
|
-
"
|
|
762
|
+
"id": id,
|
|
658
763
|
"password": password,
|
|
764
|
+
"path": path,
|
|
765
|
+
"port": port,
|
|
766
|
+
"project": project,
|
|
767
|
+
"title": title,
|
|
659
768
|
},
|
|
660
769
|
headers={
|
|
661
770
|
"content-type": "application/json",
|
|
@@ -665,13 +774,7 @@ class AsyncRedisClient:
|
|
|
665
774
|
)
|
|
666
775
|
try:
|
|
667
776
|
if 200 <= _response.status_code < 300:
|
|
668
|
-
return
|
|
669
|
-
RedisExportStorage,
|
|
670
|
-
construct_type(
|
|
671
|
-
type_=RedisExportStorage, # type: ignore
|
|
672
|
-
object_=_response.json(),
|
|
673
|
-
),
|
|
674
|
-
)
|
|
777
|
+
return
|
|
675
778
|
_response_json = _response.json()
|
|
676
779
|
except JSONDecodeError:
|
|
677
780
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -782,15 +885,15 @@ class AsyncRedisClient:
|
|
|
782
885
|
self,
|
|
783
886
|
id: int,
|
|
784
887
|
*,
|
|
785
|
-
db: typing.Optional[int] = OMIT,
|
|
786
888
|
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
787
|
-
|
|
889
|
+
db: typing.Optional[int] = OMIT,
|
|
788
890
|
description: typing.Optional[str] = OMIT,
|
|
789
|
-
project: typing.Optional[int] = OMIT,
|
|
790
|
-
path: typing.Optional[str] = OMIT,
|
|
791
891
|
host: typing.Optional[str] = OMIT,
|
|
792
|
-
port: typing.Optional[str] = OMIT,
|
|
793
892
|
password: typing.Optional[str] = OMIT,
|
|
893
|
+
path: typing.Optional[str] = OMIT,
|
|
894
|
+
port: typing.Optional[str] = OMIT,
|
|
895
|
+
project: typing.Optional[int] = OMIT,
|
|
896
|
+
title: typing.Optional[str] = OMIT,
|
|
794
897
|
request_options: typing.Optional[RequestOptions] = None,
|
|
795
898
|
) -> RedisExportStorage:
|
|
796
899
|
"""
|
|
@@ -800,32 +903,32 @@ class AsyncRedisClient:
|
|
|
800
903
|
----------
|
|
801
904
|
id : int
|
|
802
905
|
|
|
803
|
-
db : typing.Optional[int]
|
|
804
|
-
Database ID of database to use
|
|
805
|
-
|
|
806
906
|
can_delete_objects : typing.Optional[bool]
|
|
807
907
|
Deletion from storage enabled.
|
|
808
908
|
|
|
809
|
-
|
|
810
|
-
|
|
909
|
+
db : typing.Optional[int]
|
|
910
|
+
Database ID of database to use
|
|
811
911
|
|
|
812
912
|
description : typing.Optional[str]
|
|
813
913
|
Storage description
|
|
814
914
|
|
|
815
|
-
|
|
816
|
-
|
|
915
|
+
host : typing.Optional[str]
|
|
916
|
+
Server Host IP (optional)
|
|
917
|
+
|
|
918
|
+
password : typing.Optional[str]
|
|
919
|
+
Server Password (optional)
|
|
817
920
|
|
|
818
921
|
path : typing.Optional[str]
|
|
819
922
|
Storage prefix (optional)
|
|
820
923
|
|
|
821
|
-
host : typing.Optional[str]
|
|
822
|
-
Server Host IP (optional)
|
|
823
|
-
|
|
824
924
|
port : typing.Optional[str]
|
|
825
925
|
Server Port (optional)
|
|
826
926
|
|
|
827
|
-
|
|
828
|
-
|
|
927
|
+
project : typing.Optional[int]
|
|
928
|
+
Project ID
|
|
929
|
+
|
|
930
|
+
title : typing.Optional[str]
|
|
931
|
+
Storage title
|
|
829
932
|
|
|
830
933
|
request_options : typing.Optional[RequestOptions]
|
|
831
934
|
Request-specific configuration.
|
|
@@ -858,15 +961,15 @@ class AsyncRedisClient:
|
|
|
858
961
|
f"api/storages/export/redis/{jsonable_encoder(id)}",
|
|
859
962
|
method="PATCH",
|
|
860
963
|
json={
|
|
861
|
-
"db": db,
|
|
862
964
|
"can_delete_objects": can_delete_objects,
|
|
863
|
-
"
|
|
965
|
+
"db": db,
|
|
864
966
|
"description": description,
|
|
865
|
-
"project": project,
|
|
866
|
-
"path": path,
|
|
867
967
|
"host": host,
|
|
868
|
-
"port": port,
|
|
869
968
|
"password": password,
|
|
969
|
+
"path": path,
|
|
970
|
+
"port": port,
|
|
971
|
+
"project": project,
|
|
972
|
+
"title": title,
|
|
870
973
|
},
|
|
871
974
|
headers={
|
|
872
975
|
"content-type": "application/json",
|
|
@@ -941,106 +1044,3 @@ class AsyncRedisClient:
|
|
|
941
1044
|
except JSONDecodeError:
|
|
942
1045
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
943
1046
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
944
|
-
|
|
945
|
-
async def validate(
|
|
946
|
-
self,
|
|
947
|
-
*,
|
|
948
|
-
id: typing.Optional[int] = OMIT,
|
|
949
|
-
db: typing.Optional[int] = OMIT,
|
|
950
|
-
can_delete_objects: typing.Optional[bool] = OMIT,
|
|
951
|
-
title: typing.Optional[str] = OMIT,
|
|
952
|
-
description: typing.Optional[str] = OMIT,
|
|
953
|
-
project: typing.Optional[int] = OMIT,
|
|
954
|
-
path: typing.Optional[str] = OMIT,
|
|
955
|
-
host: typing.Optional[str] = OMIT,
|
|
956
|
-
port: typing.Optional[str] = OMIT,
|
|
957
|
-
password: typing.Optional[str] = OMIT,
|
|
958
|
-
request_options: typing.Optional[RequestOptions] = None,
|
|
959
|
-
) -> None:
|
|
960
|
-
"""
|
|
961
|
-
Validate a specific Redis export storage connection.
|
|
962
|
-
|
|
963
|
-
Parameters
|
|
964
|
-
----------
|
|
965
|
-
id : typing.Optional[int]
|
|
966
|
-
Storage ID. If set, storage with specified ID will be updated
|
|
967
|
-
|
|
968
|
-
db : typing.Optional[int]
|
|
969
|
-
Database ID of database to use
|
|
970
|
-
|
|
971
|
-
can_delete_objects : typing.Optional[bool]
|
|
972
|
-
Deletion from storage enabled.
|
|
973
|
-
|
|
974
|
-
title : typing.Optional[str]
|
|
975
|
-
Storage title
|
|
976
|
-
|
|
977
|
-
description : typing.Optional[str]
|
|
978
|
-
Storage description
|
|
979
|
-
|
|
980
|
-
project : typing.Optional[int]
|
|
981
|
-
Project ID
|
|
982
|
-
|
|
983
|
-
path : typing.Optional[str]
|
|
984
|
-
Storage prefix (optional)
|
|
985
|
-
|
|
986
|
-
host : typing.Optional[str]
|
|
987
|
-
Server Host IP (optional)
|
|
988
|
-
|
|
989
|
-
port : typing.Optional[str]
|
|
990
|
-
Server Port (optional)
|
|
991
|
-
|
|
992
|
-
password : typing.Optional[str]
|
|
993
|
-
Server Password (optional)
|
|
994
|
-
|
|
995
|
-
request_options : typing.Optional[RequestOptions]
|
|
996
|
-
Request-specific configuration.
|
|
997
|
-
|
|
998
|
-
Returns
|
|
999
|
-
-------
|
|
1000
|
-
None
|
|
1001
|
-
|
|
1002
|
-
Examples
|
|
1003
|
-
--------
|
|
1004
|
-
import asyncio
|
|
1005
|
-
|
|
1006
|
-
from label_studio_sdk import AsyncLabelStudio
|
|
1007
|
-
|
|
1008
|
-
client = AsyncLabelStudio(
|
|
1009
|
-
api_key="YOUR_API_KEY",
|
|
1010
|
-
)
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
async def main() -> None:
|
|
1014
|
-
await client.export_storage.redis.validate()
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
asyncio.run(main())
|
|
1018
|
-
"""
|
|
1019
|
-
_response = await self._client_wrapper.httpx_client.request(
|
|
1020
|
-
"api/storages/export/redis/validate",
|
|
1021
|
-
method="POST",
|
|
1022
|
-
json={
|
|
1023
|
-
"id": id,
|
|
1024
|
-
"db": db,
|
|
1025
|
-
"can_delete_objects": can_delete_objects,
|
|
1026
|
-
"title": title,
|
|
1027
|
-
"description": description,
|
|
1028
|
-
"project": project,
|
|
1029
|
-
"path": path,
|
|
1030
|
-
"host": host,
|
|
1031
|
-
"port": port,
|
|
1032
|
-
"password": password,
|
|
1033
|
-
},
|
|
1034
|
-
headers={
|
|
1035
|
-
"content-type": "application/json",
|
|
1036
|
-
},
|
|
1037
|
-
request_options=request_options,
|
|
1038
|
-
omit=OMIT,
|
|
1039
|
-
)
|
|
1040
|
-
try:
|
|
1041
|
-
if 200 <= _response.status_code < 300:
|
|
1042
|
-
return
|
|
1043
|
-
_response_json = _response.json()
|
|
1044
|
-
except JSONDecodeError:
|
|
1045
|
-
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1046
|
-
raise ApiError(status_code=_response.status_code, body=_response_json)
|