label-studio-sdk 2.0.1__py3-none-any.whl → 2.0.3__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.

Files changed (184) hide show
  1. label_studio_sdk/__init__.py +20 -0
  2. label_studio_sdk/actions/client.py +13 -13
  3. label_studio_sdk/actions/types/actions_list_response_item.py +3 -3
  4. label_studio_sdk/actions/types/actions_list_response_item_dialog.py +2 -2
  5. label_studio_sdk/annotations/client.py +441 -441
  6. label_studio_sdk/base_client.py +4 -0
  7. label_studio_sdk/comments/client.py +176 -176
  8. label_studio_sdk/export_storage/azure/client.py +274 -274
  9. label_studio_sdk/export_storage/gcs/client.py +263 -263
  10. label_studio_sdk/export_storage/local/client.py +206 -206
  11. label_studio_sdk/export_storage/redis/client.py +287 -287
  12. label_studio_sdk/export_storage/s3/client.py +347 -347
  13. label_studio_sdk/export_storage/s3s/client.py +678 -678
  14. label_studio_sdk/import_storage/azure/client.py +357 -357
  15. label_studio_sdk/import_storage/gcs/client.py +357 -357
  16. label_studio_sdk/import_storage/local/client.py +206 -206
  17. label_studio_sdk/import_storage/redis/client.py +309 -309
  18. label_studio_sdk/import_storage/s3/client.py +452 -452
  19. label_studio_sdk/import_storage/s3s/client.py +735 -735
  20. label_studio_sdk/jwt_settings/client.py +10 -10
  21. label_studio_sdk/ml/client.py +118 -118
  22. label_studio_sdk/ml/types/ml_list_model_versions_response.py +1 -1
  23. label_studio_sdk/model_providers/client.py +181 -181
  24. label_studio_sdk/organizations/members/client.py +8 -8
  25. label_studio_sdk/predictions/client.py +60 -60
  26. label_studio_sdk/projects/__init__.py +33 -1
  27. label_studio_sdk/projects/assignments/__init__.py +35 -0
  28. label_studio_sdk/projects/assignments/client.py +801 -0
  29. label_studio_sdk/projects/assignments/types/__init__.py +37 -0
  30. label_studio_sdk/projects/assignments/types/assignments_assign_request_type.py +5 -0
  31. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters.py +33 -0
  32. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_conjunction.py +5 -0
  33. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item.py +44 -0
  34. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_filter.py +31 -0
  35. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_operator.py +23 -0
  36. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_filters_items_item_value.py +7 -0
  37. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items.py +9 -0
  38. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_excluded.py +29 -0
  39. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_selected_items_included.py +29 -0
  40. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_request_type.py +5 -0
  41. label_studio_sdk/projects/assignments/types/assignments_bulk_assign_response.py +22 -0
  42. label_studio_sdk/projects/assignments/types/assignments_delete_request_type.py +5 -0
  43. label_studio_sdk/projects/assignments/types/assignments_update_request_type.py +5 -0
  44. label_studio_sdk/projects/client.py +445 -425
  45. label_studio_sdk/projects/exports/client.py +55 -55
  46. label_studio_sdk/projects/exports/types/exports_convert_response.py +1 -1
  47. label_studio_sdk/projects/members/__init__.py +2 -0
  48. label_studio_sdk/projects/members/client.py +137 -0
  49. label_studio_sdk/projects/stats/types/stats_iaa_response.py +5 -5
  50. label_studio_sdk/projects/types/projects_import_tasks_response.py +12 -12
  51. label_studio_sdk/prompts/client.py +211 -211
  52. label_studio_sdk/prompts/runs/client.py +33 -33
  53. label_studio_sdk/prompts/versions/client.py +72 -72
  54. label_studio_sdk/sso/__init__.py +5 -0
  55. label_studio_sdk/sso/client.py +22 -0
  56. label_studio_sdk/sso/saml/__init__.py +2 -0
  57. label_studio_sdk/sso/saml/client.py +278 -0
  58. label_studio_sdk/sso/scim/__init__.py +2 -0
  59. label_studio_sdk/sso/scim/client.py +278 -0
  60. label_studio_sdk/tasks/client.py +174 -174
  61. label_studio_sdk/types/__init__.py +18 -0
  62. label_studio_sdk/types/all_roles_project_list.py +94 -94
  63. label_studio_sdk/types/annotation.py +35 -35
  64. label_studio_sdk/types/annotation_request.py +27 -27
  65. label_studio_sdk/types/azure_blob_export_storage.py +29 -29
  66. label_studio_sdk/types/azure_blob_import_storage.py +33 -33
  67. label_studio_sdk/types/batch_failed_predictions.py +1 -1
  68. label_studio_sdk/types/billing_checks.py +14 -14
  69. label_studio_sdk/types/billing_flags.py +16 -16
  70. label_studio_sdk/types/blueprint_list.py +7 -8
  71. label_studio_sdk/types/child_filter.py +11 -10
  72. label_studio_sdk/types/comment.py +15 -15
  73. label_studio_sdk/types/comment_request.py +7 -8
  74. label_studio_sdk/types/comment_serializer_with_expanded_user.py +17 -18
  75. label_studio_sdk/types/converted_format.py +1 -1
  76. label_studio_sdk/types/converted_format_request.py +1 -1
  77. label_studio_sdk/types/export.py +8 -8
  78. label_studio_sdk/types/file_upload.py +3 -2
  79. label_studio_sdk/types/filter.py +10 -9
  80. label_studio_sdk/types/filter_group.py +4 -3
  81. label_studio_sdk/types/gcs_export_storage.py +23 -23
  82. label_studio_sdk/types/gcs_import_storage.py +27 -27
  83. label_studio_sdk/types/import_api_request.py +26 -26
  84. label_studio_sdk/types/inference_run_cost_estimate.py +10 -10
  85. label_studio_sdk/types/local_files_export_storage.py +23 -23
  86. label_studio_sdk/types/local_files_import_storage.py +26 -26
  87. label_studio_sdk/types/lse_annotation_filter_options.py +10 -10
  88. label_studio_sdk/types/lse_annotation_filter_options_request.py +10 -10
  89. label_studio_sdk/types/lse_export_create.py +12 -12
  90. label_studio_sdk/types/lse_fields.py +14 -14
  91. label_studio_sdk/types/lse_organization.py +17 -17
  92. label_studio_sdk/types/lse_organization_member_list.py +1 -1
  93. label_studio_sdk/types/lse_project_create.py +72 -72
  94. label_studio_sdk/types/lse_project_update.py +89 -89
  95. label_studio_sdk/types/lse_s3export_storage.py +46 -46
  96. label_studio_sdk/types/lse_s3export_storage_request.py +43 -43
  97. label_studio_sdk/types/lse_s3import_storage.py +53 -53
  98. label_studio_sdk/types/lse_s3import_storage_request.py +49 -49
  99. label_studio_sdk/types/lse_task.py +49 -49
  100. label_studio_sdk/types/lse_task_drafts_item.py +1 -1
  101. label_studio_sdk/types/lse_task_filter_options.py +14 -14
  102. label_studio_sdk/types/lse_task_filter_options_request.py +14 -14
  103. label_studio_sdk/types/lse_task_predictions_item.py +5 -5
  104. label_studio_sdk/types/lse_task_serializer_for_annotators.py +12 -12
  105. label_studio_sdk/types/lse_task_serializer_for_annotators_drafts_item.py +1 -1
  106. label_studio_sdk/types/lse_task_serializer_for_annotators_predictions_item.py +5 -5
  107. label_studio_sdk/types/lse_task_serializer_for_reviewers.py +49 -49
  108. label_studio_sdk/types/lse_task_serializer_for_reviewers_drafts_item.py +1 -1
  109. label_studio_sdk/types/lse_task_serializer_for_reviewers_predictions_item.py +5 -5
  110. label_studio_sdk/types/lse_user.py +13 -13
  111. label_studio_sdk/types/lse_user_api.py +11 -11
  112. label_studio_sdk/types/lse_user_organization_member_list.py +13 -13
  113. label_studio_sdk/types/lseapi_token_create.py +1 -1
  114. label_studio_sdk/types/lseapi_token_list.py +1 -1
  115. label_studio_sdk/types/lsejwt_settings.py +5 -5
  116. label_studio_sdk/types/ml_backend.py +27 -28
  117. label_studio_sdk/types/model_interface.py +12 -12
  118. label_studio_sdk/types/model_interface_request.py +7 -8
  119. label_studio_sdk/types/model_interface_serializer_get.py +13 -13
  120. label_studio_sdk/types/model_provider_connection.py +34 -34
  121. label_studio_sdk/types/model_provider_connection_request.py +15 -14
  122. label_studio_sdk/types/model_run.py +12 -12
  123. label_studio_sdk/types/organization_billing.py +1 -1
  124. label_studio_sdk/types/organization_id.py +2 -2
  125. label_studio_sdk/types/organization_invite.py +1 -1
  126. label_studio_sdk/types/organization_member.py +8 -9
  127. label_studio_sdk/types/organization_membership.py +2 -1
  128. label_studio_sdk/types/pause.py +23 -23
  129. label_studio_sdk/types/prediction.py +21 -21
  130. label_studio_sdk/types/prediction_request.py +16 -16
  131. label_studio_sdk/types/project.py +72 -72
  132. label_studio_sdk/types/project_group.py +22 -0
  133. label_studio_sdk/types/project_group_request.py +22 -0
  134. label_studio_sdk/types/project_group_role_enum.py +5 -0
  135. label_studio_sdk/types/project_import.py +21 -21
  136. label_studio_sdk/types/redis_export_storage.py +34 -34
  137. label_studio_sdk/types/redis_import_storage.py +37 -37
  138. label_studio_sdk/types/refined_prompt_response.py +11 -11
  139. label_studio_sdk/types/review_settings.py +29 -30
  140. label_studio_sdk/types/review_settings_request.py +29 -30
  141. label_studio_sdk/types/s3export_storage.py +45 -45
  142. label_studio_sdk/types/s3import_storage.py +44 -44
  143. label_studio_sdk/types/saml_settings.py +21 -0
  144. label_studio_sdk/types/saml_settings_update.py +22 -0
  145. label_studio_sdk/types/scim_settings.py +21 -0
  146. label_studio_sdk/types/scim_settings_update.py +22 -0
  147. label_studio_sdk/types/selected_items_request.py +1 -1
  148. label_studio_sdk/types/serialization_options.py +10 -10
  149. label_studio_sdk/types/serialization_options_request.py +10 -10
  150. label_studio_sdk/types/task_assignment.py +43 -0
  151. label_studio_sdk/types/third_party_model_version.py +11 -11
  152. label_studio_sdk/types/third_party_model_version_request.py +6 -7
  153. label_studio_sdk/types/type_enum.py +5 -0
  154. label_studio_sdk/types/user_simple.py +3 -3
  155. label_studio_sdk/types/user_simple_request.py +1 -1
  156. label_studio_sdk/types/version_response.py +19 -20
  157. label_studio_sdk/types/view.py +8 -8
  158. label_studio_sdk/types/webhook.py +16 -16
  159. label_studio_sdk/types/webhook_serializer_for_update.py +16 -16
  160. label_studio_sdk/types/workspace.py +10 -11
  161. label_studio_sdk/users/client.py +160 -160
  162. label_studio_sdk/views/client.py +164 -164
  163. label_studio_sdk/webhooks/client.py +183 -183
  164. label_studio_sdk/webhooks/types/webhooks_info_response.py +32 -32
  165. label_studio_sdk/webhooks/types/webhooks_info_response_annotation_created.py +1 -1
  166. label_studio_sdk/webhooks/types/webhooks_info_response_annotation_updated.py +1 -1
  167. label_studio_sdk/webhooks/types/webhooks_info_response_annotations_created.py +1 -1
  168. label_studio_sdk/webhooks/types/webhooks_info_response_annotations_deleted.py +1 -1
  169. label_studio_sdk/webhooks/types/webhooks_info_response_label_link_created.py +1 -1
  170. label_studio_sdk/webhooks/types/webhooks_info_response_label_link_deleted.py +1 -1
  171. label_studio_sdk/webhooks/types/webhooks_info_response_label_link_updated.py +1 -1
  172. label_studio_sdk/webhooks/types/webhooks_info_response_project_created.py +1 -1
  173. label_studio_sdk/webhooks/types/webhooks_info_response_project_deleted.py +1 -1
  174. label_studio_sdk/webhooks/types/webhooks_info_response_project_updated.py +1 -1
  175. label_studio_sdk/webhooks/types/webhooks_info_response_review_created.py +1 -1
  176. label_studio_sdk/webhooks/types/webhooks_info_response_review_updated.py +1 -1
  177. label_studio_sdk/webhooks/types/webhooks_info_response_reviews_deleted.py +1 -1
  178. label_studio_sdk/webhooks/types/webhooks_info_response_tasks_created.py +1 -1
  179. label_studio_sdk/webhooks/types/webhooks_info_response_tasks_deleted.py +1 -1
  180. label_studio_sdk/workspaces/client.py +40 -40
  181. {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.3.dist-info}/METADATA +1 -1
  182. {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.3.dist-info}/RECORD +184 -150
  183. {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.3.dist-info}/LICENSE +0 -0
  184. {label_studio_sdk-2.0.1.dist-info → label_studio_sdk-2.0.3.dist-info}/WHEEL +0 -0
@@ -8,13 +8,13 @@ from json.decoder import JSONDecodeError
8
8
  from ...core.api_error import ApiError
9
9
  from ...core.unchecked_base_model import construct_type
10
10
  from ...types.export import Export
11
+ from ...types.lse_annotation_filter_options_request import LseAnnotationFilterOptionsRequest
12
+ from ...types.converted_format_request import ConvertedFormatRequest
11
13
  from ...types.user_simple_request import UserSimpleRequest
12
14
  import datetime as dt
15
+ from ...types.serialization_options_request import SerializationOptionsRequest
13
16
  from ...types.status7bf_enum import Status7BfEnum
14
- from ...types.converted_format_request import ConvertedFormatRequest
15
17
  from ...types.lse_task_filter_options_request import LseTaskFilterOptionsRequest
16
- from ...types.lse_annotation_filter_options_request import LseAnnotationFilterOptionsRequest
17
- from ...types.serialization_options_request import SerializationOptionsRequest
18
18
  from ...types.lse_export_create import LseExportCreate
19
19
  from ...core.serialization import convert_and_respect_annotation_metadata
20
20
  from .types.exports_convert_response import ExportsConvertResponse
@@ -212,16 +212,16 @@ class ExportsClient:
212
212
  self,
213
213
  id: int,
214
214
  *,
215
- title: typing.Optional[str] = OMIT,
215
+ annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT,
216
+ converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT,
217
+ counters: typing.Optional[typing.Optional[typing.Any]] = OMIT,
216
218
  created_by: typing.Optional[UserSimpleRequest] = OMIT,
217
219
  finished_at: typing.Optional[dt.datetime] = OMIT,
218
- status: typing.Optional[Status7BfEnum] = OMIT,
219
220
  md5: typing.Optional[str] = OMIT,
220
- counters: typing.Optional[typing.Optional[typing.Any]] = OMIT,
221
- converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT,
222
- task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT,
223
- annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT,
224
221
  serialization_options: typing.Optional[SerializationOptionsRequest] = OMIT,
222
+ status: typing.Optional[Status7BfEnum] = OMIT,
223
+ task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT,
224
+ title: typing.Optional[str] = OMIT,
225
225
  request_options: typing.Optional[RequestOptions] = None,
226
226
  ) -> LseExportCreate:
227
227
  """
@@ -232,26 +232,26 @@ class ExportsClient:
232
232
  id : int
233
233
  A unique integer value identifying this project.
234
234
 
235
- title : typing.Optional[str]
235
+ annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest]
236
+
237
+ converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]]
238
+
239
+ counters : typing.Optional[typing.Optional[typing.Any]]
236
240
 
237
241
  created_by : typing.Optional[UserSimpleRequest]
238
242
 
239
243
  finished_at : typing.Optional[dt.datetime]
240
244
  Complete or fail time
241
245
 
242
- status : typing.Optional[Status7BfEnum]
243
-
244
246
  md5 : typing.Optional[str]
245
247
 
246
- counters : typing.Optional[typing.Optional[typing.Any]]
248
+ serialization_options : typing.Optional[SerializationOptionsRequest]
247
249
 
248
- converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]]
250
+ status : typing.Optional[Status7BfEnum]
249
251
 
250
252
  task_filter_options : typing.Optional[LseTaskFilterOptionsRequest]
251
253
 
252
- annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest]
253
-
254
- serialization_options : typing.Optional[SerializationOptionsRequest]
254
+ title : typing.Optional[str]
255
255
 
256
256
  request_options : typing.Optional[RequestOptions]
257
257
  Request-specific configuration.
@@ -276,26 +276,26 @@ class ExportsClient:
276
276
  f"api/projects/{jsonable_encoder(id)}/exports/",
277
277
  method="POST",
278
278
  json={
279
- "title": title,
279
+ "annotation_filter_options": convert_and_respect_annotation_metadata(
280
+ object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write"
281
+ ),
282
+ "converted_formats": convert_and_respect_annotation_metadata(
283
+ object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write"
284
+ ),
285
+ "counters": counters,
280
286
  "created_by": convert_and_respect_annotation_metadata(
281
287
  object_=created_by, annotation=UserSimpleRequest, direction="write"
282
288
  ),
283
289
  "finished_at": finished_at,
284
- "status": status,
285
290
  "md5": md5,
286
- "counters": counters,
287
- "converted_formats": convert_and_respect_annotation_metadata(
288
- object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write"
291
+ "serialization_options": convert_and_respect_annotation_metadata(
292
+ object_=serialization_options, annotation=SerializationOptionsRequest, direction="write"
289
293
  ),
294
+ "status": status,
290
295
  "task_filter_options": convert_and_respect_annotation_metadata(
291
296
  object_=task_filter_options, annotation=LseTaskFilterOptionsRequest, direction="write"
292
297
  ),
293
- "annotation_filter_options": convert_and_respect_annotation_metadata(
294
- object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write"
295
- ),
296
- "serialization_options": convert_and_respect_annotation_metadata(
297
- object_=serialization_options, annotation=SerializationOptionsRequest, direction="write"
298
- ),
298
+ "title": title,
299
299
  },
300
300
  headers={
301
301
  "content-type": "application/json",
@@ -463,8 +463,8 @@ class ExportsClient:
463
463
  f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert",
464
464
  method="POST",
465
465
  json={
466
- "export_type": export_type,
467
466
  "download_resources": download_resources,
467
+ "export_type": export_type,
468
468
  },
469
469
  headers={
470
470
  "content-type": "application/json",
@@ -750,16 +750,16 @@ class AsyncExportsClient:
750
750
  self,
751
751
  id: int,
752
752
  *,
753
- title: typing.Optional[str] = OMIT,
753
+ annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT,
754
+ converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT,
755
+ counters: typing.Optional[typing.Optional[typing.Any]] = OMIT,
754
756
  created_by: typing.Optional[UserSimpleRequest] = OMIT,
755
757
  finished_at: typing.Optional[dt.datetime] = OMIT,
756
- status: typing.Optional[Status7BfEnum] = OMIT,
757
758
  md5: typing.Optional[str] = OMIT,
758
- counters: typing.Optional[typing.Optional[typing.Any]] = OMIT,
759
- converted_formats: typing.Optional[typing.Sequence[ConvertedFormatRequest]] = OMIT,
760
- task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT,
761
- annotation_filter_options: typing.Optional[LseAnnotationFilterOptionsRequest] = OMIT,
762
759
  serialization_options: typing.Optional[SerializationOptionsRequest] = OMIT,
760
+ status: typing.Optional[Status7BfEnum] = OMIT,
761
+ task_filter_options: typing.Optional[LseTaskFilterOptionsRequest] = OMIT,
762
+ title: typing.Optional[str] = OMIT,
763
763
  request_options: typing.Optional[RequestOptions] = None,
764
764
  ) -> LseExportCreate:
765
765
  """
@@ -770,26 +770,26 @@ class AsyncExportsClient:
770
770
  id : int
771
771
  A unique integer value identifying this project.
772
772
 
773
- title : typing.Optional[str]
773
+ annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest]
774
+
775
+ converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]]
776
+
777
+ counters : typing.Optional[typing.Optional[typing.Any]]
774
778
 
775
779
  created_by : typing.Optional[UserSimpleRequest]
776
780
 
777
781
  finished_at : typing.Optional[dt.datetime]
778
782
  Complete or fail time
779
783
 
780
- status : typing.Optional[Status7BfEnum]
781
-
782
784
  md5 : typing.Optional[str]
783
785
 
784
- counters : typing.Optional[typing.Optional[typing.Any]]
786
+ serialization_options : typing.Optional[SerializationOptionsRequest]
785
787
 
786
- converted_formats : typing.Optional[typing.Sequence[ConvertedFormatRequest]]
788
+ status : typing.Optional[Status7BfEnum]
787
789
 
788
790
  task_filter_options : typing.Optional[LseTaskFilterOptionsRequest]
789
791
 
790
- annotation_filter_options : typing.Optional[LseAnnotationFilterOptionsRequest]
791
-
792
- serialization_options : typing.Optional[SerializationOptionsRequest]
792
+ title : typing.Optional[str]
793
793
 
794
794
  request_options : typing.Optional[RequestOptions]
795
795
  Request-specific configuration.
@@ -822,26 +822,26 @@ class AsyncExportsClient:
822
822
  f"api/projects/{jsonable_encoder(id)}/exports/",
823
823
  method="POST",
824
824
  json={
825
- "title": title,
825
+ "annotation_filter_options": convert_and_respect_annotation_metadata(
826
+ object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write"
827
+ ),
828
+ "converted_formats": convert_and_respect_annotation_metadata(
829
+ object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write"
830
+ ),
831
+ "counters": counters,
826
832
  "created_by": convert_and_respect_annotation_metadata(
827
833
  object_=created_by, annotation=UserSimpleRequest, direction="write"
828
834
  ),
829
835
  "finished_at": finished_at,
830
- "status": status,
831
836
  "md5": md5,
832
- "counters": counters,
833
- "converted_formats": convert_and_respect_annotation_metadata(
834
- object_=converted_formats, annotation=typing.Sequence[ConvertedFormatRequest], direction="write"
837
+ "serialization_options": convert_and_respect_annotation_metadata(
838
+ object_=serialization_options, annotation=SerializationOptionsRequest, direction="write"
835
839
  ),
840
+ "status": status,
836
841
  "task_filter_options": convert_and_respect_annotation_metadata(
837
842
  object_=task_filter_options, annotation=LseTaskFilterOptionsRequest, direction="write"
838
843
  ),
839
- "annotation_filter_options": convert_and_respect_annotation_metadata(
840
- object_=annotation_filter_options, annotation=LseAnnotationFilterOptionsRequest, direction="write"
841
- ),
842
- "serialization_options": convert_and_respect_annotation_metadata(
843
- object_=serialization_options, annotation=SerializationOptionsRequest, direction="write"
844
- ),
844
+ "title": title,
845
845
  },
846
846
  headers={
847
847
  "content-type": "application/json",
@@ -1033,8 +1033,8 @@ class AsyncExportsClient:
1033
1033
  f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert",
1034
1034
  method="POST",
1035
1035
  json={
1036
- "export_type": export_type,
1037
1036
  "download_resources": download_resources,
1037
+ "export_type": export_type,
1038
1038
  },
1039
1039
  headers={
1040
1040
  "content-type": "application/json",
@@ -7,8 +7,8 @@ import pydantic
7
7
 
8
8
 
9
9
  class ExportsConvertResponse(UncheckedBaseModel):
10
- export_type: typing.Optional[str] = None
11
10
  converted_format: typing.Optional[int] = None
11
+ export_type: typing.Optional[str] = None
12
12
 
13
13
  if IS_PYDANTIC_V2:
14
14
  model_config: typing.ClassVar[pydantic.ConfigDict] = pydantic.ConfigDict(extra="allow", frozen=True) # type: ignore # Pydantic v2
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,137 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from ...core.client_wrapper import SyncClientWrapper
4
+ import typing
5
+ from ...core.request_options import RequestOptions
6
+ from ...types.lse_user import LseUser
7
+ from ...core.jsonable_encoder import jsonable_encoder
8
+ from ...core.unchecked_base_model import construct_type
9
+ from json.decoder import JSONDecodeError
10
+ from ...core.api_error import ApiError
11
+ from ...core.client_wrapper import AsyncClientWrapper
12
+
13
+
14
+ class MembersClient:
15
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
16
+ self._client_wrapper = client_wrapper
17
+
18
+ def get(
19
+ self, id: int, *, user_ids: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
20
+ ) -> typing.List[LseUser]:
21
+ """
22
+ Retrieve the members for a specific project. Optionally filter by user IDs (comma-separated).
23
+
24
+ Parameters
25
+ ----------
26
+ id : int
27
+
28
+ user_ids : typing.Optional[str]
29
+ Comma-separated list of user IDs to include. Example: user_ids=1,2,3
30
+
31
+ request_options : typing.Optional[RequestOptions]
32
+ Request-specific configuration.
33
+
34
+ Returns
35
+ -------
36
+ typing.List[LseUser]
37
+ List of users with membership information
38
+
39
+ Examples
40
+ --------
41
+ from label_studio_sdk import LabelStudio
42
+
43
+ client = LabelStudio(
44
+ api_key="YOUR_API_KEY",
45
+ )
46
+ client.projects.members.get(
47
+ id=1,
48
+ )
49
+ """
50
+ _response = self._client_wrapper.httpx_client.request(
51
+ f"api/projects/{jsonable_encoder(id)}/members/",
52
+ method="GET",
53
+ params={
54
+ "user_ids": user_ids,
55
+ },
56
+ request_options=request_options,
57
+ )
58
+ try:
59
+ if 200 <= _response.status_code < 300:
60
+ return typing.cast(
61
+ typing.List[LseUser],
62
+ construct_type(
63
+ type_=typing.List[LseUser], # type: ignore
64
+ object_=_response.json(),
65
+ ),
66
+ )
67
+ _response_json = _response.json()
68
+ except JSONDecodeError:
69
+ raise ApiError(status_code=_response.status_code, body=_response.text)
70
+ raise ApiError(status_code=_response.status_code, body=_response_json)
71
+
72
+
73
+ class AsyncMembersClient:
74
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
75
+ self._client_wrapper = client_wrapper
76
+
77
+ async def get(
78
+ self, id: int, *, user_ids: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
79
+ ) -> typing.List[LseUser]:
80
+ """
81
+ Retrieve the members for a specific project. Optionally filter by user IDs (comma-separated).
82
+
83
+ Parameters
84
+ ----------
85
+ id : int
86
+
87
+ user_ids : typing.Optional[str]
88
+ Comma-separated list of user IDs to include. Example: user_ids=1,2,3
89
+
90
+ request_options : typing.Optional[RequestOptions]
91
+ Request-specific configuration.
92
+
93
+ Returns
94
+ -------
95
+ typing.List[LseUser]
96
+ List of users with membership information
97
+
98
+ Examples
99
+ --------
100
+ import asyncio
101
+
102
+ from label_studio_sdk import AsyncLabelStudio
103
+
104
+ client = AsyncLabelStudio(
105
+ api_key="YOUR_API_KEY",
106
+ )
107
+
108
+
109
+ async def main() -> None:
110
+ await client.projects.members.get(
111
+ id=1,
112
+ )
113
+
114
+
115
+ asyncio.run(main())
116
+ """
117
+ _response = await self._client_wrapper.httpx_client.request(
118
+ f"api/projects/{jsonable_encoder(id)}/members/",
119
+ method="GET",
120
+ params={
121
+ "user_ids": user_ids,
122
+ },
123
+ request_options=request_options,
124
+ )
125
+ try:
126
+ if 200 <= _response.status_code < 300:
127
+ return typing.cast(
128
+ typing.List[LseUser],
129
+ construct_type(
130
+ type_=typing.List[LseUser], # type: ignore
131
+ object_=_response.json(),
132
+ ),
133
+ )
134
+ _response_json = _response.json()
135
+ except JSONDecodeError:
136
+ raise ApiError(status_code=_response.status_code, body=_response.text)
137
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -6,8 +6,8 @@ import typing
6
6
  from .stats_iaa_response_iaa import StatsIaaResponseIaa
7
7
  from ....core.serialization import FieldMetadata
8
8
  import pydantic
9
- from .stats_iaa_response_std import StatsIaaResponseStd
10
9
  from .stats_iaa_response_common_tasks import StatsIaaResponseCommonTasks
10
+ from .stats_iaa_response_std import StatsIaaResponseStd
11
11
  from ....core.pydantic_utilities import IS_PYDANTIC_V2
12
12
 
13
13
 
@@ -19,9 +19,9 @@ class StatsIaaResponse(UncheckedBaseModel):
19
19
  Inter-Annotator Agreement matrix - 2D array when per_label=false, object with label keys when per_label=true
20
20
  """
21
21
 
22
- users: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None)
22
+ common_tasks: typing.Optional[StatsIaaResponseCommonTasks] = pydantic.Field(default=None)
23
23
  """
24
- List of users in the matrix
24
+ Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true
25
25
  """
26
26
 
27
27
  std: typing.Optional[StatsIaaResponseStd] = pydantic.Field(default=None)
@@ -29,9 +29,9 @@ class StatsIaaResponse(UncheckedBaseModel):
29
29
  Standard deviation - number when per_label=false, object with label keys when per_label=true
30
30
  """
31
31
 
32
- common_tasks: typing.Optional[StatsIaaResponseCommonTasks] = pydantic.Field(default=None)
32
+ users: typing.Optional[typing.List[typing.Dict[str, typing.Optional[typing.Any]]]] = pydantic.Field(default=None)
33
33
  """
34
- Common tasks matrix - 2D array when per_label=false, object with label keys when per_label=true
34
+ List of users in the matrix
35
35
  """
36
36
 
37
37
  if IS_PYDANTIC_V2:
@@ -11,19 +11,19 @@ class ProjectsImportTasksResponse(UncheckedBaseModel):
11
11
  Task creation response
12
12
  """
13
13
 
14
- task_count: typing.Optional[int] = pydantic.Field(default=None)
14
+ annotation_count: typing.Optional[int] = pydantic.Field(default=None)
15
15
  """
16
- Number of tasks added
16
+ Number of annotations added
17
17
  """
18
18
 
19
- annotation_count: typing.Optional[int] = pydantic.Field(default=None)
19
+ could_be_tasks_list: typing.Optional[bool] = pydantic.Field(default=None)
20
20
  """
21
- Number of annotations added
21
+ Whether uploaded files can contain lists of tasks, like CSV/TSV files
22
22
  """
23
23
 
24
- predictions_count: typing.Optional[int] = pydantic.Field(default=None)
24
+ data_columns: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
25
25
  """
26
- Number of predictions added
26
+ The list of found data columns
27
27
  """
28
28
 
29
29
  duration: typing.Optional[float] = pydantic.Field(default=None)
@@ -36,19 +36,19 @@ class ProjectsImportTasksResponse(UncheckedBaseModel):
36
36
  Database IDs of uploaded files
37
37
  """
38
38
 
39
- could_be_tasks_list: typing.Optional[bool] = pydantic.Field(default=None)
39
+ found_formats: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
40
40
  """
41
- Whether uploaded files can contain lists of tasks, like CSV/TSV files
41
+ The list of found file formats
42
42
  """
43
43
 
44
- found_formats: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
44
+ predictions_count: typing.Optional[int] = pydantic.Field(default=None)
45
45
  """
46
- The list of found file formats
46
+ Number of predictions added
47
47
  """
48
48
 
49
- data_columns: typing.Optional[typing.List[str]] = pydantic.Field(default=None)
49
+ task_count: typing.Optional[int] = pydantic.Field(default=None)
50
50
  """
51
- The list of found data columns
51
+ Number of tasks added
52
52
  """
53
53
 
54
54
  if IS_PYDANTIC_V2: