label-studio-sdk 2.0.8__py3-none-any.whl → 2.0.10__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/organizations/invites/client.py +31 -6
- 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/workspaces/client.py +60 -0
- label_studio_sdk/workspaces/members/bulk/client.py +24 -0
- label_studio_sdk/workspaces/members/client.py +36 -0
- label_studio_sdk/workspaces/members/paginated/client.py +12 -0
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.10.dist-info}/METADATA +41 -90
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.10.dist-info}/RECORD +70 -57
- 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.10.dist-info}/LICENSE +0 -0
- {label_studio_sdk-2.0.8.dist-info → label_studio_sdk-2.0.10.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
# This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
|
|
3
|
+
import typing
|
|
4
|
+
from .review_settings_sampling_enum import ReviewSettingsSamplingEnum
|
|
5
|
+
from .blank_enum import BlankEnum
|
|
6
|
+
from .null_enum import NullEnum
|
|
7
|
+
|
|
8
|
+
ReviewSettingsSampling = typing.Union[ReviewSettingsSamplingEnum, BlankEnum, NullEnum]
|
|
@@ -35,6 +35,7 @@ class WhoAmIUser(UncheckedBaseModel):
|
|
|
35
35
|
last_name: typing.Optional[str] = None
|
|
36
36
|
lse_fields: WhoAmILseFields
|
|
37
37
|
org_membership: typing.List[OrganizationMembership]
|
|
38
|
+
organization_membership: OrganizationMembership
|
|
38
39
|
pause: str
|
|
39
40
|
permissions: typing.List[str]
|
|
40
41
|
phone: typing.Optional[str] = None
|
|
@@ -29,6 +29,12 @@ class WorkspacesClient:
|
|
|
29
29
|
request_options: typing.Optional[RequestOptions] = None,
|
|
30
30
|
) -> typing.List[Workspace]:
|
|
31
31
|
"""
|
|
32
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
33
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
34
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
35
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
36
|
+
</p>
|
|
37
|
+
</Card>
|
|
32
38
|
List all workspaces for your organization. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces).
|
|
33
39
|
|
|
34
40
|
Parameters
|
|
@@ -90,6 +96,12 @@ class WorkspacesClient:
|
|
|
90
96
|
request_options: typing.Optional[RequestOptions] = None,
|
|
91
97
|
) -> Workspace:
|
|
92
98
|
"""
|
|
99
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
100
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
101
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
102
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
103
|
+
</p>
|
|
104
|
+
</Card>
|
|
93
105
|
Create a new workspace. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces).
|
|
94
106
|
|
|
95
107
|
Parameters
|
|
@@ -159,6 +171,12 @@ class WorkspacesClient:
|
|
|
159
171
|
|
|
160
172
|
def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Workspace:
|
|
161
173
|
"""
|
|
174
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
175
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
176
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
177
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
178
|
+
</p>
|
|
179
|
+
</Card>
|
|
162
180
|
Retrieve details for a specific workspace by ID.
|
|
163
181
|
|
|
164
182
|
Parameters
|
|
@@ -205,6 +223,12 @@ class WorkspacesClient:
|
|
|
205
223
|
|
|
206
224
|
def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
207
225
|
"""
|
|
226
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
227
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
228
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
229
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
230
|
+
</p>
|
|
231
|
+
</Card>
|
|
208
232
|
Delete a specific workspace by ID.
|
|
209
233
|
|
|
210
234
|
Parameters
|
|
@@ -254,6 +278,12 @@ class WorkspacesClient:
|
|
|
254
278
|
request_options: typing.Optional[RequestOptions] = None,
|
|
255
279
|
) -> Workspace:
|
|
256
280
|
"""
|
|
281
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
282
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
283
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
284
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
285
|
+
</p>
|
|
286
|
+
</Card>
|
|
257
287
|
Update settings for a specific workspace by ID.
|
|
258
288
|
|
|
259
289
|
Parameters
|
|
@@ -337,6 +367,12 @@ class AsyncWorkspacesClient:
|
|
|
337
367
|
request_options: typing.Optional[RequestOptions] = None,
|
|
338
368
|
) -> typing.List[Workspace]:
|
|
339
369
|
"""
|
|
370
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
371
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
372
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
373
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
374
|
+
</p>
|
|
375
|
+
</Card>
|
|
340
376
|
List all workspaces for your organization. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces).
|
|
341
377
|
|
|
342
378
|
Parameters
|
|
@@ -406,6 +442,12 @@ class AsyncWorkspacesClient:
|
|
|
406
442
|
request_options: typing.Optional[RequestOptions] = None,
|
|
407
443
|
) -> Workspace:
|
|
408
444
|
"""
|
|
445
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
446
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
447
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
448
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
449
|
+
</p>
|
|
450
|
+
</Card>
|
|
409
451
|
Create a new workspace. Workspaces in Label Studio let you organize your projects and users into separate spaces. This is useful for managing different teams, departments, or projects within your organization. For more information, see the [Workspaces documentation](https://docs.humansignal.com/workspaces).
|
|
410
452
|
|
|
411
453
|
Parameters
|
|
@@ -483,6 +525,12 @@ class AsyncWorkspacesClient:
|
|
|
483
525
|
|
|
484
526
|
async def get(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> Workspace:
|
|
485
527
|
"""
|
|
528
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
529
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
530
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
531
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
532
|
+
</p>
|
|
533
|
+
</Card>
|
|
486
534
|
Retrieve details for a specific workspace by ID.
|
|
487
535
|
|
|
488
536
|
Parameters
|
|
@@ -537,6 +585,12 @@ class AsyncWorkspacesClient:
|
|
|
537
585
|
|
|
538
586
|
async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
539
587
|
"""
|
|
588
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
589
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
590
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
591
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
592
|
+
</p>
|
|
593
|
+
</Card>
|
|
540
594
|
Delete a specific workspace by ID.
|
|
541
595
|
|
|
542
596
|
Parameters
|
|
@@ -594,6 +648,12 @@ class AsyncWorkspacesClient:
|
|
|
594
648
|
request_options: typing.Optional[RequestOptions] = None,
|
|
595
649
|
) -> Workspace:
|
|
596
650
|
"""
|
|
651
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
652
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
653
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
654
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
655
|
+
</p>
|
|
656
|
+
</Card>
|
|
597
657
|
Update settings for a specific workspace by ID.
|
|
598
658
|
|
|
599
659
|
Parameters
|
|
@@ -29,6 +29,12 @@ class BulkClient:
|
|
|
29
29
|
request_options: typing.Optional[RequestOptions] = None,
|
|
30
30
|
) -> BulkPostResponse:
|
|
31
31
|
"""
|
|
32
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
33
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
34
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
35
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
36
|
+
</p>
|
|
37
|
+
</Card>
|
|
32
38
|
Assign workspace members in bulk.
|
|
33
39
|
|
|
34
40
|
Parameters
|
|
@@ -91,6 +97,12 @@ class BulkClient:
|
|
|
91
97
|
|
|
92
98
|
def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse:
|
|
93
99
|
"""
|
|
100
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
101
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
102
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
103
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
104
|
+
</p>
|
|
105
|
+
</Card>
|
|
94
106
|
Unassign workspace members in bulk. Allows the same request body as bulk assign.
|
|
95
107
|
|
|
96
108
|
Parameters
|
|
@@ -150,6 +162,12 @@ class AsyncBulkClient:
|
|
|
150
162
|
request_options: typing.Optional[RequestOptions] = None,
|
|
151
163
|
) -> BulkPostResponse:
|
|
152
164
|
"""
|
|
165
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
166
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
167
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
168
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
169
|
+
</p>
|
|
170
|
+
</Card>
|
|
153
171
|
Assign workspace members in bulk.
|
|
154
172
|
|
|
155
173
|
Parameters
|
|
@@ -220,6 +238,12 @@ class AsyncBulkClient:
|
|
|
220
238
|
|
|
221
239
|
async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> BulkDeleteResponse:
|
|
222
240
|
"""
|
|
241
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
242
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
243
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
244
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
245
|
+
</p>
|
|
246
|
+
</Card>
|
|
223
247
|
Unassign workspace members in bulk. Allows the same request body as bulk assign.
|
|
224
248
|
|
|
225
249
|
Parameters
|
|
@@ -29,6 +29,12 @@ class MembersClient:
|
|
|
29
29
|
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
30
30
|
) -> typing.List[WorkspaceMemberList]:
|
|
31
31
|
"""
|
|
32
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
33
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
34
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
35
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
36
|
+
</p>
|
|
37
|
+
</Card>
|
|
32
38
|
Get a list of all members in a specific workspace.
|
|
33
39
|
|
|
34
40
|
Parameters
|
|
@@ -82,6 +88,12 @@ class MembersClient:
|
|
|
82
88
|
request_options: typing.Optional[RequestOptions] = None,
|
|
83
89
|
) -> WorkspaceMemberCreate:
|
|
84
90
|
"""
|
|
91
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
92
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
93
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
94
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
95
|
+
</p>
|
|
96
|
+
</Card>
|
|
85
97
|
Add a new workspace member by user ID.
|
|
86
98
|
|
|
87
99
|
Parameters
|
|
@@ -143,6 +155,12 @@ class MembersClient:
|
|
|
143
155
|
|
|
144
156
|
def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
145
157
|
"""
|
|
158
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
159
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
160
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
161
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
162
|
+
</p>
|
|
163
|
+
</Card>
|
|
146
164
|
Remove a specific member by ID from a workspace. This endpoint expects an object like `{"user_id": 123}`.
|
|
147
165
|
|
|
148
166
|
Parameters
|
|
@@ -191,6 +209,12 @@ class AsyncMembersClient:
|
|
|
191
209
|
self, id: int, *, request_options: typing.Optional[RequestOptions] = None
|
|
192
210
|
) -> typing.List[WorkspaceMemberList]:
|
|
193
211
|
"""
|
|
212
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
213
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
214
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
215
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
216
|
+
</p>
|
|
217
|
+
</Card>
|
|
194
218
|
Get a list of all members in a specific workspace.
|
|
195
219
|
|
|
196
220
|
Parameters
|
|
@@ -252,6 +276,12 @@ class AsyncMembersClient:
|
|
|
252
276
|
request_options: typing.Optional[RequestOptions] = None,
|
|
253
277
|
) -> WorkspaceMemberCreate:
|
|
254
278
|
"""
|
|
279
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
280
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
281
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
282
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
283
|
+
</p>
|
|
284
|
+
</Card>
|
|
255
285
|
Add a new workspace member by user ID.
|
|
256
286
|
|
|
257
287
|
Parameters
|
|
@@ -321,6 +351,12 @@ class AsyncMembersClient:
|
|
|
321
351
|
|
|
322
352
|
async def delete(self, id: int, *, request_options: typing.Optional[RequestOptions] = None) -> None:
|
|
323
353
|
"""
|
|
354
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
355
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
356
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
357
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
358
|
+
</p>
|
|
359
|
+
</Card>
|
|
324
360
|
Remove a specific member by ID from a workspace. This endpoint expects an object like `{"user_id": 123}`.
|
|
325
361
|
|
|
326
362
|
Parameters
|
|
@@ -29,6 +29,12 @@ class PaginatedClient:
|
|
|
29
29
|
request_options: typing.Optional[RequestOptions] = None,
|
|
30
30
|
) -> SyncPager[LseUser]:
|
|
31
31
|
"""
|
|
32
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
33
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
34
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
35
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
36
|
+
</p>
|
|
37
|
+
</Card>
|
|
32
38
|
Retrieve the members for a specific workspace.
|
|
33
39
|
|
|
34
40
|
Parameters
|
|
@@ -124,6 +130,12 @@ class AsyncPaginatedClient:
|
|
|
124
130
|
request_options: typing.Optional[RequestOptions] = None,
|
|
125
131
|
) -> AsyncPager[LseUser]:
|
|
126
132
|
"""
|
|
133
|
+
<Card href="https://humansignal.com/goenterprise">
|
|
134
|
+
<img style="pointer-events: none; margin-left: 0px; margin-right: 0px;" src="https://docs.humansignal.com/images/badge.svg" alt="Label Studio Enterprise badge"/>
|
|
135
|
+
<p style="margin-top: 10px; font-size: 14px;">
|
|
136
|
+
This endpoint is not available in Label Studio Community Edition. [Learn more about Label Studio Enterprise](https://humansignal.com/goenterprise)
|
|
137
|
+
</p>
|
|
138
|
+
</Card>
|
|
127
139
|
Retrieve the members for a specific workspace.
|
|
128
140
|
|
|
129
141
|
Parameters
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: label-studio-sdk
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.10
|
|
4
4
|
Summary:
|
|
5
5
|
Requires-Python: >=3.9,<4
|
|
6
6
|
Classifier: Intended Audience :: Developers
|
|
@@ -69,9 +69,9 @@ poetry add label-studio-sdk
|
|
|
69
69
|
# Usage
|
|
70
70
|
|
|
71
71
|
```python
|
|
72
|
-
from label_studio_sdk
|
|
72
|
+
from label_studio_sdk import LabelStudio
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
client = LabelStudio(
|
|
75
75
|
base_url='YOUR_LABEL_STUDIO_URL',
|
|
76
76
|
api_key="YOUR_API_KEY",
|
|
77
77
|
)
|
|
@@ -148,105 +148,56 @@ from label_studio_sdk._legacy import Project
|
|
|
148
148
|
|
|
149
149
|
</details>
|
|
150
150
|
|
|
151
|
-
#
|
|
152
|
-
|
|
153
|
-
Check more examples [here](https://api.labelstud.io/).
|
|
154
|
-
|
|
155
|
-
## Create a new project
|
|
151
|
+
# Example: Create a new project with tasks
|
|
156
152
|
|
|
157
153
|
```python
|
|
158
|
-
|
|
159
|
-
from label_studio_sdk
|
|
160
|
-
|
|
161
|
-
project = ls.projects.create(
|
|
162
|
-
title="Project name",
|
|
163
|
-
description="Project description",
|
|
164
|
-
label_config=LabelInterface.create({
|
|
165
|
-
"image": "Image",
|
|
166
|
-
"bbox": labels(["cat", "dog"], tag_type="RectangleLabels")
|
|
167
|
-
})
|
|
168
|
-
)
|
|
169
|
-
```
|
|
154
|
+
# Import the SDK and the client module
|
|
155
|
+
from label_studio_sdk import LabelStudio
|
|
170
156
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
task = ls.tasks.create(
|
|
175
|
-
project=project.id,
|
|
176
|
-
data={"image": "https://example.com/image.jpg"}
|
|
157
|
+
client = LabelStudio(
|
|
158
|
+
base_url="http://localhost:8080", # <-- put your LS URL here
|
|
159
|
+
api_key="YOUR_API_KEY", # <-- put your API key here
|
|
177
160
|
)
|
|
178
|
-
```
|
|
179
|
-
Now you can open the project `PROJECT_ID` in the Label Studio UI and create annotations for the task.
|
|
180
161
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
client = AsyncLabelStudio(
|
|
198
|
-
api_key="YOUR_API_KEY",
|
|
162
|
+
label_config = """
|
|
163
|
+
<View>
|
|
164
|
+
<Header value="Choose text sentiment:"/>
|
|
165
|
+
<Text name="text" value="$text"/>
|
|
166
|
+
<Choices name="sentiment" toName="text" choice="single">
|
|
167
|
+
<Choice value="Positive"/>
|
|
168
|
+
<Choice value="Negative"/>
|
|
169
|
+
<Choice value="Neutral"/>
|
|
170
|
+
</Choices>
|
|
171
|
+
</View>
|
|
172
|
+
"""
|
|
173
|
+
|
|
174
|
+
# Create project
|
|
175
|
+
project = client.projects.create(
|
|
176
|
+
title="Sentiment Classification",
|
|
177
|
+
label_config=label_config
|
|
199
178
|
)
|
|
200
|
-
```
|
|
201
179
|
|
|
202
|
-
|
|
180
|
+
# (Optional) validate the config to catch mistakes early
|
|
181
|
+
client.projects.validate_label_config(id=project.id, label_config=label_config)
|
|
203
182
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
```python
|
|
209
|
-
from label_studio_sdk.client import LabelStudio
|
|
210
|
-
|
|
211
|
-
ls = LabelStudio(
|
|
212
|
-
# All timeouts set to 20 seconds
|
|
213
|
-
timeout=20.0
|
|
183
|
+
# Create a single task
|
|
184
|
+
task = client.tasks.create(
|
|
185
|
+
project=project.id,
|
|
186
|
+
data={"text": "Label Studio is the best!"} # 'text' matches value="$text"
|
|
214
187
|
)
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
include support for proxies and transports.
|
|
225
|
-
|
|
226
|
-
```python
|
|
227
|
-
import httpx
|
|
228
|
-
|
|
229
|
-
from label_studio_sdk.client import LabelStudio
|
|
230
|
-
|
|
231
|
-
ls = LabelStudio(
|
|
232
|
-
http_client=httpx.Client(
|
|
233
|
-
proxies="http://my.test.proxy.example.com",
|
|
234
|
-
transport=httpx.HTTPTransport(local_address="0.0.0.0"),
|
|
235
|
-
),
|
|
188
|
+
print(f"Created task id: {task.id}")
|
|
189
|
+
|
|
190
|
+
# Or create multiple tasks at once
|
|
191
|
+
client.projects.import_tasks(
|
|
192
|
+
id=project.id,
|
|
193
|
+
request=[
|
|
194
|
+
{"text": "I love Label Studio"},
|
|
195
|
+
{"text": "Label Studio helps me ship faster"},
|
|
196
|
+
]
|
|
236
197
|
)
|
|
237
198
|
```
|
|
238
199
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
### Create comments
|
|
242
|
-
|
|
243
|
-
```python
|
|
244
|
-
comment = ls.comments.create(
|
|
245
|
-
project=project.id,
|
|
246
|
-
annotation=annotation.id,
|
|
247
|
-
text="Comment text"
|
|
248
|
-
)
|
|
249
|
-
```
|
|
200
|
+
For additional examples, see [our API reference](https://api.labelstud.io/).
|
|
250
201
|
|
|
251
202
|
<!-- Begin Contributing, generated by Fern -->
|
|
252
203
|
# Contributing
|