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
label_studio_sdk/ml/client.py
CHANGED
|
@@ -56,9 +56,9 @@ class MlClient:
|
|
|
56
56
|
_response = self._client_wrapper.httpx_client.request(
|
|
57
57
|
"api/ml/", method="GET", params={"project": project}, request_options=request_options
|
|
58
58
|
)
|
|
59
|
-
if 200 <= _response.status_code < 300:
|
|
60
|
-
return pydantic_v1.parse_obj_as(typing.List[MlBackend], _response.json()) # type: ignore
|
|
61
59
|
try:
|
|
60
|
+
if 200 <= _response.status_code < 300:
|
|
61
|
+
return pydantic_v1.parse_obj_as(typing.List[MlBackend], _response.json()) # type: ignore
|
|
62
62
|
_response_json = _response.json()
|
|
63
63
|
except JSONDecodeError:
|
|
64
64
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -153,9 +153,9 @@ class MlClient:
|
|
|
153
153
|
request_options=request_options,
|
|
154
154
|
omit=OMIT,
|
|
155
155
|
)
|
|
156
|
-
if 200 <= _response.status_code < 300:
|
|
157
|
-
return pydantic_v1.parse_obj_as(MlCreateResponse, _response.json()) # type: ignore
|
|
158
156
|
try:
|
|
157
|
+
if 200 <= _response.status_code < 300:
|
|
158
|
+
return pydantic_v1.parse_obj_as(MlCreateResponse, _response.json()) # type: ignore
|
|
159
159
|
_response_json = _response.json()
|
|
160
160
|
except JSONDecodeError:
|
|
161
161
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -194,9 +194,9 @@ class MlClient:
|
|
|
194
194
|
_response = self._client_wrapper.httpx_client.request(
|
|
195
195
|
f"api/ml/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
196
196
|
)
|
|
197
|
-
if 200 <= _response.status_code < 300:
|
|
198
|
-
return pydantic_v1.parse_obj_as(MlBackend, _response.json()) # type: ignore
|
|
199
197
|
try:
|
|
198
|
+
if 200 <= _response.status_code < 300:
|
|
199
|
+
return pydantic_v1.parse_obj_as(MlBackend, _response.json()) # type: ignore
|
|
200
200
|
_response_json = _response.json()
|
|
201
201
|
except JSONDecodeError:
|
|
202
202
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -234,9 +234,9 @@ class MlClient:
|
|
|
234
234
|
_response = self._client_wrapper.httpx_client.request(
|
|
235
235
|
f"api/ml/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
236
236
|
)
|
|
237
|
-
if 200 <= _response.status_code < 300:
|
|
238
|
-
return
|
|
239
237
|
try:
|
|
238
|
+
if 200 <= _response.status_code < 300:
|
|
239
|
+
return
|
|
240
240
|
_response_json = _response.json()
|
|
241
241
|
except JSONDecodeError:
|
|
242
242
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -335,9 +335,9 @@ class MlClient:
|
|
|
335
335
|
request_options=request_options,
|
|
336
336
|
omit=OMIT,
|
|
337
337
|
)
|
|
338
|
-
if 200 <= _response.status_code < 300:
|
|
339
|
-
return pydantic_v1.parse_obj_as(MlUpdateResponse, _response.json()) # type: ignore
|
|
340
338
|
try:
|
|
339
|
+
if 200 <= _response.status_code < 300:
|
|
340
|
+
return pydantic_v1.parse_obj_as(MlUpdateResponse, _response.json()) # type: ignore
|
|
341
341
|
_response_json = _response.json()
|
|
342
342
|
except JSONDecodeError:
|
|
343
343
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -397,9 +397,9 @@ class MlClient:
|
|
|
397
397
|
request_options=request_options,
|
|
398
398
|
omit=OMIT,
|
|
399
399
|
)
|
|
400
|
-
if 200 <= _response.status_code < 300:
|
|
401
|
-
return
|
|
402
400
|
try:
|
|
401
|
+
if 200 <= _response.status_code < 300:
|
|
402
|
+
return
|
|
403
403
|
_response_json = _response.json()
|
|
404
404
|
except JSONDecodeError:
|
|
405
405
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -452,11 +452,11 @@ class MlClient:
|
|
|
452
452
|
request_options=request_options,
|
|
453
453
|
omit=OMIT,
|
|
454
454
|
)
|
|
455
|
-
if 200 <= _response.status_code < 300:
|
|
456
|
-
return
|
|
457
|
-
if _response.status_code == 500:
|
|
458
|
-
raise InternalServerError(pydantic_v1.parse_obj_as(str, _response.json())) # type: ignore
|
|
459
455
|
try:
|
|
456
|
+
if 200 <= _response.status_code < 300:
|
|
457
|
+
return
|
|
458
|
+
if _response.status_code == 500:
|
|
459
|
+
raise InternalServerError(pydantic_v1.parse_obj_as(str, _response.json())) # type: ignore
|
|
460
460
|
_response_json = _response.json()
|
|
461
461
|
except JSONDecodeError:
|
|
462
462
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -491,9 +491,9 @@ class MlClient:
|
|
|
491
491
|
_response = self._client_wrapper.httpx_client.request(
|
|
492
492
|
f"api/ml/{jsonable_encoder(id)}/versions", method="GET", request_options=request_options
|
|
493
493
|
)
|
|
494
|
-
if 200 <= _response.status_code < 300:
|
|
495
|
-
return
|
|
496
494
|
try:
|
|
495
|
+
if 200 <= _response.status_code < 300:
|
|
496
|
+
return
|
|
497
497
|
_response_json = _response.json()
|
|
498
498
|
except JSONDecodeError:
|
|
499
499
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -537,9 +537,9 @@ class AsyncMlClient:
|
|
|
537
537
|
_response = await self._client_wrapper.httpx_client.request(
|
|
538
538
|
"api/ml/", method="GET", params={"project": project}, request_options=request_options
|
|
539
539
|
)
|
|
540
|
-
if 200 <= _response.status_code < 300:
|
|
541
|
-
return pydantic_v1.parse_obj_as(typing.List[MlBackend], _response.json()) # type: ignore
|
|
542
540
|
try:
|
|
541
|
+
if 200 <= _response.status_code < 300:
|
|
542
|
+
return pydantic_v1.parse_obj_as(typing.List[MlBackend], _response.json()) # type: ignore
|
|
543
543
|
_response_json = _response.json()
|
|
544
544
|
except JSONDecodeError:
|
|
545
545
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -634,9 +634,9 @@ class AsyncMlClient:
|
|
|
634
634
|
request_options=request_options,
|
|
635
635
|
omit=OMIT,
|
|
636
636
|
)
|
|
637
|
-
if 200 <= _response.status_code < 300:
|
|
638
|
-
return pydantic_v1.parse_obj_as(MlCreateResponse, _response.json()) # type: ignore
|
|
639
637
|
try:
|
|
638
|
+
if 200 <= _response.status_code < 300:
|
|
639
|
+
return pydantic_v1.parse_obj_as(MlCreateResponse, _response.json()) # type: ignore
|
|
640
640
|
_response_json = _response.json()
|
|
641
641
|
except JSONDecodeError:
|
|
642
642
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -675,9 +675,9 @@ class AsyncMlClient:
|
|
|
675
675
|
_response = await self._client_wrapper.httpx_client.request(
|
|
676
676
|
f"api/ml/{jsonable_encoder(id)}", method="GET", request_options=request_options
|
|
677
677
|
)
|
|
678
|
-
if 200 <= _response.status_code < 300:
|
|
679
|
-
return pydantic_v1.parse_obj_as(MlBackend, _response.json()) # type: ignore
|
|
680
678
|
try:
|
|
679
|
+
if 200 <= _response.status_code < 300:
|
|
680
|
+
return pydantic_v1.parse_obj_as(MlBackend, _response.json()) # type: ignore
|
|
681
681
|
_response_json = _response.json()
|
|
682
682
|
except JSONDecodeError:
|
|
683
683
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -715,9 +715,9 @@ class AsyncMlClient:
|
|
|
715
715
|
_response = await self._client_wrapper.httpx_client.request(
|
|
716
716
|
f"api/ml/{jsonable_encoder(id)}", method="DELETE", request_options=request_options
|
|
717
717
|
)
|
|
718
|
-
if 200 <= _response.status_code < 300:
|
|
719
|
-
return
|
|
720
718
|
try:
|
|
719
|
+
if 200 <= _response.status_code < 300:
|
|
720
|
+
return
|
|
721
721
|
_response_json = _response.json()
|
|
722
722
|
except JSONDecodeError:
|
|
723
723
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -816,9 +816,9 @@ class AsyncMlClient:
|
|
|
816
816
|
request_options=request_options,
|
|
817
817
|
omit=OMIT,
|
|
818
818
|
)
|
|
819
|
-
if 200 <= _response.status_code < 300:
|
|
820
|
-
return pydantic_v1.parse_obj_as(MlUpdateResponse, _response.json()) # type: ignore
|
|
821
819
|
try:
|
|
820
|
+
if 200 <= _response.status_code < 300:
|
|
821
|
+
return pydantic_v1.parse_obj_as(MlUpdateResponse, _response.json()) # type: ignore
|
|
822
822
|
_response_json = _response.json()
|
|
823
823
|
except JSONDecodeError:
|
|
824
824
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -878,9 +878,9 @@ class AsyncMlClient:
|
|
|
878
878
|
request_options=request_options,
|
|
879
879
|
omit=OMIT,
|
|
880
880
|
)
|
|
881
|
-
if 200 <= _response.status_code < 300:
|
|
882
|
-
return
|
|
883
881
|
try:
|
|
882
|
+
if 200 <= _response.status_code < 300:
|
|
883
|
+
return
|
|
884
884
|
_response_json = _response.json()
|
|
885
885
|
except JSONDecodeError:
|
|
886
886
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -933,11 +933,11 @@ class AsyncMlClient:
|
|
|
933
933
|
request_options=request_options,
|
|
934
934
|
omit=OMIT,
|
|
935
935
|
)
|
|
936
|
-
if 200 <= _response.status_code < 300:
|
|
937
|
-
return
|
|
938
|
-
if _response.status_code == 500:
|
|
939
|
-
raise InternalServerError(pydantic_v1.parse_obj_as(str, _response.json())) # type: ignore
|
|
940
936
|
try:
|
|
937
|
+
if 200 <= _response.status_code < 300:
|
|
938
|
+
return
|
|
939
|
+
if _response.status_code == 500:
|
|
940
|
+
raise InternalServerError(pydantic_v1.parse_obj_as(str, _response.json())) # type: ignore
|
|
941
941
|
_response_json = _response.json()
|
|
942
942
|
except JSONDecodeError:
|
|
943
943
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -972,9 +972,9 @@ class AsyncMlClient:
|
|
|
972
972
|
_response = await self._client_wrapper.httpx_client.request(
|
|
973
973
|
f"api/ml/{jsonable_encoder(id)}/versions", method="GET", request_options=request_options
|
|
974
974
|
)
|
|
975
|
-
if 200 <= _response.status_code < 300:
|
|
976
|
-
return
|
|
977
975
|
try:
|
|
976
|
+
if 200 <= _response.status_code < 300:
|
|
977
|
+
return
|
|
978
978
|
_response_json = _response.json()
|
|
979
979
|
except JSONDecodeError:
|
|
980
980
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -62,9 +62,9 @@ class PredictionsClient:
|
|
|
62
62
|
_response = self._client_wrapper.httpx_client.request(
|
|
63
63
|
"api/predictions/", method="GET", params={"task": task, "project": project}, request_options=request_options
|
|
64
64
|
)
|
|
65
|
-
if 200 <= _response.status_code < 300:
|
|
66
|
-
return pydantic_v1.parse_obj_as(typing.List[Prediction], _response.json()) # type: ignore
|
|
67
65
|
try:
|
|
66
|
+
if 200 <= _response.status_code < 300:
|
|
67
|
+
return pydantic_v1.parse_obj_as(typing.List[Prediction], _response.json()) # type: ignore
|
|
68
68
|
_response_json = _response.json()
|
|
69
69
|
except JSONDecodeError:
|
|
70
70
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -137,7 +137,7 @@ class PredictionsClient:
|
|
|
137
137
|
"width": 50,
|
|
138
138
|
"height": 60,
|
|
139
139
|
"rotation": 0,
|
|
140
|
-
"values": {"rectanglelabels":
|
|
140
|
+
"values": {"rectanglelabels": ["Person"]},
|
|
141
141
|
},
|
|
142
142
|
}
|
|
143
143
|
],
|
|
@@ -152,9 +152,9 @@ class PredictionsClient:
|
|
|
152
152
|
request_options=request_options,
|
|
153
153
|
omit=OMIT,
|
|
154
154
|
)
|
|
155
|
-
if 200 <= _response.status_code < 300:
|
|
156
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
157
155
|
try:
|
|
156
|
+
if 200 <= _response.status_code < 300:
|
|
157
|
+
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
158
158
|
_response_json = _response.json()
|
|
159
159
|
except JSONDecodeError:
|
|
160
160
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -193,9 +193,9 @@ class PredictionsClient:
|
|
|
193
193
|
_response = self._client_wrapper.httpx_client.request(
|
|
194
194
|
f"api/predictions/{jsonable_encoder(id)}/", method="GET", request_options=request_options
|
|
195
195
|
)
|
|
196
|
-
if 200 <= _response.status_code < 300:
|
|
197
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
198
196
|
try:
|
|
197
|
+
if 200 <= _response.status_code < 300:
|
|
198
|
+
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
199
199
|
_response_json = _response.json()
|
|
200
200
|
except JSONDecodeError:
|
|
201
201
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -231,9 +231,9 @@ class PredictionsClient:
|
|
|
231
231
|
_response = self._client_wrapper.httpx_client.request(
|
|
232
232
|
f"api/predictions/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
|
|
233
233
|
)
|
|
234
|
-
if 200 <= _response.status_code < 300:
|
|
235
|
-
return
|
|
236
234
|
try:
|
|
235
|
+
if 200 <= _response.status_code < 300:
|
|
236
|
+
return
|
|
237
237
|
_response_json = _response.json()
|
|
238
238
|
except JSONDecodeError:
|
|
239
239
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -302,7 +302,7 @@ class PredictionsClient:
|
|
|
302
302
|
"width": 50,
|
|
303
303
|
"height": 60,
|
|
304
304
|
"rotation": 0,
|
|
305
|
-
"values": {"rectanglelabels":
|
|
305
|
+
"values": {"rectanglelabels": ["Person"]},
|
|
306
306
|
},
|
|
307
307
|
}
|
|
308
308
|
],
|
|
@@ -317,9 +317,9 @@ class PredictionsClient:
|
|
|
317
317
|
request_options=request_options,
|
|
318
318
|
omit=OMIT,
|
|
319
319
|
)
|
|
320
|
-
if 200 <= _response.status_code < 300:
|
|
321
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
322
320
|
try:
|
|
321
|
+
if 200 <= _response.status_code < 300:
|
|
322
|
+
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
323
323
|
_response_json = _response.json()
|
|
324
324
|
except JSONDecodeError:
|
|
325
325
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -374,9 +374,9 @@ class AsyncPredictionsClient:
|
|
|
374
374
|
_response = await self._client_wrapper.httpx_client.request(
|
|
375
375
|
"api/predictions/", method="GET", params={"task": task, "project": project}, request_options=request_options
|
|
376
376
|
)
|
|
377
|
-
if 200 <= _response.status_code < 300:
|
|
378
|
-
return pydantic_v1.parse_obj_as(typing.List[Prediction], _response.json()) # type: ignore
|
|
379
377
|
try:
|
|
378
|
+
if 200 <= _response.status_code < 300:
|
|
379
|
+
return pydantic_v1.parse_obj_as(typing.List[Prediction], _response.json()) # type: ignore
|
|
380
380
|
_response_json = _response.json()
|
|
381
381
|
except JSONDecodeError:
|
|
382
382
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -449,7 +449,7 @@ class AsyncPredictionsClient:
|
|
|
449
449
|
"width": 50,
|
|
450
450
|
"height": 60,
|
|
451
451
|
"rotation": 0,
|
|
452
|
-
"values": {"rectanglelabels":
|
|
452
|
+
"values": {"rectanglelabels": ["Person"]},
|
|
453
453
|
},
|
|
454
454
|
}
|
|
455
455
|
],
|
|
@@ -464,9 +464,9 @@ class AsyncPredictionsClient:
|
|
|
464
464
|
request_options=request_options,
|
|
465
465
|
omit=OMIT,
|
|
466
466
|
)
|
|
467
|
-
if 200 <= _response.status_code < 300:
|
|
468
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
469
467
|
try:
|
|
468
|
+
if 200 <= _response.status_code < 300:
|
|
469
|
+
return pydantic_v1.parse_obj_as(Prediction, _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)
|
|
@@ -505,9 +505,9 @@ class AsyncPredictionsClient:
|
|
|
505
505
|
_response = await self._client_wrapper.httpx_client.request(
|
|
506
506
|
f"api/predictions/{jsonable_encoder(id)}/", method="GET", request_options=request_options
|
|
507
507
|
)
|
|
508
|
-
if 200 <= _response.status_code < 300:
|
|
509
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
510
508
|
try:
|
|
509
|
+
if 200 <= _response.status_code < 300:
|
|
510
|
+
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
511
511
|
_response_json = _response.json()
|
|
512
512
|
except JSONDecodeError:
|
|
513
513
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -543,9 +543,9 @@ class AsyncPredictionsClient:
|
|
|
543
543
|
_response = await self._client_wrapper.httpx_client.request(
|
|
544
544
|
f"api/predictions/{jsonable_encoder(id)}/", method="DELETE", request_options=request_options
|
|
545
545
|
)
|
|
546
|
-
if 200 <= _response.status_code < 300:
|
|
547
|
-
return
|
|
548
546
|
try:
|
|
547
|
+
if 200 <= _response.status_code < 300:
|
|
548
|
+
return
|
|
549
549
|
_response_json = _response.json()
|
|
550
550
|
except JSONDecodeError:
|
|
551
551
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -614,7 +614,7 @@ class AsyncPredictionsClient:
|
|
|
614
614
|
"width": 50,
|
|
615
615
|
"height": 60,
|
|
616
616
|
"rotation": 0,
|
|
617
|
-
"values": {"rectanglelabels":
|
|
617
|
+
"values": {"rectanglelabels": ["Person"]},
|
|
618
618
|
},
|
|
619
619
|
}
|
|
620
620
|
],
|
|
@@ -629,9 +629,9 @@ class AsyncPredictionsClient:
|
|
|
629
629
|
request_options=request_options,
|
|
630
630
|
omit=OMIT,
|
|
631
631
|
)
|
|
632
|
-
if 200 <= _response.status_code < 300:
|
|
633
|
-
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
634
632
|
try:
|
|
633
|
+
if 200 <= _response.status_code < 300:
|
|
634
|
+
return pydantic_v1.parse_obj_as(Prediction, _response.json()) # type: ignore
|
|
635
635
|
_response_json = _response.json()
|
|
636
636
|
except JSONDecodeError:
|
|
637
637
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
# This file was auto-generated by Fern from our API Definition.
|
|
2
2
|
|
|
3
|
-
from .types import ProjectsCreateResponse, ProjectsImportTasksResponse, ProjectsListResponse
|
|
3
|
+
from .types import ProjectsCreateResponse, ProjectsImportTasksResponse, ProjectsListResponse, ProjectsUpdateResponse
|
|
4
4
|
from . import exports
|
|
5
5
|
|
|
6
|
-
__all__ = [
|
|
6
|
+
__all__ = [
|
|
7
|
+
"ProjectsCreateResponse",
|
|
8
|
+
"ProjectsImportTasksResponse",
|
|
9
|
+
"ProjectsListResponse",
|
|
10
|
+
"ProjectsUpdateResponse",
|
|
11
|
+
"exports",
|
|
12
|
+
]
|