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
|
@@ -0,0 +1,764 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from ...core.client_wrapper import SyncClientWrapper
|
|
5
|
+
from .types.assignments_bulk_assign_request_selected_items import AssignmentsBulkAssignRequestSelectedItems
|
|
6
|
+
from .types.assignments_bulk_assign_request_type import AssignmentsBulkAssignRequestType
|
|
7
|
+
from .types.assignments_bulk_assign_request_filters import AssignmentsBulkAssignRequestFilters
|
|
8
|
+
from ...core.request_options import RequestOptions
|
|
9
|
+
from .types.assignments_bulk_assign_response import AssignmentsBulkAssignResponse
|
|
10
|
+
from ...core.jsonable_encoder import jsonable_encoder
|
|
11
|
+
from ...core.serialization import convert_and_respect_annotation_metadata
|
|
12
|
+
from ...core.unchecked_base_model import construct_type
|
|
13
|
+
from ...errors.bad_request_error import BadRequestError
|
|
14
|
+
from json.decoder import JSONDecodeError
|
|
15
|
+
from ...core.api_error import ApiError
|
|
16
|
+
from ...types.task_assignment import TaskAssignment
|
|
17
|
+
from .types.assignments_assign_request_type import AssignmentsAssignRequestType
|
|
18
|
+
from .types.assignments_update_request_type import AssignmentsUpdateRequestType
|
|
19
|
+
from ...core.client_wrapper import AsyncClientWrapper
|
|
20
|
+
|
|
21
|
+
# this is used as the default value for optional parameters
|
|
22
|
+
OMIT = typing.cast(typing.Any, ...)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
class AssignmentsClient:
|
|
26
|
+
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
27
|
+
self._client_wrapper = client_wrapper
|
|
28
|
+
|
|
29
|
+
def bulk_assign(
|
|
30
|
+
self,
|
|
31
|
+
id: int,
|
|
32
|
+
*,
|
|
33
|
+
selected_items: AssignmentsBulkAssignRequestSelectedItems,
|
|
34
|
+
type: AssignmentsBulkAssignRequestType,
|
|
35
|
+
users: typing.Sequence[int],
|
|
36
|
+
filters: typing.Optional[AssignmentsBulkAssignRequestFilters] = OMIT,
|
|
37
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
38
|
+
) -> AssignmentsBulkAssignResponse:
|
|
39
|
+
"""
|
|
40
|
+
Assign multiple tasks to a specific user for a specific project.
|
|
41
|
+
|
|
42
|
+
Parameters
|
|
43
|
+
----------
|
|
44
|
+
id : int
|
|
45
|
+
|
|
46
|
+
selected_items : AssignmentsBulkAssignRequestSelectedItems
|
|
47
|
+
Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.<br>Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`
|
|
48
|
+
|
|
49
|
+
type : AssignmentsBulkAssignRequestType
|
|
50
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
51
|
+
|
|
52
|
+
users : typing.Sequence[int]
|
|
53
|
+
List of user IDs to assign
|
|
54
|
+
|
|
55
|
+
filters : typing.Optional[AssignmentsBulkAssignRequestFilters]
|
|
56
|
+
Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.<br>Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`
|
|
57
|
+
|
|
58
|
+
request_options : typing.Optional[RequestOptions]
|
|
59
|
+
Request-specific configuration.
|
|
60
|
+
|
|
61
|
+
Returns
|
|
62
|
+
-------
|
|
63
|
+
AssignmentsBulkAssignResponse
|
|
64
|
+
Success
|
|
65
|
+
|
|
66
|
+
Examples
|
|
67
|
+
--------
|
|
68
|
+
from label_studio_sdk import LabelStudio
|
|
69
|
+
from label_studio_sdk.projects.assignments import (
|
|
70
|
+
AssignmentsBulkAssignRequestSelectedItemsIncluded,
|
|
71
|
+
)
|
|
72
|
+
|
|
73
|
+
client = LabelStudio(
|
|
74
|
+
api_key="YOUR_API_KEY",
|
|
75
|
+
)
|
|
76
|
+
client.projects.assignments.bulk_assign(
|
|
77
|
+
id=1,
|
|
78
|
+
selected_items=AssignmentsBulkAssignRequestSelectedItemsIncluded(
|
|
79
|
+
all_=True,
|
|
80
|
+
),
|
|
81
|
+
type="AN",
|
|
82
|
+
users=[1],
|
|
83
|
+
)
|
|
84
|
+
"""
|
|
85
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
86
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/assignees",
|
|
87
|
+
method="POST",
|
|
88
|
+
json={
|
|
89
|
+
"filters": convert_and_respect_annotation_metadata(
|
|
90
|
+
object_=filters, annotation=AssignmentsBulkAssignRequestFilters, direction="write"
|
|
91
|
+
),
|
|
92
|
+
"selectedItems": convert_and_respect_annotation_metadata(
|
|
93
|
+
object_=selected_items, annotation=AssignmentsBulkAssignRequestSelectedItems, direction="write"
|
|
94
|
+
),
|
|
95
|
+
"type": type,
|
|
96
|
+
"users": users,
|
|
97
|
+
},
|
|
98
|
+
headers={
|
|
99
|
+
"content-type": "application/json",
|
|
100
|
+
},
|
|
101
|
+
request_options=request_options,
|
|
102
|
+
omit=OMIT,
|
|
103
|
+
)
|
|
104
|
+
try:
|
|
105
|
+
if 200 <= _response.status_code < 300:
|
|
106
|
+
return typing.cast(
|
|
107
|
+
AssignmentsBulkAssignResponse,
|
|
108
|
+
construct_type(
|
|
109
|
+
type_=AssignmentsBulkAssignResponse, # type: ignore
|
|
110
|
+
object_=_response.json(),
|
|
111
|
+
),
|
|
112
|
+
)
|
|
113
|
+
if _response.status_code == 400:
|
|
114
|
+
raise BadRequestError(
|
|
115
|
+
typing.cast(
|
|
116
|
+
typing.Optional[typing.Any],
|
|
117
|
+
construct_type(
|
|
118
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
119
|
+
object_=_response.json(),
|
|
120
|
+
),
|
|
121
|
+
)
|
|
122
|
+
)
|
|
123
|
+
_response_json = _response.json()
|
|
124
|
+
except JSONDecodeError:
|
|
125
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
126
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
127
|
+
|
|
128
|
+
def list(
|
|
129
|
+
self, id: int, task_pk: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
130
|
+
) -> typing.List[TaskAssignment]:
|
|
131
|
+
"""
|
|
132
|
+
Retrieve a list of tasks and assignees for those tasks for a specific project.
|
|
133
|
+
|
|
134
|
+
Parameters
|
|
135
|
+
----------
|
|
136
|
+
id : int
|
|
137
|
+
A unique integer value identifying this project.
|
|
138
|
+
|
|
139
|
+
task_pk : int
|
|
140
|
+
A unique integer value identifying this task.
|
|
141
|
+
|
|
142
|
+
request_options : typing.Optional[RequestOptions]
|
|
143
|
+
Request-specific configuration.
|
|
144
|
+
|
|
145
|
+
Returns
|
|
146
|
+
-------
|
|
147
|
+
typing.List[TaskAssignment]
|
|
148
|
+
List of assignments for the task
|
|
149
|
+
|
|
150
|
+
Examples
|
|
151
|
+
--------
|
|
152
|
+
from label_studio_sdk import LabelStudio
|
|
153
|
+
|
|
154
|
+
client = LabelStudio(
|
|
155
|
+
api_key="YOUR_API_KEY",
|
|
156
|
+
)
|
|
157
|
+
client.projects.assignments.list(
|
|
158
|
+
id=1,
|
|
159
|
+
task_pk=1,
|
|
160
|
+
)
|
|
161
|
+
"""
|
|
162
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
163
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
164
|
+
method="GET",
|
|
165
|
+
request_options=request_options,
|
|
166
|
+
)
|
|
167
|
+
try:
|
|
168
|
+
if 200 <= _response.status_code < 300:
|
|
169
|
+
return typing.cast(
|
|
170
|
+
typing.List[TaskAssignment],
|
|
171
|
+
construct_type(
|
|
172
|
+
type_=typing.List[TaskAssignment], # type: ignore
|
|
173
|
+
object_=_response.json(),
|
|
174
|
+
),
|
|
175
|
+
)
|
|
176
|
+
_response_json = _response.json()
|
|
177
|
+
except JSONDecodeError:
|
|
178
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
179
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
180
|
+
|
|
181
|
+
def assign(
|
|
182
|
+
self,
|
|
183
|
+
id: int,
|
|
184
|
+
task_pk: int,
|
|
185
|
+
*,
|
|
186
|
+
type: AssignmentsAssignRequestType,
|
|
187
|
+
users: typing.Sequence[int],
|
|
188
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
189
|
+
) -> TaskAssignment:
|
|
190
|
+
"""
|
|
191
|
+
Assign a user to a task in a specific project.
|
|
192
|
+
|
|
193
|
+
Parameters
|
|
194
|
+
----------
|
|
195
|
+
id : int
|
|
196
|
+
A unique integer value identifying this project.
|
|
197
|
+
|
|
198
|
+
task_pk : int
|
|
199
|
+
A unique integer value identifying this task.
|
|
200
|
+
|
|
201
|
+
type : AssignmentsAssignRequestType
|
|
202
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
203
|
+
|
|
204
|
+
users : typing.Sequence[int]
|
|
205
|
+
List of user IDs to assign
|
|
206
|
+
|
|
207
|
+
request_options : typing.Optional[RequestOptions]
|
|
208
|
+
Request-specific configuration.
|
|
209
|
+
|
|
210
|
+
Returns
|
|
211
|
+
-------
|
|
212
|
+
TaskAssignment
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
Examples
|
|
216
|
+
--------
|
|
217
|
+
from label_studio_sdk import LabelStudio
|
|
218
|
+
|
|
219
|
+
client = LabelStudio(
|
|
220
|
+
api_key="YOUR_API_KEY",
|
|
221
|
+
)
|
|
222
|
+
client.projects.assignments.assign(
|
|
223
|
+
id=1,
|
|
224
|
+
task_pk=1,
|
|
225
|
+
type="AN",
|
|
226
|
+
users=[1],
|
|
227
|
+
)
|
|
228
|
+
"""
|
|
229
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
230
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
231
|
+
method="POST",
|
|
232
|
+
json={
|
|
233
|
+
"type": type,
|
|
234
|
+
"users": users,
|
|
235
|
+
},
|
|
236
|
+
headers={
|
|
237
|
+
"content-type": "application/json",
|
|
238
|
+
},
|
|
239
|
+
request_options=request_options,
|
|
240
|
+
omit=OMIT,
|
|
241
|
+
)
|
|
242
|
+
try:
|
|
243
|
+
if 200 <= _response.status_code < 300:
|
|
244
|
+
return typing.cast(
|
|
245
|
+
TaskAssignment,
|
|
246
|
+
construct_type(
|
|
247
|
+
type_=TaskAssignment, # type: ignore
|
|
248
|
+
object_=_response.json(),
|
|
249
|
+
),
|
|
250
|
+
)
|
|
251
|
+
_response_json = _response.json()
|
|
252
|
+
except JSONDecodeError:
|
|
253
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
254
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
255
|
+
|
|
256
|
+
def delete(self, id: int, task_pk: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
257
|
+
"""
|
|
258
|
+
Remove the assignee for a task for a specific project.
|
|
259
|
+
|
|
260
|
+
Parameters
|
|
261
|
+
----------
|
|
262
|
+
id : int
|
|
263
|
+
A unique integer value identifying this project.
|
|
264
|
+
|
|
265
|
+
task_pk : int
|
|
266
|
+
A unique integer value identifying this task.
|
|
267
|
+
|
|
268
|
+
request_options : typing.Optional[RequestOptions]
|
|
269
|
+
Request-specific configuration.
|
|
270
|
+
|
|
271
|
+
Returns
|
|
272
|
+
-------
|
|
273
|
+
None
|
|
274
|
+
|
|
275
|
+
Examples
|
|
276
|
+
--------
|
|
277
|
+
from label_studio_sdk import LabelStudio
|
|
278
|
+
|
|
279
|
+
client = LabelStudio(
|
|
280
|
+
api_key="YOUR_API_KEY",
|
|
281
|
+
)
|
|
282
|
+
client.projects.assignments.delete(
|
|
283
|
+
id=1,
|
|
284
|
+
task_pk=1,
|
|
285
|
+
)
|
|
286
|
+
"""
|
|
287
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
288
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
289
|
+
method="DELETE",
|
|
290
|
+
request_options=request_options,
|
|
291
|
+
)
|
|
292
|
+
try:
|
|
293
|
+
if 200 <= _response.status_code < 300:
|
|
294
|
+
return
|
|
295
|
+
_response_json = _response.json()
|
|
296
|
+
except JSONDecodeError:
|
|
297
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
298
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
299
|
+
|
|
300
|
+
def update(
|
|
301
|
+
self,
|
|
302
|
+
id: int,
|
|
303
|
+
task_pk: int,
|
|
304
|
+
*,
|
|
305
|
+
type: AssignmentsUpdateRequestType,
|
|
306
|
+
users: typing.Sequence[int],
|
|
307
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
308
|
+
) -> TaskAssignment:
|
|
309
|
+
"""
|
|
310
|
+
Update the assignee for a task in a specific project.
|
|
311
|
+
|
|
312
|
+
Parameters
|
|
313
|
+
----------
|
|
314
|
+
id : int
|
|
315
|
+
A unique integer value identifying this project.
|
|
316
|
+
|
|
317
|
+
task_pk : int
|
|
318
|
+
A unique integer value identifying this task.
|
|
319
|
+
|
|
320
|
+
type : AssignmentsUpdateRequestType
|
|
321
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
322
|
+
|
|
323
|
+
users : typing.Sequence[int]
|
|
324
|
+
List of user IDs to assign
|
|
325
|
+
|
|
326
|
+
request_options : typing.Optional[RequestOptions]
|
|
327
|
+
Request-specific configuration.
|
|
328
|
+
|
|
329
|
+
Returns
|
|
330
|
+
-------
|
|
331
|
+
TaskAssignment
|
|
332
|
+
|
|
333
|
+
|
|
334
|
+
Examples
|
|
335
|
+
--------
|
|
336
|
+
from label_studio_sdk import LabelStudio
|
|
337
|
+
|
|
338
|
+
client = LabelStudio(
|
|
339
|
+
api_key="YOUR_API_KEY",
|
|
340
|
+
)
|
|
341
|
+
client.projects.assignments.update(
|
|
342
|
+
id=1,
|
|
343
|
+
task_pk=1,
|
|
344
|
+
type="AN",
|
|
345
|
+
users=[1],
|
|
346
|
+
)
|
|
347
|
+
"""
|
|
348
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
349
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
350
|
+
method="PATCH",
|
|
351
|
+
json={
|
|
352
|
+
"type": type,
|
|
353
|
+
"users": users,
|
|
354
|
+
},
|
|
355
|
+
headers={
|
|
356
|
+
"content-type": "application/json",
|
|
357
|
+
},
|
|
358
|
+
request_options=request_options,
|
|
359
|
+
omit=OMIT,
|
|
360
|
+
)
|
|
361
|
+
try:
|
|
362
|
+
if 200 <= _response.status_code < 300:
|
|
363
|
+
return typing.cast(
|
|
364
|
+
TaskAssignment,
|
|
365
|
+
construct_type(
|
|
366
|
+
type_=TaskAssignment, # type: ignore
|
|
367
|
+
object_=_response.json(),
|
|
368
|
+
),
|
|
369
|
+
)
|
|
370
|
+
_response_json = _response.json()
|
|
371
|
+
except JSONDecodeError:
|
|
372
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
373
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
class AsyncAssignmentsClient:
|
|
377
|
+
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
378
|
+
self._client_wrapper = client_wrapper
|
|
379
|
+
|
|
380
|
+
async def bulk_assign(
|
|
381
|
+
self,
|
|
382
|
+
id: int,
|
|
383
|
+
*,
|
|
384
|
+
selected_items: AssignmentsBulkAssignRequestSelectedItems,
|
|
385
|
+
type: AssignmentsBulkAssignRequestType,
|
|
386
|
+
users: typing.Sequence[int],
|
|
387
|
+
filters: typing.Optional[AssignmentsBulkAssignRequestFilters] = OMIT,
|
|
388
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
389
|
+
) -> AssignmentsBulkAssignResponse:
|
|
390
|
+
"""
|
|
391
|
+
Assign multiple tasks to a specific user for a specific project.
|
|
392
|
+
|
|
393
|
+
Parameters
|
|
394
|
+
----------
|
|
395
|
+
id : int
|
|
396
|
+
|
|
397
|
+
selected_items : AssignmentsBulkAssignRequestSelectedItems
|
|
398
|
+
Task selection by IDs. If filters are applied, the selection will be applied to the filtered tasks.If "all" is `false`, `"included"` must be used. If "all" is `true`, `"excluded"` must be used.<br>Examples: `{"all": false, "included": [1, 2, 3]}` or `{"all": true, "excluded": [4, 5]}`
|
|
399
|
+
|
|
400
|
+
type : AssignmentsBulkAssignRequestType
|
|
401
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
402
|
+
|
|
403
|
+
users : typing.Sequence[int]
|
|
404
|
+
List of user IDs to assign
|
|
405
|
+
|
|
406
|
+
filters : typing.Optional[AssignmentsBulkAssignRequestFilters]
|
|
407
|
+
Filters to apply on tasks. You can use [the helper class `Filters` from this page](https://labelstud.io/sdk/data_manager.html) to create Data Manager Filters.<br>Example: `{"conjunction": "or", "items": [{"filter": "filter:tasks:completed_at", "operator": "greater", "type": "Datetime", "value": "2021-01-01T00:00:00.000Z"}]}`
|
|
408
|
+
|
|
409
|
+
request_options : typing.Optional[RequestOptions]
|
|
410
|
+
Request-specific configuration.
|
|
411
|
+
|
|
412
|
+
Returns
|
|
413
|
+
-------
|
|
414
|
+
AssignmentsBulkAssignResponse
|
|
415
|
+
Success
|
|
416
|
+
|
|
417
|
+
Examples
|
|
418
|
+
--------
|
|
419
|
+
import asyncio
|
|
420
|
+
|
|
421
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
422
|
+
from label_studio_sdk.projects.assignments import (
|
|
423
|
+
AssignmentsBulkAssignRequestSelectedItemsIncluded,
|
|
424
|
+
)
|
|
425
|
+
|
|
426
|
+
client = AsyncLabelStudio(
|
|
427
|
+
api_key="YOUR_API_KEY",
|
|
428
|
+
)
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
async def main() -> None:
|
|
432
|
+
await client.projects.assignments.bulk_assign(
|
|
433
|
+
id=1,
|
|
434
|
+
selected_items=AssignmentsBulkAssignRequestSelectedItemsIncluded(
|
|
435
|
+
all_=True,
|
|
436
|
+
),
|
|
437
|
+
type="AN",
|
|
438
|
+
users=[1],
|
|
439
|
+
)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
asyncio.run(main())
|
|
443
|
+
"""
|
|
444
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
445
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/assignees",
|
|
446
|
+
method="POST",
|
|
447
|
+
json={
|
|
448
|
+
"filters": convert_and_respect_annotation_metadata(
|
|
449
|
+
object_=filters, annotation=AssignmentsBulkAssignRequestFilters, direction="write"
|
|
450
|
+
),
|
|
451
|
+
"selectedItems": convert_and_respect_annotation_metadata(
|
|
452
|
+
object_=selected_items, annotation=AssignmentsBulkAssignRequestSelectedItems, direction="write"
|
|
453
|
+
),
|
|
454
|
+
"type": type,
|
|
455
|
+
"users": users,
|
|
456
|
+
},
|
|
457
|
+
headers={
|
|
458
|
+
"content-type": "application/json",
|
|
459
|
+
},
|
|
460
|
+
request_options=request_options,
|
|
461
|
+
omit=OMIT,
|
|
462
|
+
)
|
|
463
|
+
try:
|
|
464
|
+
if 200 <= _response.status_code < 300:
|
|
465
|
+
return typing.cast(
|
|
466
|
+
AssignmentsBulkAssignResponse,
|
|
467
|
+
construct_type(
|
|
468
|
+
type_=AssignmentsBulkAssignResponse, # type: ignore
|
|
469
|
+
object_=_response.json(),
|
|
470
|
+
),
|
|
471
|
+
)
|
|
472
|
+
if _response.status_code == 400:
|
|
473
|
+
raise BadRequestError(
|
|
474
|
+
typing.cast(
|
|
475
|
+
typing.Optional[typing.Any],
|
|
476
|
+
construct_type(
|
|
477
|
+
type_=typing.Optional[typing.Any], # type: ignore
|
|
478
|
+
object_=_response.json(),
|
|
479
|
+
),
|
|
480
|
+
)
|
|
481
|
+
)
|
|
482
|
+
_response_json = _response.json()
|
|
483
|
+
except JSONDecodeError:
|
|
484
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
485
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
486
|
+
|
|
487
|
+
async def list(
|
|
488
|
+
self, id: int, task_pk: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
489
|
+
) -> typing.List[TaskAssignment]:
|
|
490
|
+
"""
|
|
491
|
+
Retrieve a list of tasks and assignees for those tasks for a specific project.
|
|
492
|
+
|
|
493
|
+
Parameters
|
|
494
|
+
----------
|
|
495
|
+
id : int
|
|
496
|
+
A unique integer value identifying this project.
|
|
497
|
+
|
|
498
|
+
task_pk : int
|
|
499
|
+
A unique integer value identifying this task.
|
|
500
|
+
|
|
501
|
+
request_options : typing.Optional[RequestOptions]
|
|
502
|
+
Request-specific configuration.
|
|
503
|
+
|
|
504
|
+
Returns
|
|
505
|
+
-------
|
|
506
|
+
typing.List[TaskAssignment]
|
|
507
|
+
List of assignments for the task
|
|
508
|
+
|
|
509
|
+
Examples
|
|
510
|
+
--------
|
|
511
|
+
import asyncio
|
|
512
|
+
|
|
513
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
514
|
+
|
|
515
|
+
client = AsyncLabelStudio(
|
|
516
|
+
api_key="YOUR_API_KEY",
|
|
517
|
+
)
|
|
518
|
+
|
|
519
|
+
|
|
520
|
+
async def main() -> None:
|
|
521
|
+
await client.projects.assignments.list(
|
|
522
|
+
id=1,
|
|
523
|
+
task_pk=1,
|
|
524
|
+
)
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
asyncio.run(main())
|
|
528
|
+
"""
|
|
529
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
530
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
531
|
+
method="GET",
|
|
532
|
+
request_options=request_options,
|
|
533
|
+
)
|
|
534
|
+
try:
|
|
535
|
+
if 200 <= _response.status_code < 300:
|
|
536
|
+
return typing.cast(
|
|
537
|
+
typing.List[TaskAssignment],
|
|
538
|
+
construct_type(
|
|
539
|
+
type_=typing.List[TaskAssignment], # type: ignore
|
|
540
|
+
object_=_response.json(),
|
|
541
|
+
),
|
|
542
|
+
)
|
|
543
|
+
_response_json = _response.json()
|
|
544
|
+
except JSONDecodeError:
|
|
545
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
546
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
547
|
+
|
|
548
|
+
async def assign(
|
|
549
|
+
self,
|
|
550
|
+
id: int,
|
|
551
|
+
task_pk: int,
|
|
552
|
+
*,
|
|
553
|
+
type: AssignmentsAssignRequestType,
|
|
554
|
+
users: typing.Sequence[int],
|
|
555
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
556
|
+
) -> TaskAssignment:
|
|
557
|
+
"""
|
|
558
|
+
Assign a user to a task in a specific project.
|
|
559
|
+
|
|
560
|
+
Parameters
|
|
561
|
+
----------
|
|
562
|
+
id : int
|
|
563
|
+
A unique integer value identifying this project.
|
|
564
|
+
|
|
565
|
+
task_pk : int
|
|
566
|
+
A unique integer value identifying this task.
|
|
567
|
+
|
|
568
|
+
type : AssignmentsAssignRequestType
|
|
569
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
570
|
+
|
|
571
|
+
users : typing.Sequence[int]
|
|
572
|
+
List of user IDs to assign
|
|
573
|
+
|
|
574
|
+
request_options : typing.Optional[RequestOptions]
|
|
575
|
+
Request-specific configuration.
|
|
576
|
+
|
|
577
|
+
Returns
|
|
578
|
+
-------
|
|
579
|
+
TaskAssignment
|
|
580
|
+
|
|
581
|
+
|
|
582
|
+
Examples
|
|
583
|
+
--------
|
|
584
|
+
import asyncio
|
|
585
|
+
|
|
586
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
587
|
+
|
|
588
|
+
client = AsyncLabelStudio(
|
|
589
|
+
api_key="YOUR_API_KEY",
|
|
590
|
+
)
|
|
591
|
+
|
|
592
|
+
|
|
593
|
+
async def main() -> None:
|
|
594
|
+
await client.projects.assignments.assign(
|
|
595
|
+
id=1,
|
|
596
|
+
task_pk=1,
|
|
597
|
+
type="AN",
|
|
598
|
+
users=[1],
|
|
599
|
+
)
|
|
600
|
+
|
|
601
|
+
|
|
602
|
+
asyncio.run(main())
|
|
603
|
+
"""
|
|
604
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
605
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
606
|
+
method="POST",
|
|
607
|
+
json={
|
|
608
|
+
"type": type,
|
|
609
|
+
"users": users,
|
|
610
|
+
},
|
|
611
|
+
headers={
|
|
612
|
+
"content-type": "application/json",
|
|
613
|
+
},
|
|
614
|
+
request_options=request_options,
|
|
615
|
+
omit=OMIT,
|
|
616
|
+
)
|
|
617
|
+
try:
|
|
618
|
+
if 200 <= _response.status_code < 300:
|
|
619
|
+
return typing.cast(
|
|
620
|
+
TaskAssignment,
|
|
621
|
+
construct_type(
|
|
622
|
+
type_=TaskAssignment, # type: ignore
|
|
623
|
+
object_=_response.json(),
|
|
624
|
+
),
|
|
625
|
+
)
|
|
626
|
+
_response_json = _response.json()
|
|
627
|
+
except JSONDecodeError:
|
|
628
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
629
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
630
|
+
|
|
631
|
+
async def delete(self, id: int, task_pk: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
632
|
+
"""
|
|
633
|
+
Remove the assignee for a task for a specific project.
|
|
634
|
+
|
|
635
|
+
Parameters
|
|
636
|
+
----------
|
|
637
|
+
id : int
|
|
638
|
+
A unique integer value identifying this project.
|
|
639
|
+
|
|
640
|
+
task_pk : int
|
|
641
|
+
A unique integer value identifying this task.
|
|
642
|
+
|
|
643
|
+
request_options : typing.Optional[RequestOptions]
|
|
644
|
+
Request-specific configuration.
|
|
645
|
+
|
|
646
|
+
Returns
|
|
647
|
+
-------
|
|
648
|
+
None
|
|
649
|
+
|
|
650
|
+
Examples
|
|
651
|
+
--------
|
|
652
|
+
import asyncio
|
|
653
|
+
|
|
654
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
655
|
+
|
|
656
|
+
client = AsyncLabelStudio(
|
|
657
|
+
api_key="YOUR_API_KEY",
|
|
658
|
+
)
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
async def main() -> None:
|
|
662
|
+
await client.projects.assignments.delete(
|
|
663
|
+
id=1,
|
|
664
|
+
task_pk=1,
|
|
665
|
+
)
|
|
666
|
+
|
|
667
|
+
|
|
668
|
+
asyncio.run(main())
|
|
669
|
+
"""
|
|
670
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
671
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
672
|
+
method="DELETE",
|
|
673
|
+
request_options=request_options,
|
|
674
|
+
)
|
|
675
|
+
try:
|
|
676
|
+
if 200 <= _response.status_code < 300:
|
|
677
|
+
return
|
|
678
|
+
_response_json = _response.json()
|
|
679
|
+
except JSONDecodeError:
|
|
680
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
681
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
682
|
+
|
|
683
|
+
async def update(
|
|
684
|
+
self,
|
|
685
|
+
id: int,
|
|
686
|
+
task_pk: int,
|
|
687
|
+
*,
|
|
688
|
+
type: AssignmentsUpdateRequestType,
|
|
689
|
+
users: typing.Sequence[int],
|
|
690
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
691
|
+
) -> TaskAssignment:
|
|
692
|
+
"""
|
|
693
|
+
Update the assignee for a task in a specific project.
|
|
694
|
+
|
|
695
|
+
Parameters
|
|
696
|
+
----------
|
|
697
|
+
id : int
|
|
698
|
+
A unique integer value identifying this project.
|
|
699
|
+
|
|
700
|
+
task_pk : int
|
|
701
|
+
A unique integer value identifying this task.
|
|
702
|
+
|
|
703
|
+
type : AssignmentsUpdateRequestType
|
|
704
|
+
Assignment type. Use AN for annotate or RE for review.
|
|
705
|
+
|
|
706
|
+
users : typing.Sequence[int]
|
|
707
|
+
List of user IDs to assign
|
|
708
|
+
|
|
709
|
+
request_options : typing.Optional[RequestOptions]
|
|
710
|
+
Request-specific configuration.
|
|
711
|
+
|
|
712
|
+
Returns
|
|
713
|
+
-------
|
|
714
|
+
TaskAssignment
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
Examples
|
|
718
|
+
--------
|
|
719
|
+
import asyncio
|
|
720
|
+
|
|
721
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
722
|
+
|
|
723
|
+
client = AsyncLabelStudio(
|
|
724
|
+
api_key="YOUR_API_KEY",
|
|
725
|
+
)
|
|
726
|
+
|
|
727
|
+
|
|
728
|
+
async def main() -> None:
|
|
729
|
+
await client.projects.assignments.update(
|
|
730
|
+
id=1,
|
|
731
|
+
task_pk=1,
|
|
732
|
+
type="AN",
|
|
733
|
+
users=[1],
|
|
734
|
+
)
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
asyncio.run(main())
|
|
738
|
+
"""
|
|
739
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
740
|
+
f"api/projects/{jsonable_encoder(id)}/tasks/{jsonable_encoder(task_pk)}/assignees",
|
|
741
|
+
method="PATCH",
|
|
742
|
+
json={
|
|
743
|
+
"type": type,
|
|
744
|
+
"users": users,
|
|
745
|
+
},
|
|
746
|
+
headers={
|
|
747
|
+
"content-type": "application/json",
|
|
748
|
+
},
|
|
749
|
+
request_options=request_options,
|
|
750
|
+
omit=OMIT,
|
|
751
|
+
)
|
|
752
|
+
try:
|
|
753
|
+
if 200 <= _response.status_code < 300:
|
|
754
|
+
return typing.cast(
|
|
755
|
+
TaskAssignment,
|
|
756
|
+
construct_type(
|
|
757
|
+
type_=TaskAssignment, # type: ignore
|
|
758
|
+
object_=_response.json(),
|
|
759
|
+
),
|
|
760
|
+
)
|
|
761
|
+
_response_json = _response.json()
|
|
762
|
+
except JSONDecodeError:
|
|
763
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
764
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|