label-studio-sdk 1.0.2__py3-none-any.whl → 1.0.4__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 +20 -1
- label_studio_sdk/actions/client.py +8 -8
- label_studio_sdk/annotations/client.py +24 -24
- label_studio_sdk/base_client.py +3 -0
- label_studio_sdk/core/client_wrapper.py +1 -1
- label_studio_sdk/core/http_client.py +36 -8
- label_studio_sdk/core/request_options.py +2 -2
- label_studio_sdk/export_storage/__init__.py +2 -1
- label_studio_sdk/export_storage/azure/client.py +28 -28
- label_studio_sdk/export_storage/client.py +7 -4
- label_studio_sdk/export_storage/gcs/client.py +28 -28
- label_studio_sdk/export_storage/local/client.py +28 -28
- label_studio_sdk/export_storage/redis/client.py +28 -28
- label_studio_sdk/export_storage/s3/client.py +28 -28
- label_studio_sdk/export_storage/s3s/__init__.py +2 -0
- label_studio_sdk/export_storage/s3s/client.py +836 -0
- label_studio_sdk/files/client.py +24 -24
- label_studio_sdk/import_storage/__init__.py +2 -1
- label_studio_sdk/import_storage/azure/client.py +28 -28
- label_studio_sdk/import_storage/client.py +7 -4
- label_studio_sdk/import_storage/gcs/client.py +28 -28
- label_studio_sdk/import_storage/local/client.py +28 -28
- label_studio_sdk/import_storage/redis/client.py +28 -28
- label_studio_sdk/import_storage/s3/client.py +28 -28
- label_studio_sdk/import_storage/s3s/__init__.py +2 -0
- label_studio_sdk/import_storage/s3s/client.py +1054 -0
- label_studio_sdk/label_interface/base.py +2 -2
- label_studio_sdk/label_interface/control_tags.py +32 -18
- label_studio_sdk/label_interface/create.py +241 -0
- label_studio_sdk/label_interface/interface.py +68 -0
- label_studio_sdk/label_interface/object_tags.py +26 -10
- label_studio_sdk/label_interface/objects.py +5 -5
- label_studio_sdk/ml/client.py +36 -36
- label_studio_sdk/predictions/client.py +24 -24
- label_studio_sdk/projects/__init__.py +8 -2
- label_studio_sdk/projects/client.py +232 -69
- label_studio_sdk/projects/client_ext.py +16 -1
- label_studio_sdk/projects/exports/client.py +38 -38
- label_studio_sdk/projects/types/__init__.py +2 -1
- label_studio_sdk/projects/types/projects_update_response.py +96 -0
- label_studio_sdk/tasks/client.py +70 -60
- label_studio_sdk/tasks/client_ext.py +4 -0
- label_studio_sdk/types/__init__.py +16 -0
- label_studio_sdk/types/base_task.py +4 -2
- label_studio_sdk/types/base_task_file_upload.py +5 -0
- label_studio_sdk/types/base_task_updated_by.py +5 -0
- label_studio_sdk/types/data_manager_task_serializer.py +3 -2
- label_studio_sdk/types/data_manager_task_serializer_annotators_item.py +5 -0
- label_studio_sdk/types/s3s_export_storage.py +80 -0
- label_studio_sdk/types/s3s_import_storage.py +129 -0
- label_studio_sdk/types/s3s_import_storage_status.py +7 -0
- label_studio_sdk/types/task.py +3 -2
- label_studio_sdk/types/task_annotators_item.py +5 -0
- label_studio_sdk/types/workspace.py +77 -0
- label_studio_sdk/users/client.py +32 -32
- label_studio_sdk/views/client.py +24 -24
- label_studio_sdk/webhooks/client.py +24 -24
- label_studio_sdk/workspaces/__init__.py +6 -0
- label_studio_sdk/workspaces/client.py +569 -0
- label_studio_sdk/workspaces/members/__init__.py +5 -0
- label_studio_sdk/workspaces/members/client.py +297 -0
- label_studio_sdk/workspaces/members/types/__init__.py +6 -0
- label_studio_sdk/workspaces/members/types/members_create_response.py +32 -0
- label_studio_sdk/workspaces/members/types/members_list_response_item.py +32 -0
- {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/METADATA +11 -12
- {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/RECORD +67 -46
- {label_studio_sdk-1.0.2.dist-info → label_studio_sdk-1.0.4.dist-info}/WHEEL +0 -0
|
@@ -55,9 +55,9 @@ class LocalClient:
|
|
|
55
55
|
_response = self._client_wrapper.httpx_client.request(
|
|
56
56
|
"api/storages/localfiles/", method="GET", params={"project": project}, request_options=request_options
|
|
57
57
|
)
|
|
58
|
-
if 200 <= _response.status_code < 300:
|
|
59
|
-
return pydantic_v1.parse_obj_as(typing.List[LocalFilesImportStorage], _response.json()) # type: ignore
|
|
60
58
|
try:
|
|
59
|
+
if 200 <= _response.status_code < 300:
|
|
60
|
+
return pydantic_v1.parse_obj_as(typing.List[LocalFilesImportStorage], _response.json()) # type: ignore
|
|
61
61
|
_response_json = _response.json()
|
|
62
62
|
except JSONDecodeError:
|
|
63
63
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -132,9 +132,9 @@ class LocalClient:
|
|
|
132
132
|
request_options=request_options,
|
|
133
133
|
omit=OMIT,
|
|
134
134
|
)
|
|
135
|
-
if 200 <= _response.status_code < 300:
|
|
136
|
-
return pydantic_v1.parse_obj_as(LocalCreateResponse, _response.json()) # type: ignore
|
|
137
135
|
try:
|
|
136
|
+
if 200 <= _response.status_code < 300:
|
|
137
|
+
return pydantic_v1.parse_obj_as(LocalCreateResponse, _response.json()) # type: ignore
|
|
138
138
|
_response_json = _response.json()
|
|
139
139
|
except JSONDecodeError:
|
|
140
140
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -209,9 +209,9 @@ class LocalClient:
|
|
|
209
209
|
request_options=request_options,
|
|
210
210
|
omit=OMIT,
|
|
211
211
|
)
|
|
212
|
-
if 200 <= _response.status_code < 300:
|
|
213
|
-
return
|
|
214
212
|
try:
|
|
213
|
+
if 200 <= _response.status_code < 300:
|
|
214
|
+
return
|
|
215
215
|
_response_json = _response.json()
|
|
216
216
|
except JSONDecodeError:
|
|
217
217
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -250,9 +250,9 @@ class LocalClient:
|
|
|
250
250
|
_response = self._client_wrapper.httpx_client.request(
|
|
251
251
|
f"api/storages/localfiles/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
252
252
|
)
|
|
253
|
-
if 200 <= _response.status_code < 300:
|
|
254
|
-
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
255
253
|
try:
|
|
254
|
+
if 200 <= _response.status_code < 300:
|
|
255
|
+
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
256
256
|
_response_json = _response.json()
|
|
257
257
|
except JSONDecodeError:
|
|
258
258
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -292,9 +292,9 @@ class LocalClient:
|
|
|
292
292
|
_response = self._client_wrapper.httpx_client.request(
|
|
293
293
|
f"api/storages/localfiles/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
294
294
|
)
|
|
295
|
-
if 200 <= _response.status_code < 300:
|
|
296
|
-
return
|
|
297
295
|
try:
|
|
296
|
+
if 200 <= _response.status_code < 300:
|
|
297
|
+
return
|
|
298
298
|
_response_json = _response.json()
|
|
299
299
|
except JSONDecodeError:
|
|
300
300
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -373,9 +373,9 @@ class LocalClient:
|
|
|
373
373
|
request_options=request_options,
|
|
374
374
|
omit=OMIT,
|
|
375
375
|
)
|
|
376
|
-
if 200 <= _response.status_code < 300:
|
|
377
|
-
return pydantic_v1.parse_obj_as(LocalUpdateResponse, _response.json()) # type: ignore
|
|
378
376
|
try:
|
|
377
|
+
if 200 <= _response.status_code < 300:
|
|
378
|
+
return pydantic_v1.parse_obj_as(LocalUpdateResponse, _response.json()) # type: ignore
|
|
379
379
|
_response_json = _response.json()
|
|
380
380
|
except JSONDecodeError:
|
|
381
381
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -416,9 +416,9 @@ class LocalClient:
|
|
|
416
416
|
_response = self._client_wrapper.httpx_client.request(
|
|
417
417
|
f"api/storages/localfiles/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
418
418
|
)
|
|
419
|
-
if 200 <= _response.status_code < 300:
|
|
420
|
-
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
421
419
|
try:
|
|
420
|
+
if 200 <= _response.status_code < 300:
|
|
421
|
+
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
422
422
|
_response_json = _response.json()
|
|
423
423
|
except JSONDecodeError:
|
|
424
424
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -464,9 +464,9 @@ class AsyncLocalClient:
|
|
|
464
464
|
_response = await self._client_wrapper.httpx_client.request(
|
|
465
465
|
"api/storages/localfiles/", method="GET", params={"project": project}, request_options=request_options
|
|
466
466
|
)
|
|
467
|
-
if 200 <= _response.status_code < 300:
|
|
468
|
-
return pydantic_v1.parse_obj_as(typing.List[LocalFilesImportStorage], _response.json()) # type: ignore
|
|
469
467
|
try:
|
|
468
|
+
if 200 <= _response.status_code < 300:
|
|
469
|
+
return pydantic_v1.parse_obj_as(typing.List[LocalFilesImportStorage], _response.json()) # type: ignore
|
|
470
470
|
_response_json = _response.json()
|
|
471
471
|
except JSONDecodeError:
|
|
472
472
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -541,9 +541,9 @@ class AsyncLocalClient:
|
|
|
541
541
|
request_options=request_options,
|
|
542
542
|
omit=OMIT,
|
|
543
543
|
)
|
|
544
|
-
if 200 <= _response.status_code < 300:
|
|
545
|
-
return pydantic_v1.parse_obj_as(LocalCreateResponse, _response.json()) # type: ignore
|
|
546
544
|
try:
|
|
545
|
+
if 200 <= _response.status_code < 300:
|
|
546
|
+
return pydantic_v1.parse_obj_as(LocalCreateResponse, _response.json()) # type: ignore
|
|
547
547
|
_response_json = _response.json()
|
|
548
548
|
except JSONDecodeError:
|
|
549
549
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -618,9 +618,9 @@ class AsyncLocalClient:
|
|
|
618
618
|
request_options=request_options,
|
|
619
619
|
omit=OMIT,
|
|
620
620
|
)
|
|
621
|
-
if 200 <= _response.status_code < 300:
|
|
622
|
-
return
|
|
623
621
|
try:
|
|
622
|
+
if 200 <= _response.status_code < 300:
|
|
623
|
+
return
|
|
624
624
|
_response_json = _response.json()
|
|
625
625
|
except JSONDecodeError:
|
|
626
626
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -659,9 +659,9 @@ class AsyncLocalClient:
|
|
|
659
659
|
_response = await self._client_wrapper.httpx_client.request(
|
|
660
660
|
f"api/storages/localfiles/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
661
661
|
)
|
|
662
|
-
if 200 <= _response.status_code < 300:
|
|
663
|
-
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
664
662
|
try:
|
|
663
|
+
if 200 <= _response.status_code < 300:
|
|
664
|
+
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
665
665
|
_response_json = _response.json()
|
|
666
666
|
except JSONDecodeError:
|
|
667
667
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -701,9 +701,9 @@ class AsyncLocalClient:
|
|
|
701
701
|
_response = await self._client_wrapper.httpx_client.request(
|
|
702
702
|
f"api/storages/localfiles/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
703
703
|
)
|
|
704
|
-
if 200 <= _response.status_code < 300:
|
|
705
|
-
return
|
|
706
704
|
try:
|
|
705
|
+
if 200 <= _response.status_code < 300:
|
|
706
|
+
return
|
|
707
707
|
_response_json = _response.json()
|
|
708
708
|
except JSONDecodeError:
|
|
709
709
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -782,9 +782,9 @@ class AsyncLocalClient:
|
|
|
782
782
|
request_options=request_options,
|
|
783
783
|
omit=OMIT,
|
|
784
784
|
)
|
|
785
|
-
if 200 <= _response.status_code < 300:
|
|
786
|
-
return pydantic_v1.parse_obj_as(LocalUpdateResponse, _response.json()) # type: ignore
|
|
787
785
|
try:
|
|
786
|
+
if 200 <= _response.status_code < 300:
|
|
787
|
+
return pydantic_v1.parse_obj_as(LocalUpdateResponse, _response.json()) # type: ignore
|
|
788
788
|
_response_json = _response.json()
|
|
789
789
|
except JSONDecodeError:
|
|
790
790
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -827,9 +827,9 @@ class AsyncLocalClient:
|
|
|
827
827
|
_response = await self._client_wrapper.httpx_client.request(
|
|
828
828
|
f"api/storages/localfiles/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
829
829
|
)
|
|
830
|
-
if 200 <= _response.status_code < 300:
|
|
831
|
-
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
832
830
|
try:
|
|
831
|
+
if 200 <= _response.status_code < 300:
|
|
832
|
+
return pydantic_v1.parse_obj_as(LocalFilesImportStorage, _response.json()) # type: ignore
|
|
833
833
|
_response_json = _response.json()
|
|
834
834
|
except JSONDecodeError:
|
|
835
835
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -55,9 +55,9 @@ class RedisClient:
|
|
|
55
55
|
_response = self._client_wrapper.httpx_client.request(
|
|
56
56
|
"api/storages/redis/", method="GET", params={"project": project}, request_options=request_options
|
|
57
57
|
)
|
|
58
|
-
if 200 <= _response.status_code < 300:
|
|
59
|
-
return pydantic_v1.parse_obj_as(typing.List[RedisImportStorage], _response.json()) # type: ignore
|
|
60
58
|
try:
|
|
59
|
+
if 200 <= _response.status_code < 300:
|
|
60
|
+
return pydantic_v1.parse_obj_as(typing.List[RedisImportStorage], _response.json()) # type: ignore
|
|
61
61
|
_response_json = _response.json()
|
|
62
62
|
except JSONDecodeError:
|
|
63
63
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -147,9 +147,9 @@ class RedisClient:
|
|
|
147
147
|
request_options=request_options,
|
|
148
148
|
omit=OMIT,
|
|
149
149
|
)
|
|
150
|
-
if 200 <= _response.status_code < 300:
|
|
151
|
-
return pydantic_v1.parse_obj_as(RedisCreateResponse, _response.json()) # type: ignore
|
|
152
150
|
try:
|
|
151
|
+
if 200 <= _response.status_code < 300:
|
|
152
|
+
return pydantic_v1.parse_obj_as(RedisCreateResponse, _response.json()) # type: ignore
|
|
153
153
|
_response_json = _response.json()
|
|
154
154
|
except JSONDecodeError:
|
|
155
155
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -239,9 +239,9 @@ class RedisClient:
|
|
|
239
239
|
request_options=request_options,
|
|
240
240
|
omit=OMIT,
|
|
241
241
|
)
|
|
242
|
-
if 200 <= _response.status_code < 300:
|
|
243
|
-
return
|
|
244
242
|
try:
|
|
243
|
+
if 200 <= _response.status_code < 300:
|
|
244
|
+
return
|
|
245
245
|
_response_json = _response.json()
|
|
246
246
|
except JSONDecodeError:
|
|
247
247
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -280,9 +280,9 @@ class RedisClient:
|
|
|
280
280
|
_response = self._client_wrapper.httpx_client.request(
|
|
281
281
|
f"api/storages/redis/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
282
282
|
)
|
|
283
|
-
if 200 <= _response.status_code < 300:
|
|
284
|
-
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
285
283
|
try:
|
|
284
|
+
if 200 <= _response.status_code < 300:
|
|
285
|
+
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
286
286
|
_response_json = _response.json()
|
|
287
287
|
except JSONDecodeError:
|
|
288
288
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -322,9 +322,9 @@ class RedisClient:
|
|
|
322
322
|
_response = self._client_wrapper.httpx_client.request(
|
|
323
323
|
f"api/storages/redis/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
324
324
|
)
|
|
325
|
-
if 200 <= _response.status_code < 300:
|
|
326
|
-
return
|
|
327
325
|
try:
|
|
326
|
+
if 200 <= _response.status_code < 300:
|
|
327
|
+
return
|
|
328
328
|
_response_json = _response.json()
|
|
329
329
|
except JSONDecodeError:
|
|
330
330
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -418,9 +418,9 @@ class RedisClient:
|
|
|
418
418
|
request_options=request_options,
|
|
419
419
|
omit=OMIT,
|
|
420
420
|
)
|
|
421
|
-
if 200 <= _response.status_code < 300:
|
|
422
|
-
return pydantic_v1.parse_obj_as(RedisUpdateResponse, _response.json()) # type: ignore
|
|
423
421
|
try:
|
|
422
|
+
if 200 <= _response.status_code < 300:
|
|
423
|
+
return pydantic_v1.parse_obj_as(RedisUpdateResponse, _response.json()) # type: ignore
|
|
424
424
|
_response_json = _response.json()
|
|
425
425
|
except JSONDecodeError:
|
|
426
426
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -461,9 +461,9 @@ class RedisClient:
|
|
|
461
461
|
_response = self._client_wrapper.httpx_client.request(
|
|
462
462
|
f"api/storages/redis/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
463
463
|
)
|
|
464
|
-
if 200 <= _response.status_code < 300:
|
|
465
|
-
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
466
464
|
try:
|
|
465
|
+
if 200 <= _response.status_code < 300:
|
|
466
|
+
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
467
467
|
_response_json = _response.json()
|
|
468
468
|
except JSONDecodeError:
|
|
469
469
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -509,9 +509,9 @@ class AsyncRedisClient:
|
|
|
509
509
|
_response = await self._client_wrapper.httpx_client.request(
|
|
510
510
|
"api/storages/redis/", method="GET", params={"project": project}, request_options=request_options
|
|
511
511
|
)
|
|
512
|
-
if 200 <= _response.status_code < 300:
|
|
513
|
-
return pydantic_v1.parse_obj_as(typing.List[RedisImportStorage], _response.json()) # type: ignore
|
|
514
512
|
try:
|
|
513
|
+
if 200 <= _response.status_code < 300:
|
|
514
|
+
return pydantic_v1.parse_obj_as(typing.List[RedisImportStorage], _response.json()) # type: ignore
|
|
515
515
|
_response_json = _response.json()
|
|
516
516
|
except JSONDecodeError:
|
|
517
517
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -601,9 +601,9 @@ class AsyncRedisClient:
|
|
|
601
601
|
request_options=request_options,
|
|
602
602
|
omit=OMIT,
|
|
603
603
|
)
|
|
604
|
-
if 200 <= _response.status_code < 300:
|
|
605
|
-
return pydantic_v1.parse_obj_as(RedisCreateResponse, _response.json()) # type: ignore
|
|
606
604
|
try:
|
|
605
|
+
if 200 <= _response.status_code < 300:
|
|
606
|
+
return pydantic_v1.parse_obj_as(RedisCreateResponse, _response.json()) # type: ignore
|
|
607
607
|
_response_json = _response.json()
|
|
608
608
|
except JSONDecodeError:
|
|
609
609
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -693,9 +693,9 @@ class AsyncRedisClient:
|
|
|
693
693
|
request_options=request_options,
|
|
694
694
|
omit=OMIT,
|
|
695
695
|
)
|
|
696
|
-
if 200 <= _response.status_code < 300:
|
|
697
|
-
return
|
|
698
696
|
try:
|
|
697
|
+
if 200 <= _response.status_code < 300:
|
|
698
|
+
return
|
|
699
699
|
_response_json = _response.json()
|
|
700
700
|
except JSONDecodeError:
|
|
701
701
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -734,9 +734,9 @@ class AsyncRedisClient:
|
|
|
734
734
|
_response = await self._client_wrapper.httpx_client.request(
|
|
735
735
|
f"api/storages/redis/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
736
736
|
)
|
|
737
|
-
if 200 <= _response.status_code < 300:
|
|
738
|
-
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
739
737
|
try:
|
|
738
|
+
if 200 <= _response.status_code < 300:
|
|
739
|
+
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
740
740
|
_response_json = _response.json()
|
|
741
741
|
except JSONDecodeError:
|
|
742
742
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -776,9 +776,9 @@ class AsyncRedisClient:
|
|
|
776
776
|
_response = await self._client_wrapper.httpx_client.request(
|
|
777
777
|
f"api/storages/redis/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
778
778
|
)
|
|
779
|
-
if 200 <= _response.status_code < 300:
|
|
780
|
-
return
|
|
781
779
|
try:
|
|
780
|
+
if 200 <= _response.status_code < 300:
|
|
781
|
+
return
|
|
782
782
|
_response_json = _response.json()
|
|
783
783
|
except JSONDecodeError:
|
|
784
784
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -872,9 +872,9 @@ class AsyncRedisClient:
|
|
|
872
872
|
request_options=request_options,
|
|
873
873
|
omit=OMIT,
|
|
874
874
|
)
|
|
875
|
-
if 200 <= _response.status_code < 300:
|
|
876
|
-
return pydantic_v1.parse_obj_as(RedisUpdateResponse, _response.json()) # type: ignore
|
|
877
875
|
try:
|
|
876
|
+
if 200 <= _response.status_code < 300:
|
|
877
|
+
return pydantic_v1.parse_obj_as(RedisUpdateResponse, _response.json()) # type: ignore
|
|
878
878
|
_response_json = _response.json()
|
|
879
879
|
except JSONDecodeError:
|
|
880
880
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -915,9 +915,9 @@ class AsyncRedisClient:
|
|
|
915
915
|
_response = await self._client_wrapper.httpx_client.request(
|
|
916
916
|
f"api/storages/redis/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
917
917
|
)
|
|
918
|
-
if 200 <= _response.status_code < 300:
|
|
919
|
-
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
920
918
|
try:
|
|
919
|
+
if 200 <= _response.status_code < 300:
|
|
920
|
+
return pydantic_v1.parse_obj_as(RedisImportStorage, _response.json()) # type: ignore
|
|
921
921
|
_response_json = _response.json()
|
|
922
922
|
except JSONDecodeError:
|
|
923
923
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -55,9 +55,9 @@ class S3Client:
|
|
|
55
55
|
_response = self._client_wrapper.httpx_client.request(
|
|
56
56
|
"api/storages/s3/", method="GET", params={"project": project}, request_options=request_options
|
|
57
57
|
)
|
|
58
|
-
if 200 <= _response.status_code < 300:
|
|
59
|
-
return pydantic_v1.parse_obj_as(typing.List[S3ImportStorage], _response.json()) # type: ignore
|
|
60
58
|
try:
|
|
59
|
+
if 200 <= _response.status_code < 300:
|
|
60
|
+
return pydantic_v1.parse_obj_as(typing.List[S3ImportStorage], _response.json()) # type: ignore
|
|
61
61
|
_response_json = _response.json()
|
|
62
62
|
except JSONDecodeError:
|
|
63
63
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -184,9 +184,9 @@ class S3Client:
|
|
|
184
184
|
request_options=request_options,
|
|
185
185
|
omit=OMIT,
|
|
186
186
|
)
|
|
187
|
-
if 200 <= _response.status_code < 300:
|
|
188
|
-
return pydantic_v1.parse_obj_as(S3CreateResponse, _response.json()) # type: ignore
|
|
189
187
|
try:
|
|
188
|
+
if 200 <= _response.status_code < 300:
|
|
189
|
+
return pydantic_v1.parse_obj_as(S3CreateResponse, _response.json()) # type: ignore
|
|
190
190
|
_response_json = _response.json()
|
|
191
191
|
except JSONDecodeError:
|
|
192
192
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -311,9 +311,9 @@ class S3Client:
|
|
|
311
311
|
request_options=request_options,
|
|
312
312
|
omit=OMIT,
|
|
313
313
|
)
|
|
314
|
-
if 200 <= _response.status_code < 300:
|
|
315
|
-
return
|
|
316
314
|
try:
|
|
315
|
+
if 200 <= _response.status_code < 300:
|
|
316
|
+
return
|
|
317
317
|
_response_json = _response.json()
|
|
318
318
|
except JSONDecodeError:
|
|
319
319
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -352,9 +352,9 @@ class S3Client:
|
|
|
352
352
|
_response = self._client_wrapper.httpx_client.request(
|
|
353
353
|
f"api/storages/s3/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
354
354
|
)
|
|
355
|
-
if 200 <= _response.status_code < 300:
|
|
356
|
-
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
357
355
|
try:
|
|
356
|
+
if 200 <= _response.status_code < 300:
|
|
357
|
+
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
358
358
|
_response_json = _response.json()
|
|
359
359
|
except JSONDecodeError:
|
|
360
360
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -394,9 +394,9 @@ class S3Client:
|
|
|
394
394
|
_response = self._client_wrapper.httpx_client.request(
|
|
395
395
|
f"api/storages/s3/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
396
396
|
)
|
|
397
|
-
if 200 <= _response.status_code < 300:
|
|
398
|
-
return
|
|
399
397
|
try:
|
|
398
|
+
if 200 <= _response.status_code < 300:
|
|
399
|
+
return
|
|
400
400
|
_response_json = _response.json()
|
|
401
401
|
except JSONDecodeError:
|
|
402
402
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -525,9 +525,9 @@ class S3Client:
|
|
|
525
525
|
request_options=request_options,
|
|
526
526
|
omit=OMIT,
|
|
527
527
|
)
|
|
528
|
-
if 200 <= _response.status_code < 300:
|
|
529
|
-
return pydantic_v1.parse_obj_as(S3UpdateResponse, _response.json()) # type: ignore
|
|
530
528
|
try:
|
|
529
|
+
if 200 <= _response.status_code < 300:
|
|
530
|
+
return pydantic_v1.parse_obj_as(S3UpdateResponse, _response.json()) # type: ignore
|
|
531
531
|
_response_json = _response.json()
|
|
532
532
|
except JSONDecodeError:
|
|
533
533
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -568,9 +568,9 @@ class S3Client:
|
|
|
568
568
|
_response = self._client_wrapper.httpx_client.request(
|
|
569
569
|
f"api/storages/s3/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
570
570
|
)
|
|
571
|
-
if 200 <= _response.status_code < 300:
|
|
572
|
-
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
573
571
|
try:
|
|
572
|
+
if 200 <= _response.status_code < 300:
|
|
573
|
+
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
574
574
|
_response_json = _response.json()
|
|
575
575
|
except JSONDecodeError:
|
|
576
576
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -616,9 +616,9 @@ class AsyncS3Client:
|
|
|
616
616
|
_response = await self._client_wrapper.httpx_client.request(
|
|
617
617
|
"api/storages/s3/", method="GET", params={"project": project}, request_options=request_options
|
|
618
618
|
)
|
|
619
|
-
if 200 <= _response.status_code < 300:
|
|
620
|
-
return pydantic_v1.parse_obj_as(typing.List[S3ImportStorage], _response.json()) # type: ignore
|
|
621
619
|
try:
|
|
620
|
+
if 200 <= _response.status_code < 300:
|
|
621
|
+
return pydantic_v1.parse_obj_as(typing.List[S3ImportStorage], _response.json()) # type: ignore
|
|
622
622
|
_response_json = _response.json()
|
|
623
623
|
except JSONDecodeError:
|
|
624
624
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -745,9 +745,9 @@ class AsyncS3Client:
|
|
|
745
745
|
request_options=request_options,
|
|
746
746
|
omit=OMIT,
|
|
747
747
|
)
|
|
748
|
-
if 200 <= _response.status_code < 300:
|
|
749
|
-
return pydantic_v1.parse_obj_as(S3CreateResponse, _response.json()) # type: ignore
|
|
750
748
|
try:
|
|
749
|
+
if 200 <= _response.status_code < 300:
|
|
750
|
+
return pydantic_v1.parse_obj_as(S3CreateResponse, _response.json()) # type: ignore
|
|
751
751
|
_response_json = _response.json()
|
|
752
752
|
except JSONDecodeError:
|
|
753
753
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -872,9 +872,9 @@ class AsyncS3Client:
|
|
|
872
872
|
request_options=request_options,
|
|
873
873
|
omit=OMIT,
|
|
874
874
|
)
|
|
875
|
-
if 200 <= _response.status_code < 300:
|
|
876
|
-
return
|
|
877
875
|
try:
|
|
876
|
+
if 200 <= _response.status_code < 300:
|
|
877
|
+
return
|
|
878
878
|
_response_json = _response.json()
|
|
879
879
|
except JSONDecodeError:
|
|
880
880
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -913,9 +913,9 @@ class AsyncS3Client:
|
|
|
913
913
|
_response = await self._client_wrapper.httpx_client.request(
|
|
914
914
|
f"api/storages/s3/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
915
915
|
)
|
|
916
|
-
if 200 <= _response.status_code < 300:
|
|
917
|
-
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
918
916
|
try:
|
|
917
|
+
if 200 <= _response.status_code < 300:
|
|
918
|
+
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
919
919
|
_response_json = _response.json()
|
|
920
920
|
except JSONDecodeError:
|
|
921
921
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -955,9 +955,9 @@ class AsyncS3Client:
|
|
|
955
955
|
_response = await self._client_wrapper.httpx_client.request(
|
|
956
956
|
f"api/storages/s3/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
957
957
|
)
|
|
958
|
-
if 200 <= _response.status_code < 300:
|
|
959
|
-
return
|
|
960
958
|
try:
|
|
959
|
+
if 200 <= _response.status_code < 300:
|
|
960
|
+
return
|
|
961
961
|
_response_json = _response.json()
|
|
962
962
|
except JSONDecodeError:
|
|
963
963
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -1086,9 +1086,9 @@ class AsyncS3Client:
|
|
|
1086
1086
|
request_options=request_options,
|
|
1087
1087
|
omit=OMIT,
|
|
1088
1088
|
)
|
|
1089
|
-
if 200 <= _response.status_code < 300:
|
|
1090
|
-
return pydantic_v1.parse_obj_as(S3UpdateResponse, _response.json()) # type: ignore
|
|
1091
1089
|
try:
|
|
1090
|
+
if 200 <= _response.status_code < 300:
|
|
1091
|
+
return pydantic_v1.parse_obj_as(S3UpdateResponse, _response.json()) # type: ignore
|
|
1092
1092
|
_response_json = _response.json()
|
|
1093
1093
|
except JSONDecodeError:
|
|
1094
1094
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -1129,9 +1129,9 @@ class AsyncS3Client:
|
|
|
1129
1129
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1130
1130
|
f"api/storages/s3/{jsonable_encoder(id)}/sync", method="POST", request_options=request_options
|
|
1131
1131
|
)
|
|
1132
|
-
if 200 <= _response.status_code < 300:
|
|
1133
|
-
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
1134
1132
|
try:
|
|
1133
|
+
if 200 <= _response.status_code < 300:
|
|
1134
|
+
return pydantic_v1.parse_obj_as(S3ImportStorage, _response.json()) # type: ignore
|
|
1135
1135
|
_response_json = _response.json()
|
|
1136
1136
|
except JSONDecodeError:
|
|
1137
1137
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|