label-studio-sdk 2.0.8__py3-none-any.whl → 2.0.9__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 +36 -16
- label_studio_sdk/base_client.py +0 -4
- label_studio_sdk/core/client_wrapper.py +1 -1
- label_studio_sdk/export_storage/__init__.py +13 -2
- label_studio_sdk/export_storage/client.py +4 -0
- label_studio_sdk/export_storage/databricks/client.py +1406 -0
- label_studio_sdk/import_storage/__init__.py +13 -2
- label_studio_sdk/import_storage/client.py +4 -0
- label_studio_sdk/import_storage/databricks/__init__.py +2 -0
- label_studio_sdk/import_storage/databricks/client.py +1466 -0
- label_studio_sdk/import_storage/gcswif/client.py +30 -0
- label_studio_sdk/projects/__init__.py +0 -2
- label_studio_sdk/projects/client.py +186 -32
- label_studio_sdk/projects/client_ext.py +20 -8
- label_studio_sdk/projects/types/__init__.py +0 -2
- label_studio_sdk/projects/types/lse_project_create_request_sampling.py +2 -2
- label_studio_sdk/projects/types/patched_lse_project_update_request_sampling.py +2 -2
- label_studio_sdk/prompts/client.py +340 -1
- label_studio_sdk/prompts/runs/client.py +127 -0
- label_studio_sdk/tasks/client.py +7 -2
- label_studio_sdk/types/__init__.py +36 -12
- label_studio_sdk/types/all_roles_project_list.py +10 -10
- label_studio_sdk/types/all_roles_project_list_sampling.py +2 -2
- label_studio_sdk/types/azure_blob_import_storage.py +5 -0
- label_studio_sdk/types/cancel_model_run_response.py +19 -0
- label_studio_sdk/types/configurable_permission_option.py +2 -2
- label_studio_sdk/types/databricks_export_storage.py +113 -0
- label_studio_sdk/types/databricks_export_storage_request.py +107 -0
- label_studio_sdk/types/databricks_import_storage.py +123 -0
- label_studio_sdk/types/databricks_import_storage_request.py +117 -0
- label_studio_sdk/types/default165enum.py +5 -0
- label_studio_sdk/types/gcs_import_storage.py +5 -0
- label_studio_sdk/types/gcswif_import_storage.py +5 -0
- label_studio_sdk/types/gcswif_import_storage_request.py +5 -0
- label_studio_sdk/types/local_files_import_storage.py +5 -0
- label_studio_sdk/types/lse_project_counts.py +8 -8
- label_studio_sdk/types/lse_project_create_sampling.py +2 -2
- label_studio_sdk/types/{project.py → lse_project_response.py} +44 -31
- label_studio_sdk/types/lse_project_response_sampling.py +7 -0
- label_studio_sdk/types/{project_skip_queue.py → lse_project_response_skip_queue.py} +1 -1
- label_studio_sdk/types/lse_project_sampling.py +2 -2
- label_studio_sdk/types/lse_project_update_sampling.py +2 -2
- label_studio_sdk/types/lse_task.py +6 -0
- label_studio_sdk/types/lse_task_serializer_for_reviewers.py +6 -0
- label_studio_sdk/types/lse_user.py +1 -0
- label_studio_sdk/types/lse_user_api.py +1 -0
- label_studio_sdk/types/options165enum.py +5 -0
- label_studio_sdk/types/organization_permission.py +7 -4
- label_studio_sdk/types/paginated_project_member.py +1 -0
- label_studio_sdk/types/paginated_project_subset_tasks_response_list.py +23 -0
- label_studio_sdk/types/project_subset_item.py +21 -0
- label_studio_sdk/types/project_subset_task_item.py +24 -0
- label_studio_sdk/types/project_subset_tasks_response.py +27 -0
- label_studio_sdk/types/review_settings.py +14 -0
- label_studio_sdk/types/review_settings_request.py +14 -0
- label_studio_sdk/types/review_settings_request_sampling.py +8 -0
- label_studio_sdk/types/review_settings_sampling.py +8 -0
- label_studio_sdk/types/review_settings_sampling_enum.py +5 -0
- label_studio_sdk/types/{sampling_enum.py → sampling_de5enum.py} +1 -1
- label_studio_sdk/types/who_am_i_user.py +1 -0
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.9.dist-info}/METADATA +41 -90
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.9.dist-info}/RECORD +65 -52
- label_studio_sdk/blueprints/client.py +0 -272
- label_studio_sdk/projects/types/projects_list_request_filter.py +0 -5
- label_studio_sdk/types/blueprint.py +0 -41
- label_studio_sdk/types/configurable_permission_option_default.py +0 -7
- label_studio_sdk/types/project_sampling.py +0 -7
- /label_studio_sdk/{blueprints → export_storage/databricks}/__init__.py +0 -0
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.9.dist-info}/LICENSE +0 -0
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.9.dist-info}/WHEEL +0 -0
|
@@ -97,6 +97,7 @@ class GcswifClient:
|
|
|
97
97
|
prefix: typing.Optional[str] = OMIT,
|
|
98
98
|
presign: typing.Optional[bool] = OMIT,
|
|
99
99
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
100
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
100
101
|
regex_filter: typing.Optional[str] = OMIT,
|
|
101
102
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
102
103
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -156,6 +157,9 @@ class GcswifClient:
|
|
|
156
157
|
presign_ttl : typing.Optional[int]
|
|
157
158
|
Presigned URLs TTL (in minutes)
|
|
158
159
|
|
|
160
|
+
recursive_scan : typing.Optional[bool]
|
|
161
|
+
Perform recursive scan over the bucket content
|
|
162
|
+
|
|
159
163
|
regex_filter : typing.Optional[str]
|
|
160
164
|
Cloud storage regex for filtering objects
|
|
161
165
|
|
|
@@ -211,6 +215,7 @@ class GcswifClient:
|
|
|
211
215
|
"presign": presign,
|
|
212
216
|
"presign_ttl": presign_ttl,
|
|
213
217
|
"project": project,
|
|
218
|
+
"recursive_scan": recursive_scan,
|
|
214
219
|
"regex_filter": regex_filter,
|
|
215
220
|
"status": status,
|
|
216
221
|
"synchronizable": synchronizable,
|
|
@@ -254,6 +259,7 @@ class GcswifClient:
|
|
|
254
259
|
prefix: typing.Optional[str] = OMIT,
|
|
255
260
|
presign: typing.Optional[bool] = OMIT,
|
|
256
261
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
262
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
257
263
|
regex_filter: typing.Optional[str] = OMIT,
|
|
258
264
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
259
265
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -313,6 +319,9 @@ class GcswifClient:
|
|
|
313
319
|
presign_ttl : typing.Optional[int]
|
|
314
320
|
Presigned URLs TTL (in minutes)
|
|
315
321
|
|
|
322
|
+
recursive_scan : typing.Optional[bool]
|
|
323
|
+
Perform recursive scan over the bucket content
|
|
324
|
+
|
|
316
325
|
regex_filter : typing.Optional[str]
|
|
317
326
|
Cloud storage regex for filtering objects
|
|
318
327
|
|
|
@@ -367,6 +376,7 @@ class GcswifClient:
|
|
|
367
376
|
"presign": presign,
|
|
368
377
|
"presign_ttl": presign_ttl,
|
|
369
378
|
"project": project,
|
|
379
|
+
"recursive_scan": recursive_scan,
|
|
370
380
|
"regex_filter": regex_filter,
|
|
371
381
|
"status": status,
|
|
372
382
|
"synchronizable": synchronizable,
|
|
@@ -490,6 +500,7 @@ class GcswifClient:
|
|
|
490
500
|
presign: typing.Optional[bool] = OMIT,
|
|
491
501
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
492
502
|
project: typing.Optional[int] = OMIT,
|
|
503
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
493
504
|
regex_filter: typing.Optional[str] = OMIT,
|
|
494
505
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
495
506
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -551,6 +562,9 @@ class GcswifClient:
|
|
|
551
562
|
project : typing.Optional[int]
|
|
552
563
|
A unique integer value identifying this project.
|
|
553
564
|
|
|
565
|
+
recursive_scan : typing.Optional[bool]
|
|
566
|
+
Perform recursive scan over the bucket content
|
|
567
|
+
|
|
554
568
|
regex_filter : typing.Optional[str]
|
|
555
569
|
Cloud storage regex for filtering objects
|
|
556
570
|
|
|
@@ -606,6 +620,7 @@ class GcswifClient:
|
|
|
606
620
|
"presign": presign,
|
|
607
621
|
"presign_ttl": presign_ttl,
|
|
608
622
|
"project": project,
|
|
623
|
+
"recursive_scan": recursive_scan,
|
|
609
624
|
"regex_filter": regex_filter,
|
|
610
625
|
"status": status,
|
|
611
626
|
"synchronizable": synchronizable,
|
|
@@ -769,6 +784,7 @@ class AsyncGcswifClient:
|
|
|
769
784
|
prefix: typing.Optional[str] = OMIT,
|
|
770
785
|
presign: typing.Optional[bool] = OMIT,
|
|
771
786
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
787
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
772
788
|
regex_filter: typing.Optional[str] = OMIT,
|
|
773
789
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
774
790
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -828,6 +844,9 @@ class AsyncGcswifClient:
|
|
|
828
844
|
presign_ttl : typing.Optional[int]
|
|
829
845
|
Presigned URLs TTL (in minutes)
|
|
830
846
|
|
|
847
|
+
recursive_scan : typing.Optional[bool]
|
|
848
|
+
Perform recursive scan over the bucket content
|
|
849
|
+
|
|
831
850
|
regex_filter : typing.Optional[str]
|
|
832
851
|
Cloud storage regex for filtering objects
|
|
833
852
|
|
|
@@ -891,6 +910,7 @@ class AsyncGcswifClient:
|
|
|
891
910
|
"presign": presign,
|
|
892
911
|
"presign_ttl": presign_ttl,
|
|
893
912
|
"project": project,
|
|
913
|
+
"recursive_scan": recursive_scan,
|
|
894
914
|
"regex_filter": regex_filter,
|
|
895
915
|
"status": status,
|
|
896
916
|
"synchronizable": synchronizable,
|
|
@@ -934,6 +954,7 @@ class AsyncGcswifClient:
|
|
|
934
954
|
prefix: typing.Optional[str] = OMIT,
|
|
935
955
|
presign: typing.Optional[bool] = OMIT,
|
|
936
956
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
957
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
937
958
|
regex_filter: typing.Optional[str] = OMIT,
|
|
938
959
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
939
960
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -993,6 +1014,9 @@ class AsyncGcswifClient:
|
|
|
993
1014
|
presign_ttl : typing.Optional[int]
|
|
994
1015
|
Presigned URLs TTL (in minutes)
|
|
995
1016
|
|
|
1017
|
+
recursive_scan : typing.Optional[bool]
|
|
1018
|
+
Perform recursive scan over the bucket content
|
|
1019
|
+
|
|
996
1020
|
regex_filter : typing.Optional[str]
|
|
997
1021
|
Cloud storage regex for filtering objects
|
|
998
1022
|
|
|
@@ -1055,6 +1079,7 @@ class AsyncGcswifClient:
|
|
|
1055
1079
|
"presign": presign,
|
|
1056
1080
|
"presign_ttl": presign_ttl,
|
|
1057
1081
|
"project": project,
|
|
1082
|
+
"recursive_scan": recursive_scan,
|
|
1058
1083
|
"regex_filter": regex_filter,
|
|
1059
1084
|
"status": status,
|
|
1060
1085
|
"synchronizable": synchronizable,
|
|
@@ -1194,6 +1219,7 @@ class AsyncGcswifClient:
|
|
|
1194
1219
|
presign: typing.Optional[bool] = OMIT,
|
|
1195
1220
|
presign_ttl: typing.Optional[int] = OMIT,
|
|
1196
1221
|
project: typing.Optional[int] = OMIT,
|
|
1222
|
+
recursive_scan: typing.Optional[bool] = OMIT,
|
|
1197
1223
|
regex_filter: typing.Optional[str] = OMIT,
|
|
1198
1224
|
status: typing.Optional[StatusC5AEnum] = OMIT,
|
|
1199
1225
|
synchronizable: typing.Optional[bool] = OMIT,
|
|
@@ -1255,6 +1281,9 @@ class AsyncGcswifClient:
|
|
|
1255
1281
|
project : typing.Optional[int]
|
|
1256
1282
|
A unique integer value identifying this project.
|
|
1257
1283
|
|
|
1284
|
+
recursive_scan : typing.Optional[bool]
|
|
1285
|
+
Perform recursive scan over the bucket content
|
|
1286
|
+
|
|
1258
1287
|
regex_filter : typing.Optional[str]
|
|
1259
1288
|
Cloud storage regex for filtering objects
|
|
1260
1289
|
|
|
@@ -1318,6 +1347,7 @@ class AsyncGcswifClient:
|
|
|
1318
1347
|
"presign": presign,
|
|
1319
1348
|
"presign_ttl": presign_ttl,
|
|
1320
1349
|
"project": project,
|
|
1350
|
+
"recursive_scan": recursive_scan,
|
|
1321
1351
|
"regex_filter": regex_filter,
|
|
1322
1352
|
"status": status,
|
|
1323
1353
|
"synchronizable": synchronizable,
|
|
@@ -8,7 +8,6 @@ from .types import (
|
|
|
8
8
|
ProjectsDuplicateResponse,
|
|
9
9
|
ProjectsImportPredictionsResponse,
|
|
10
10
|
ProjectsImportTasksResponse,
|
|
11
|
-
ProjectsListRequestFilter,
|
|
12
11
|
)
|
|
13
12
|
from . import assignments, exports, members, metrics, pauses, stats
|
|
14
13
|
from .assignments import (
|
|
@@ -75,7 +74,6 @@ __all__ = [
|
|
|
75
74
|
"ProjectsDuplicateResponse",
|
|
76
75
|
"ProjectsImportPredictionsResponse",
|
|
77
76
|
"ProjectsImportTasksResponse",
|
|
78
|
-
"ProjectsListRequestFilter",
|
|
79
77
|
"StatsAgreementAnnotatorResponse",
|
|
80
78
|
"StatsDataFiltersResponse",
|
|
81
79
|
"StatsDataFiltersResponseUserFilters",
|
|
@@ -8,7 +8,6 @@ from .metrics.client import MetricsClient
|
|
|
8
8
|
from .stats.client import StatsClient
|
|
9
9
|
from .assignments.client import AssignmentsClient
|
|
10
10
|
from .pauses.client import PausesClient
|
|
11
|
-
from .types.projects_list_request_filter import ProjectsListRequestFilter
|
|
12
11
|
from ..core.request_options import RequestOptions
|
|
13
12
|
from ..core.pagination import SyncPager
|
|
14
13
|
from ..types.all_roles_project_list import AllRolesProjectList
|
|
@@ -23,13 +22,14 @@ from .types.lse_project_create_request_skip_queue import LseProjectCreateRequest
|
|
|
23
22
|
from ..types.lse_project_create import LseProjectCreate
|
|
24
23
|
from ..core.serialization import convert_and_respect_annotation_metadata
|
|
25
24
|
from ..types.paginated_lse_project_counts_list import PaginatedLseProjectCountsList
|
|
26
|
-
from ..types.
|
|
25
|
+
from ..types.lse_project_response import LseProjectResponse
|
|
27
26
|
from ..core.jsonable_encoder import jsonable_encoder
|
|
28
27
|
from ..types.assignment_settings_request import AssignmentSettingsRequest
|
|
29
28
|
from ..types.review_settings_request import ReviewSettingsRequest
|
|
30
29
|
from .types.patched_lse_project_update_request_sampling import PatchedLseProjectUpdateRequestSampling
|
|
31
30
|
from .types.patched_lse_project_update_request_skip_queue import PatchedLseProjectUpdateRequestSkipQueue
|
|
32
31
|
from ..types.lse_project_update import LseProjectUpdate
|
|
32
|
+
from ..types.user_simple import UserSimple
|
|
33
33
|
from ..types.mode_enum import ModeEnum
|
|
34
34
|
from .types.projects_duplicate_response import ProjectsDuplicateResponse
|
|
35
35
|
from ..types.import_api_request import ImportApiRequest
|
|
@@ -64,15 +64,16 @@ class ProjectsClient:
|
|
|
64
64
|
def list(
|
|
65
65
|
self,
|
|
66
66
|
*,
|
|
67
|
-
filter: typing.Optional[
|
|
67
|
+
filter: typing.Optional[str] = None,
|
|
68
68
|
ids: typing.Optional[str] = None,
|
|
69
69
|
include: typing.Optional[str] = None,
|
|
70
70
|
members_limit: typing.Optional[int] = None,
|
|
71
71
|
ordering: typing.Optional[str] = None,
|
|
72
72
|
page: typing.Optional[int] = None,
|
|
73
73
|
page_size: typing.Optional[int] = None,
|
|
74
|
+
search: typing.Optional[str] = None,
|
|
74
75
|
title: typing.Optional[str] = None,
|
|
75
|
-
workspaces: typing.Optional[
|
|
76
|
+
workspaces: typing.Optional[float] = None,
|
|
76
77
|
request_options: typing.Optional[RequestOptions] = None,
|
|
77
78
|
) -> SyncPager[AllRolesProjectList]:
|
|
78
79
|
"""
|
|
@@ -80,17 +81,17 @@ class ProjectsClient:
|
|
|
80
81
|
|
|
81
82
|
Parameters
|
|
82
83
|
----------
|
|
83
|
-
filter : typing.Optional[
|
|
84
|
+
filter : typing.Optional[str]
|
|
84
85
|
Filter projects by pinned status. Use 'pinned_only' to return only pinned projects, 'exclude_pinned' to return only non-pinned projects, or 'all' to return all projects.
|
|
85
86
|
|
|
86
87
|
ids : typing.Optional[str]
|
|
87
|
-
|
|
88
|
+
Filter id by in list
|
|
88
89
|
|
|
89
90
|
include : typing.Optional[str]
|
|
90
91
|
Comma-separated list of count fields to include in the response to optimize performance. Available fields: task_number, finished_task_number, total_predictions_number, total_annotations_number, num_tasks_with_annotations, useful_annotation_number, ground_truth_number, skipped_annotations_number. If not specified, all count fields are included.
|
|
91
92
|
|
|
92
93
|
members_limit : typing.Optional[int]
|
|
93
|
-
Maximum number of members to return
|
|
94
|
+
Maximum number of members to return
|
|
94
95
|
|
|
95
96
|
ordering : typing.Optional[str]
|
|
96
97
|
Which field to use when ordering the results.
|
|
@@ -101,11 +102,14 @@ class ProjectsClient:
|
|
|
101
102
|
page_size : typing.Optional[int]
|
|
102
103
|
Number of results to return per page.
|
|
103
104
|
|
|
105
|
+
search : typing.Optional[str]
|
|
106
|
+
Search term for project title and description
|
|
107
|
+
|
|
104
108
|
title : typing.Optional[str]
|
|
105
|
-
title
|
|
109
|
+
Filter title by contains (case-insensitive)
|
|
106
110
|
|
|
107
|
-
workspaces : typing.Optional[
|
|
108
|
-
workspaces
|
|
111
|
+
workspaces : typing.Optional[float]
|
|
112
|
+
Filter workspaces by exact match
|
|
109
113
|
|
|
110
114
|
request_options : typing.Optional[RequestOptions]
|
|
111
115
|
Request-specific configuration.
|
|
@@ -141,6 +145,7 @@ class ProjectsClient:
|
|
|
141
145
|
"ordering": ordering,
|
|
142
146
|
"page": page,
|
|
143
147
|
"page_size": page_size,
|
|
148
|
+
"search": search,
|
|
144
149
|
"title": title,
|
|
145
150
|
"workspaces": workspaces,
|
|
146
151
|
},
|
|
@@ -164,6 +169,7 @@ class ProjectsClient:
|
|
|
164
169
|
ordering=ordering,
|
|
165
170
|
page=page + 1,
|
|
166
171
|
page_size=page_size,
|
|
172
|
+
search=search,
|
|
167
173
|
title=title,
|
|
168
174
|
workspaces=workspaces,
|
|
169
175
|
request_options=request_options,
|
|
@@ -389,13 +395,13 @@ class ProjectsClient:
|
|
|
389
395
|
Parameters
|
|
390
396
|
----------
|
|
391
397
|
filter : typing.Optional[str]
|
|
392
|
-
|
|
398
|
+
Filter projects by pinned status. Use 'pinned_only' to return only pinned projects, 'exclude_pinned' to return only non-pinned projects, or 'all' to return all projects.
|
|
393
399
|
|
|
394
400
|
ids : typing.Optional[str]
|
|
395
401
|
Filter id by in list
|
|
396
402
|
|
|
397
403
|
include : typing.Optional[str]
|
|
398
|
-
Comma-separated list of fields to include
|
|
404
|
+
Comma-separated list of count fields to include in the response to optimize performance. Available fields: task_number, finished_task_number, total_predictions_number, total_annotations_number, num_tasks_with_annotations, useful_annotation_number, ground_truth_number, skipped_annotations_number. If not specified, all count fields are included.
|
|
399
405
|
|
|
400
406
|
ordering : typing.Optional[str]
|
|
401
407
|
Which field to use when ordering the results.
|
|
@@ -462,7 +468,13 @@ class ProjectsClient:
|
|
|
462
468
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
463
469
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
464
470
|
|
|
465
|
-
def get(
|
|
471
|
+
def get(
|
|
472
|
+
self,
|
|
473
|
+
id: int,
|
|
474
|
+
*,
|
|
475
|
+
members_limit: typing.Optional[int] = None,
|
|
476
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
477
|
+
) -> LseProjectResponse:
|
|
466
478
|
"""
|
|
467
479
|
Retrieve information about a project by project ID.
|
|
468
480
|
|
|
@@ -470,13 +482,16 @@ class ProjectsClient:
|
|
|
470
482
|
----------
|
|
471
483
|
id : int
|
|
472
484
|
|
|
485
|
+
members_limit : typing.Optional[int]
|
|
486
|
+
Maximum number of members to return
|
|
487
|
+
|
|
473
488
|
request_options : typing.Optional[RequestOptions]
|
|
474
489
|
Request-specific configuration.
|
|
475
490
|
|
|
476
491
|
Returns
|
|
477
492
|
-------
|
|
478
|
-
|
|
479
|
-
Project information
|
|
493
|
+
LseProjectResponse
|
|
494
|
+
Project information. Not all fields are available for all roles.
|
|
480
495
|
|
|
481
496
|
Examples
|
|
482
497
|
--------
|
|
@@ -492,14 +507,17 @@ class ProjectsClient:
|
|
|
492
507
|
_response = self._client_wrapper.httpx_client.request(
|
|
493
508
|
f"api/projects/{jsonable_encoder(id)}/",
|
|
494
509
|
method="GET",
|
|
510
|
+
params={
|
|
511
|
+
"members_limit": members_limit,
|
|
512
|
+
},
|
|
495
513
|
request_options=request_options,
|
|
496
514
|
)
|
|
497
515
|
try:
|
|
498
516
|
if 200 <= _response.status_code < 300:
|
|
499
517
|
return typing.cast(
|
|
500
|
-
|
|
518
|
+
LseProjectResponse,
|
|
501
519
|
construct_type(
|
|
502
|
-
type_=
|
|
520
|
+
type_=LseProjectResponse, # type: ignore
|
|
503
521
|
object_=_response.json(),
|
|
504
522
|
),
|
|
505
523
|
)
|
|
@@ -551,6 +569,7 @@ class ProjectsClient:
|
|
|
551
569
|
self,
|
|
552
570
|
id: int,
|
|
553
571
|
*,
|
|
572
|
+
members_limit: typing.Optional[int] = None,
|
|
554
573
|
annotation_limit_count: typing.Optional[int] = OMIT,
|
|
555
574
|
annotation_limit_percent: typing.Optional[str] = OMIT,
|
|
556
575
|
annotator_evaluation_minimum_score: typing.Optional[str] = OMIT,
|
|
@@ -601,6 +620,9 @@ class ProjectsClient:
|
|
|
601
620
|
----------
|
|
602
621
|
id : int
|
|
603
622
|
|
|
623
|
+
members_limit : typing.Optional[int]
|
|
624
|
+
Maximum number of members to return
|
|
625
|
+
|
|
604
626
|
annotation_limit_count : typing.Optional[int]
|
|
605
627
|
|
|
606
628
|
annotation_limit_percent : typing.Optional[str]
|
|
@@ -726,6 +748,9 @@ class ProjectsClient:
|
|
|
726
748
|
_response = self._client_wrapper.httpx_client.request(
|
|
727
749
|
f"api/projects/{jsonable_encoder(id)}/",
|
|
728
750
|
method="PATCH",
|
|
751
|
+
params={
|
|
752
|
+
"members_limit": members_limit,
|
|
753
|
+
},
|
|
729
754
|
json={
|
|
730
755
|
"annotation_limit_count": annotation_limit_count,
|
|
731
756
|
"annotation_limit_percent": annotation_limit_percent,
|
|
@@ -799,6 +824,54 @@ class ProjectsClient:
|
|
|
799
824
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
800
825
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
801
826
|
|
|
827
|
+
def list_unique_annotators(
|
|
828
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
829
|
+
) -> typing.List[UserSimple]:
|
|
830
|
+
"""
|
|
831
|
+
Return unique users who have submitted annotations in the specified project.
|
|
832
|
+
|
|
833
|
+
Parameters
|
|
834
|
+
----------
|
|
835
|
+
id : int
|
|
836
|
+
|
|
837
|
+
request_options : typing.Optional[RequestOptions]
|
|
838
|
+
Request-specific configuration.
|
|
839
|
+
|
|
840
|
+
Returns
|
|
841
|
+
-------
|
|
842
|
+
typing.List[UserSimple]
|
|
843
|
+
List of annotator users
|
|
844
|
+
|
|
845
|
+
Examples
|
|
846
|
+
--------
|
|
847
|
+
from label_studio_sdk import LabelStudio
|
|
848
|
+
|
|
849
|
+
client = LabelStudio(
|
|
850
|
+
api_key="YOUR_API_KEY",
|
|
851
|
+
)
|
|
852
|
+
client.projects.list_unique_annotators(
|
|
853
|
+
id=1,
|
|
854
|
+
)
|
|
855
|
+
"""
|
|
856
|
+
_response = self._client_wrapper.httpx_client.request(
|
|
857
|
+
f"api/projects/{jsonable_encoder(id)}/annotators/",
|
|
858
|
+
method="GET",
|
|
859
|
+
request_options=request_options,
|
|
860
|
+
)
|
|
861
|
+
try:
|
|
862
|
+
if 200 <= _response.status_code < 300:
|
|
863
|
+
return typing.cast(
|
|
864
|
+
typing.List[UserSimple],
|
|
865
|
+
construct_type(
|
|
866
|
+
type_=typing.List[UserSimple], # type: ignore
|
|
867
|
+
object_=_response.json(),
|
|
868
|
+
),
|
|
869
|
+
)
|
|
870
|
+
_response_json = _response.json()
|
|
871
|
+
except JSONDecodeError:
|
|
872
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
873
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
874
|
+
|
|
802
875
|
def duplicate(
|
|
803
876
|
self,
|
|
804
877
|
id: int,
|
|
@@ -1166,15 +1239,16 @@ class AsyncProjectsClient:
|
|
|
1166
1239
|
async def list(
|
|
1167
1240
|
self,
|
|
1168
1241
|
*,
|
|
1169
|
-
filter: typing.Optional[
|
|
1242
|
+
filter: typing.Optional[str] = None,
|
|
1170
1243
|
ids: typing.Optional[str] = None,
|
|
1171
1244
|
include: typing.Optional[str] = None,
|
|
1172
1245
|
members_limit: typing.Optional[int] = None,
|
|
1173
1246
|
ordering: typing.Optional[str] = None,
|
|
1174
1247
|
page: typing.Optional[int] = None,
|
|
1175
1248
|
page_size: typing.Optional[int] = None,
|
|
1249
|
+
search: typing.Optional[str] = None,
|
|
1176
1250
|
title: typing.Optional[str] = None,
|
|
1177
|
-
workspaces: typing.Optional[
|
|
1251
|
+
workspaces: typing.Optional[float] = None,
|
|
1178
1252
|
request_options: typing.Optional[RequestOptions] = None,
|
|
1179
1253
|
) -> AsyncPager[AllRolesProjectList]:
|
|
1180
1254
|
"""
|
|
@@ -1182,17 +1256,17 @@ class AsyncProjectsClient:
|
|
|
1182
1256
|
|
|
1183
1257
|
Parameters
|
|
1184
1258
|
----------
|
|
1185
|
-
filter : typing.Optional[
|
|
1259
|
+
filter : typing.Optional[str]
|
|
1186
1260
|
Filter projects by pinned status. Use 'pinned_only' to return only pinned projects, 'exclude_pinned' to return only non-pinned projects, or 'all' to return all projects.
|
|
1187
1261
|
|
|
1188
1262
|
ids : typing.Optional[str]
|
|
1189
|
-
|
|
1263
|
+
Filter id by in list
|
|
1190
1264
|
|
|
1191
1265
|
include : typing.Optional[str]
|
|
1192
1266
|
Comma-separated list of count fields to include in the response to optimize performance. Available fields: task_number, finished_task_number, total_predictions_number, total_annotations_number, num_tasks_with_annotations, useful_annotation_number, ground_truth_number, skipped_annotations_number. If not specified, all count fields are included.
|
|
1193
1267
|
|
|
1194
1268
|
members_limit : typing.Optional[int]
|
|
1195
|
-
Maximum number of members to return
|
|
1269
|
+
Maximum number of members to return
|
|
1196
1270
|
|
|
1197
1271
|
ordering : typing.Optional[str]
|
|
1198
1272
|
Which field to use when ordering the results.
|
|
@@ -1203,11 +1277,14 @@ class AsyncProjectsClient:
|
|
|
1203
1277
|
page_size : typing.Optional[int]
|
|
1204
1278
|
Number of results to return per page.
|
|
1205
1279
|
|
|
1280
|
+
search : typing.Optional[str]
|
|
1281
|
+
Search term for project title and description
|
|
1282
|
+
|
|
1206
1283
|
title : typing.Optional[str]
|
|
1207
|
-
title
|
|
1284
|
+
Filter title by contains (case-insensitive)
|
|
1208
1285
|
|
|
1209
|
-
workspaces : typing.Optional[
|
|
1210
|
-
workspaces
|
|
1286
|
+
workspaces : typing.Optional[float]
|
|
1287
|
+
Filter workspaces by exact match
|
|
1211
1288
|
|
|
1212
1289
|
request_options : typing.Optional[RequestOptions]
|
|
1213
1290
|
Request-specific configuration.
|
|
@@ -1251,6 +1328,7 @@ class AsyncProjectsClient:
|
|
|
1251
1328
|
"ordering": ordering,
|
|
1252
1329
|
"page": page,
|
|
1253
1330
|
"page_size": page_size,
|
|
1331
|
+
"search": search,
|
|
1254
1332
|
"title": title,
|
|
1255
1333
|
"workspaces": workspaces,
|
|
1256
1334
|
},
|
|
@@ -1274,6 +1352,7 @@ class AsyncProjectsClient:
|
|
|
1274
1352
|
ordering=ordering,
|
|
1275
1353
|
page=page + 1,
|
|
1276
1354
|
page_size=page_size,
|
|
1355
|
+
search=search,
|
|
1277
1356
|
title=title,
|
|
1278
1357
|
workspaces=workspaces,
|
|
1279
1358
|
request_options=request_options,
|
|
@@ -1507,13 +1586,13 @@ class AsyncProjectsClient:
|
|
|
1507
1586
|
Parameters
|
|
1508
1587
|
----------
|
|
1509
1588
|
filter : typing.Optional[str]
|
|
1510
|
-
|
|
1589
|
+
Filter projects by pinned status. Use 'pinned_only' to return only pinned projects, 'exclude_pinned' to return only non-pinned projects, or 'all' to return all projects.
|
|
1511
1590
|
|
|
1512
1591
|
ids : typing.Optional[str]
|
|
1513
1592
|
Filter id by in list
|
|
1514
1593
|
|
|
1515
1594
|
include : typing.Optional[str]
|
|
1516
|
-
Comma-separated list of fields to include
|
|
1595
|
+
Comma-separated list of count fields to include in the response to optimize performance. Available fields: task_number, finished_task_number, total_predictions_number, total_annotations_number, num_tasks_with_annotations, useful_annotation_number, ground_truth_number, skipped_annotations_number. If not specified, all count fields are included.
|
|
1517
1596
|
|
|
1518
1597
|
ordering : typing.Optional[str]
|
|
1519
1598
|
Which field to use when ordering the results.
|
|
@@ -1588,7 +1667,13 @@ class AsyncProjectsClient:
|
|
|
1588
1667
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1589
1668
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1590
1669
|
|
|
1591
|
-
async def get(
|
|
1670
|
+
async def get(
|
|
1671
|
+
self,
|
|
1672
|
+
id: int,
|
|
1673
|
+
*,
|
|
1674
|
+
members_limit: typing.Optional[int] = None,
|
|
1675
|
+
request_options: typing.Optional[RequestOptions] = None,
|
|
1676
|
+
) -> LseProjectResponse:
|
|
1592
1677
|
"""
|
|
1593
1678
|
Retrieve information about a project by project ID.
|
|
1594
1679
|
|
|
@@ -1596,13 +1681,16 @@ class AsyncProjectsClient:
|
|
|
1596
1681
|
----------
|
|
1597
1682
|
id : int
|
|
1598
1683
|
|
|
1684
|
+
members_limit : typing.Optional[int]
|
|
1685
|
+
Maximum number of members to return
|
|
1686
|
+
|
|
1599
1687
|
request_options : typing.Optional[RequestOptions]
|
|
1600
1688
|
Request-specific configuration.
|
|
1601
1689
|
|
|
1602
1690
|
Returns
|
|
1603
1691
|
-------
|
|
1604
|
-
|
|
1605
|
-
Project information
|
|
1692
|
+
LseProjectResponse
|
|
1693
|
+
Project information. Not all fields are available for all roles.
|
|
1606
1694
|
|
|
1607
1695
|
Examples
|
|
1608
1696
|
--------
|
|
@@ -1626,14 +1714,17 @@ class AsyncProjectsClient:
|
|
|
1626
1714
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1627
1715
|
f"api/projects/{jsonable_encoder(id)}/",
|
|
1628
1716
|
method="GET",
|
|
1717
|
+
params={
|
|
1718
|
+
"members_limit": members_limit,
|
|
1719
|
+
},
|
|
1629
1720
|
request_options=request_options,
|
|
1630
1721
|
)
|
|
1631
1722
|
try:
|
|
1632
1723
|
if 200 <= _response.status_code < 300:
|
|
1633
1724
|
return typing.cast(
|
|
1634
|
-
|
|
1725
|
+
LseProjectResponse,
|
|
1635
1726
|
construct_type(
|
|
1636
|
-
type_=
|
|
1727
|
+
type_=LseProjectResponse, # type: ignore
|
|
1637
1728
|
object_=_response.json(),
|
|
1638
1729
|
),
|
|
1639
1730
|
)
|
|
@@ -1693,6 +1784,7 @@ class AsyncProjectsClient:
|
|
|
1693
1784
|
self,
|
|
1694
1785
|
id: int,
|
|
1695
1786
|
*,
|
|
1787
|
+
members_limit: typing.Optional[int] = None,
|
|
1696
1788
|
annotation_limit_count: typing.Optional[int] = OMIT,
|
|
1697
1789
|
annotation_limit_percent: typing.Optional[str] = OMIT,
|
|
1698
1790
|
annotator_evaluation_minimum_score: typing.Optional[str] = OMIT,
|
|
@@ -1743,6 +1835,9 @@ class AsyncProjectsClient:
|
|
|
1743
1835
|
----------
|
|
1744
1836
|
id : int
|
|
1745
1837
|
|
|
1838
|
+
members_limit : typing.Optional[int]
|
|
1839
|
+
Maximum number of members to return
|
|
1840
|
+
|
|
1746
1841
|
annotation_limit_count : typing.Optional[int]
|
|
1747
1842
|
|
|
1748
1843
|
annotation_limit_percent : typing.Optional[str]
|
|
@@ -1876,6 +1971,9 @@ class AsyncProjectsClient:
|
|
|
1876
1971
|
_response = await self._client_wrapper.httpx_client.request(
|
|
1877
1972
|
f"api/projects/{jsonable_encoder(id)}/",
|
|
1878
1973
|
method="PATCH",
|
|
1974
|
+
params={
|
|
1975
|
+
"members_limit": members_limit,
|
|
1976
|
+
},
|
|
1879
1977
|
json={
|
|
1880
1978
|
"annotation_limit_count": annotation_limit_count,
|
|
1881
1979
|
"annotation_limit_percent": annotation_limit_percent,
|
|
@@ -1949,6 +2047,62 @@ class AsyncProjectsClient:
|
|
|
1949
2047
|
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
1950
2048
|
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
1951
2049
|
|
|
2050
|
+
async def list_unique_annotators(
|
|
2051
|
+
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
2052
|
+
) -> typing.List[UserSimple]:
|
|
2053
|
+
"""
|
|
2054
|
+
Return unique users who have submitted annotations in the specified project.
|
|
2055
|
+
|
|
2056
|
+
Parameters
|
|
2057
|
+
----------
|
|
2058
|
+
id : int
|
|
2059
|
+
|
|
2060
|
+
request_options : typing.Optional[RequestOptions]
|
|
2061
|
+
Request-specific configuration.
|
|
2062
|
+
|
|
2063
|
+
Returns
|
|
2064
|
+
-------
|
|
2065
|
+
typing.List[UserSimple]
|
|
2066
|
+
List of annotator users
|
|
2067
|
+
|
|
2068
|
+
Examples
|
|
2069
|
+
--------
|
|
2070
|
+
import asyncio
|
|
2071
|
+
|
|
2072
|
+
from label_studio_sdk import AsyncLabelStudio
|
|
2073
|
+
|
|
2074
|
+
client = AsyncLabelStudio(
|
|
2075
|
+
api_key="YOUR_API_KEY",
|
|
2076
|
+
)
|
|
2077
|
+
|
|
2078
|
+
|
|
2079
|
+
async def main() -> None:
|
|
2080
|
+
await client.projects.list_unique_annotators(
|
|
2081
|
+
id=1,
|
|
2082
|
+
)
|
|
2083
|
+
|
|
2084
|
+
|
|
2085
|
+
asyncio.run(main())
|
|
2086
|
+
"""
|
|
2087
|
+
_response = await self._client_wrapper.httpx_client.request(
|
|
2088
|
+
f"api/projects/{jsonable_encoder(id)}/annotators/",
|
|
2089
|
+
method="GET",
|
|
2090
|
+
request_options=request_options,
|
|
2091
|
+
)
|
|
2092
|
+
try:
|
|
2093
|
+
if 200 <= _response.status_code < 300:
|
|
2094
|
+
return typing.cast(
|
|
2095
|
+
typing.List[UserSimple],
|
|
2096
|
+
construct_type(
|
|
2097
|
+
type_=typing.List[UserSimple], # type: ignore
|
|
2098
|
+
object_=_response.json(),
|
|
2099
|
+
),
|
|
2100
|
+
)
|
|
2101
|
+
_response_json = _response.json()
|
|
2102
|
+
except JSONDecodeError:
|
|
2103
|
+
raise ApiError(status_code=_response.status_code, body=_response.text)
|
|
2104
|
+
raise ApiError(status_code=_response.status_code, body=_response_json)
|
|
2105
|
+
|
|
1952
2106
|
async def duplicate(
|
|
1953
2107
|
self,
|
|
1954
2108
|
id: int,
|