label-studio-sdk 1.0.5__py3-none-any.whl → 1.0.8__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 (77) hide show
  1. label_studio_sdk/__init__.py +76 -0
  2. label_studio_sdk/_extensions/eval/categorical.py +83 -0
  3. label_studio_sdk/_extensions/label_studio_tools/core/label_config.py +13 -4
  4. label_studio_sdk/_extensions/label_studio_tools/core/utils/io.py +35 -17
  5. label_studio_sdk/_extensions/label_studio_tools/core/utils/json_schema.py +86 -0
  6. label_studio_sdk/_legacy/schema/label_config_schema.json +42 -11
  7. label_studio_sdk/annotations/__init__.py +3 -0
  8. label_studio_sdk/annotations/client.py +109 -0
  9. label_studio_sdk/annotations/types/__init__.py +5 -0
  10. label_studio_sdk/annotations/types/annotations_create_bulk_response_item.py +29 -0
  11. label_studio_sdk/base_client.py +9 -0
  12. label_studio_sdk/comments/__init__.py +2 -0
  13. label_studio_sdk/comments/client.py +512 -0
  14. label_studio_sdk/converter/converter.py +11 -4
  15. label_studio_sdk/converter/imports/coco.py +14 -13
  16. label_studio_sdk/converter/utils.py +72 -3
  17. label_studio_sdk/core/client_wrapper.py +1 -1
  18. label_studio_sdk/files/client.py +26 -16
  19. label_studio_sdk/label_interface/control_tags.py +205 -10
  20. label_studio_sdk/label_interface/interface.py +117 -10
  21. label_studio_sdk/label_interface/region.py +1 -10
  22. label_studio_sdk/model_providers/__init__.py +2 -0
  23. label_studio_sdk/model_providers/client.py +708 -0
  24. label_studio_sdk/projects/client.py +32 -16
  25. label_studio_sdk/projects/exports/client.py +133 -40
  26. label_studio_sdk/prompts/__init__.py +21 -0
  27. label_studio_sdk/prompts/client.py +862 -0
  28. label_studio_sdk/prompts/indicators/__init__.py +2 -0
  29. label_studio_sdk/prompts/indicators/client.py +194 -0
  30. label_studio_sdk/prompts/runs/__init__.py +5 -0
  31. label_studio_sdk/prompts/runs/client.py +354 -0
  32. label_studio_sdk/prompts/runs/types/__init__.py +5 -0
  33. label_studio_sdk/prompts/runs/types/runs_list_request_project_subset.py +5 -0
  34. label_studio_sdk/prompts/types/__init__.py +15 -0
  35. label_studio_sdk/prompts/types/prompts_batch_failed_predictions_request_failed_predictions_item.py +42 -0
  36. label_studio_sdk/prompts/types/prompts_batch_failed_predictions_response.py +29 -0
  37. label_studio_sdk/prompts/types/prompts_batch_predictions_request_results_item.py +62 -0
  38. label_studio_sdk/prompts/types/prompts_batch_predictions_response.py +29 -0
  39. label_studio_sdk/prompts/versions/__init__.py +2 -0
  40. label_studio_sdk/prompts/versions/client.py +1046 -0
  41. label_studio_sdk/types/__init__.py +58 -0
  42. label_studio_sdk/types/comment.py +39 -0
  43. label_studio_sdk/types/comment_created_by.py +5 -0
  44. label_studio_sdk/types/inference_run.py +43 -0
  45. label_studio_sdk/types/inference_run_cost_estimate.py +57 -0
  46. label_studio_sdk/types/inference_run_created_by.py +5 -0
  47. label_studio_sdk/types/inference_run_organization.py +5 -0
  48. label_studio_sdk/types/inference_run_project_subset.py +5 -0
  49. label_studio_sdk/types/inference_run_status.py +7 -0
  50. label_studio_sdk/types/key_indicator_value.py +30 -0
  51. label_studio_sdk/types/key_indicators.py +7 -0
  52. label_studio_sdk/types/key_indicators_item.py +51 -0
  53. label_studio_sdk/types/key_indicators_item_additional_kpis_item.py +37 -0
  54. label_studio_sdk/types/key_indicators_item_extra_kpis_item.py +37 -0
  55. label_studio_sdk/types/model_provider_connection.py +71 -0
  56. label_studio_sdk/types/model_provider_connection_budget_reset_period.py +5 -0
  57. label_studio_sdk/types/model_provider_connection_created_by.py +5 -0
  58. label_studio_sdk/types/model_provider_connection_organization.py +5 -0
  59. label_studio_sdk/types/model_provider_connection_provider.py +5 -0
  60. label_studio_sdk/types/model_provider_connection_scope.py +5 -0
  61. label_studio_sdk/types/prompt.py +79 -0
  62. label_studio_sdk/types/prompt_created_by.py +5 -0
  63. label_studio_sdk/types/prompt_organization.py +5 -0
  64. label_studio_sdk/types/prompt_version.py +41 -0
  65. label_studio_sdk/types/prompt_version_created_by.py +5 -0
  66. label_studio_sdk/types/prompt_version_organization.py +5 -0
  67. label_studio_sdk/types/prompt_version_provider.py +5 -0
  68. label_studio_sdk/types/refined_prompt_response.py +64 -0
  69. label_studio_sdk/types/refined_prompt_response_refinement_status.py +7 -0
  70. label_studio_sdk/types/task.py +3 -2
  71. label_studio_sdk/types/task_comment_authors_item.py +5 -0
  72. label_studio_sdk/webhooks/client.py +245 -36
  73. label_studio_sdk/workspaces/client.py +20 -20
  74. label_studio_sdk-1.0.8.dist-info/LICENSE +201 -0
  75. {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.8.dist-info}/METADATA +19 -3
  76. {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.8.dist-info}/RECORD +77 -24
  77. {label_studio_sdk-1.0.5.dist-info → label_studio_sdk-1.0.8.dist-info}/WHEEL +1 -1
@@ -131,6 +131,7 @@ class ProjectsClient:
131
131
  color: typing.Optional[str] = OMIT,
132
132
  control_weights: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
133
133
  workspace: typing.Optional[int] = OMIT,
134
+ model_version: typing.Optional[str] = OMIT,
134
135
  request_options: typing.Optional[RequestOptions] = None,
135
136
  ) -> ProjectsCreateResponse:
136
137
  """
@@ -188,6 +189,9 @@ class ProjectsClient:
188
189
  workspace : typing.Optional[int]
189
190
  Workspace ID
190
191
 
192
+ model_version : typing.Optional[str]
193
+ Model version
194
+
191
195
  request_options : typing.Optional[RequestOptions]
192
196
  Request-specific configuration.
193
197
 
@@ -223,6 +227,7 @@ class ProjectsClient:
223
227
  "color": color,
224
228
  "control_weights": control_weights,
225
229
  "workspace": workspace,
230
+ "model_version": model_version,
226
231
  },
227
232
  request_options=request_options,
228
233
  omit=OMIT,
@@ -332,6 +337,7 @@ class ProjectsClient:
332
337
  color: typing.Optional[str] = OMIT,
333
338
  control_weights: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
334
339
  workspace: typing.Optional[int] = OMIT,
340
+ model_version: typing.Optional[str] = OMIT,
335
341
  request_options: typing.Optional[RequestOptions] = None,
336
342
  ) -> ProjectsUpdateResponse:
337
343
  """
@@ -396,6 +402,9 @@ class ProjectsClient:
396
402
  workspace : typing.Optional[int]
397
403
  Workspace ID
398
404
 
405
+ model_version : typing.Optional[str]
406
+ Model version
407
+
399
408
  request_options : typing.Optional[RequestOptions]
400
409
  Request-specific configuration.
401
410
 
@@ -433,6 +442,7 @@ class ProjectsClient:
433
442
  "color": color,
434
443
  "control_weights": control_weights,
435
444
  "workspace": workspace,
445
+ "model_version": model_version,
436
446
  },
437
447
  request_options=request_options,
438
448
  omit=OMIT,
@@ -541,7 +551,7 @@ class ProjectsClient:
541
551
  )
542
552
  client.projects.import_tasks(
543
553
  id=1,
544
- request=[{}],
554
+ request=[{"key": "value"}],
545
555
  )
546
556
  """
547
557
  _response = self._client_wrapper.httpx_client.request(
@@ -567,7 +577,7 @@ class ProjectsClient:
567
577
  raise ApiError(status_code=_response.status_code, body=_response_json)
568
578
 
569
579
  def validate_config(
570
- self, id: int, *, request: ProjectLabelConfig, request_options: typing.Optional[RequestOptions] = None
580
+ self, id: int, *, label_config: str, request_options: typing.Optional[RequestOptions] = None
571
581
  ) -> ProjectLabelConfig:
572
582
  """
573
583
  Determine whether the label configuration for a specific project is valid. For more information about setting up labeling configs, see [Configure labeling interface](https://labelstud.io/guide/setup) and our [Tags reference](https://labelstud.io/tags/).
@@ -579,7 +589,8 @@ class ProjectsClient:
579
589
  id : int
580
590
  A unique integer value identifying this project.
581
591
 
582
- request : ProjectLabelConfig
592
+ label_config : str
593
+ Label config in XML format. See more about it in documentation
583
594
 
584
595
  request_options : typing.Optional[RequestOptions]
585
596
  Request-specific configuration.
@@ -591,7 +602,6 @@ class ProjectsClient:
591
602
 
592
603
  Examples
593
604
  --------
594
- from label_studio_sdk import ProjectLabelConfig
595
605
  from label_studio_sdk.client import LabelStudio
596
606
 
597
607
  client = LabelStudio(
@@ -599,15 +609,13 @@ class ProjectsClient:
599
609
  )
600
610
  client.projects.validate_config(
601
611
  id=1,
602
- request=ProjectLabelConfig(
603
- label_config="label_config",
604
- ),
612
+ label_config="label_config",
605
613
  )
606
614
  """
607
615
  _response = self._client_wrapper.httpx_client.request(
608
616
  f"api/projects/{jsonable_encoder(id)}/validate/",
609
617
  method="POST",
610
- json=request,
618
+ json={"label_config": label_config},
611
619
  request_options=request_options,
612
620
  omit=OMIT,
613
621
  )
@@ -729,6 +737,7 @@ class AsyncProjectsClient:
729
737
  color: typing.Optional[str] = OMIT,
730
738
  control_weights: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
731
739
  workspace: typing.Optional[int] = OMIT,
740
+ model_version: typing.Optional[str] = OMIT,
732
741
  request_options: typing.Optional[RequestOptions] = None,
733
742
  ) -> ProjectsCreateResponse:
734
743
  """
@@ -786,6 +795,9 @@ class AsyncProjectsClient:
786
795
  workspace : typing.Optional[int]
787
796
  Workspace ID
788
797
 
798
+ model_version : typing.Optional[str]
799
+ Model version
800
+
789
801
  request_options : typing.Optional[RequestOptions]
790
802
  Request-specific configuration.
791
803
 
@@ -821,6 +833,7 @@ class AsyncProjectsClient:
821
833
  "color": color,
822
834
  "control_weights": control_weights,
823
835
  "workspace": workspace,
836
+ "model_version": model_version,
824
837
  },
825
838
  request_options=request_options,
826
839
  omit=OMIT,
@@ -930,6 +943,7 @@ class AsyncProjectsClient:
930
943
  color: typing.Optional[str] = OMIT,
931
944
  control_weights: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
932
945
  workspace: typing.Optional[int] = OMIT,
946
+ model_version: typing.Optional[str] = OMIT,
933
947
  request_options: typing.Optional[RequestOptions] = None,
934
948
  ) -> ProjectsUpdateResponse:
935
949
  """
@@ -994,6 +1008,9 @@ class AsyncProjectsClient:
994
1008
  workspace : typing.Optional[int]
995
1009
  Workspace ID
996
1010
 
1011
+ model_version : typing.Optional[str]
1012
+ Model version
1013
+
997
1014
  request_options : typing.Optional[RequestOptions]
998
1015
  Request-specific configuration.
999
1016
 
@@ -1031,6 +1048,7 @@ class AsyncProjectsClient:
1031
1048
  "color": color,
1032
1049
  "control_weights": control_weights,
1033
1050
  "workspace": workspace,
1051
+ "model_version": model_version,
1034
1052
  },
1035
1053
  request_options=request_options,
1036
1054
  omit=OMIT,
@@ -1139,7 +1157,7 @@ class AsyncProjectsClient:
1139
1157
  )
1140
1158
  await client.projects.import_tasks(
1141
1159
  id=1,
1142
- request=[{}],
1160
+ request=[{"key": "value"}],
1143
1161
  )
1144
1162
  """
1145
1163
  _response = await self._client_wrapper.httpx_client.request(
@@ -1165,7 +1183,7 @@ class AsyncProjectsClient:
1165
1183
  raise ApiError(status_code=_response.status_code, body=_response_json)
1166
1184
 
1167
1185
  async def validate_config(
1168
- self, id: int, *, request: ProjectLabelConfig, request_options: typing.Optional[RequestOptions] = None
1186
+ self, id: int, *, label_config: str, request_options: typing.Optional[RequestOptions] = None
1169
1187
  ) -> ProjectLabelConfig:
1170
1188
  """
1171
1189
  Determine whether the label configuration for a specific project is valid. For more information about setting up labeling configs, see [Configure labeling interface](https://labelstud.io/guide/setup) and our [Tags reference](https://labelstud.io/tags/).
@@ -1177,7 +1195,8 @@ class AsyncProjectsClient:
1177
1195
  id : int
1178
1196
  A unique integer value identifying this project.
1179
1197
 
1180
- request : ProjectLabelConfig
1198
+ label_config : str
1199
+ Label config in XML format. See more about it in documentation
1181
1200
 
1182
1201
  request_options : typing.Optional[RequestOptions]
1183
1202
  Request-specific configuration.
@@ -1189,7 +1208,6 @@ class AsyncProjectsClient:
1189
1208
 
1190
1209
  Examples
1191
1210
  --------
1192
- from label_studio_sdk import ProjectLabelConfig
1193
1211
  from label_studio_sdk.client import AsyncLabelStudio
1194
1212
 
1195
1213
  client = AsyncLabelStudio(
@@ -1197,15 +1215,13 @@ class AsyncProjectsClient:
1197
1215
  )
1198
1216
  await client.projects.validate_config(
1199
1217
  id=1,
1200
- request=ProjectLabelConfig(
1201
- label_config="label_config",
1202
- ),
1218
+ label_config="label_config",
1203
1219
  )
1204
1220
  """
1205
1221
  _response = await self._client_wrapper.httpx_client.request(
1206
1222
  f"api/projects/{jsonable_encoder(id)}/validate/",
1207
1223
  method="POST",
1208
- json=request,
1224
+ json={"label_config": label_config},
1209
1225
  request_options=request_options,
1210
1226
  omit=OMIT,
1211
1227
  )
@@ -1,5 +1,6 @@
1
1
  # This file was auto-generated by Fern from our API Definition.
2
2
 
3
+ import datetime as dt
3
4
  import typing
4
5
  from json.decoder import JSONDecodeError
5
6
 
@@ -8,9 +9,15 @@ from ...core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
9
  from ...core.jsonable_encoder import jsonable_encoder
9
10
  from ...core.pydantic_utilities import pydantic_v1
10
11
  from ...core.request_options import RequestOptions
12
+ from ...types.annotation_filter_options import AnnotationFilterOptions
13
+ from ...types.converted_format import ConvertedFormat
11
14
  from ...types.export import Export
12
15
  from ...types.export_convert import ExportConvert
13
16
  from ...types.export_create import ExportCreate
17
+ from ...types.export_create_status import ExportCreateStatus
18
+ from ...types.serialization_options import SerializationOptions
19
+ from ...types.task_filter_options import TaskFilterOptions
20
+ from ...types.user_simple import UserSimple
14
21
 
15
22
  # this is used as the default value for optional parameters
16
23
  OMIT = typing.cast(typing.Any, ...)
@@ -199,7 +206,22 @@ class ExportsClient:
199
206
  raise ApiError(status_code=_response.status_code, body=_response_json)
200
207
 
201
208
  def create(
202
- self, id: int, *, request: ExportCreate, request_options: typing.Optional[RequestOptions] = None
209
+ self,
210
+ id_: int,
211
+ *,
212
+ title: typing.Optional[str] = OMIT,
213
+ id: typing.Optional[int] = OMIT,
214
+ created_by: typing.Optional[UserSimple] = OMIT,
215
+ created_at: typing.Optional[dt.datetime] = OMIT,
216
+ finished_at: typing.Optional[dt.datetime] = OMIT,
217
+ status: typing.Optional[ExportCreateStatus] = OMIT,
218
+ md5: typing.Optional[str] = OMIT,
219
+ counters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
220
+ converted_formats: typing.Optional[typing.Sequence[ConvertedFormat]] = OMIT,
221
+ task_filter_options: typing.Optional[TaskFilterOptions] = OMIT,
222
+ annotation_filter_options: typing.Optional[AnnotationFilterOptions] = OMIT,
223
+ serialization_options: typing.Optional[SerializationOptions] = OMIT,
224
+ request_options: typing.Optional[RequestOptions] = None,
203
225
  ) -> ExportCreate:
204
226
  """
205
227
  Create a new export request to start a background task and generate an export file (snapshot) for a specific project by ID. The project ID can be found in the URL when viewing the project in Label Studio, or you can retrieve all project IDs using [List all projects](../list).
@@ -210,10 +232,34 @@ class ExportsClient:
210
232
 
211
233
  Parameters
212
234
  ----------
213
- id : int
235
+ id_ : int
214
236
  A unique integer value identifying this project.
215
237
 
216
- request : ExportCreate
238
+ title : typing.Optional[str]
239
+
240
+ id : typing.Optional[int]
241
+
242
+ created_by : typing.Optional[UserSimple]
243
+
244
+ created_at : typing.Optional[dt.datetime]
245
+ Creation time
246
+
247
+ finished_at : typing.Optional[dt.datetime]
248
+ Complete or fail time
249
+
250
+ status : typing.Optional[ExportCreateStatus]
251
+
252
+ md5 : typing.Optional[str]
253
+
254
+ counters : typing.Optional[typing.Dict[str, typing.Any]]
255
+
256
+ converted_formats : typing.Optional[typing.Sequence[ConvertedFormat]]
257
+
258
+ task_filter_options : typing.Optional[TaskFilterOptions]
259
+
260
+ annotation_filter_options : typing.Optional[AnnotationFilterOptions]
261
+
262
+ serialization_options : typing.Optional[SerializationOptions]
217
263
 
218
264
  request_options : typing.Optional[RequestOptions]
219
265
  Request-specific configuration.
@@ -225,21 +271,32 @@ class ExportsClient:
225
271
 
226
272
  Examples
227
273
  --------
228
- from label_studio_sdk import ExportCreate
229
274
  from label_studio_sdk.client import LabelStudio
230
275
 
231
276
  client = LabelStudio(
232
277
  api_key="YOUR_API_KEY",
233
278
  )
234
279
  client.projects.exports.create(
235
- id=1,
236
- request=ExportCreate(),
280
+ id_=1,
237
281
  )
238
282
  """
239
283
  _response = self._client_wrapper.httpx_client.request(
240
- f"api/projects/{jsonable_encoder(id)}/exports/",
284
+ f"api/projects/{jsonable_encoder(id_)}/exports/",
241
285
  method="POST",
242
- json=request,
286
+ json={
287
+ "title": title,
288
+ "id": id,
289
+ "created_by": created_by,
290
+ "created_at": created_at,
291
+ "finished_at": finished_at,
292
+ "status": status,
293
+ "md5": md5,
294
+ "counters": counters,
295
+ "converted_formats": converted_formats,
296
+ "task_filter_options": task_filter_options,
297
+ "annotation_filter_options": annotation_filter_options,
298
+ "serialization_options": serialization_options,
299
+ },
243
300
  request_options=request_options,
244
301
  omit=OMIT,
245
302
  )
@@ -347,12 +404,7 @@ class ExportsClient:
347
404
  raise ApiError(status_code=_response.status_code, body=_response_json)
348
405
 
349
406
  def convert(
350
- self,
351
- id: int,
352
- export_pk: str,
353
- *,
354
- request: ExportConvert,
355
- request_options: typing.Optional[RequestOptions] = None,
407
+ self, id: int, export_pk: str, *, export_type: str, request_options: typing.Optional[RequestOptions] = None
356
408
  ) -> ExportConvert:
357
409
  """
358
410
  You can use this to convert an export snapshot into the selected format.
@@ -371,7 +423,8 @@ class ExportsClient:
371
423
  export_pk : str
372
424
  Primary key identifying the export file.
373
425
 
374
- request : ExportConvert
426
+ export_type : str
427
+ Export file format.
375
428
 
376
429
  request_options : typing.Optional[RequestOptions]
377
430
  Request-specific configuration.
@@ -383,7 +436,6 @@ class ExportsClient:
383
436
 
384
437
  Examples
385
438
  --------
386
- from label_studio_sdk import ExportConvert
387
439
  from label_studio_sdk.client import LabelStudio
388
440
 
389
441
  client = LabelStudio(
@@ -392,15 +444,13 @@ class ExportsClient:
392
444
  client.projects.exports.convert(
393
445
  id=1,
394
446
  export_pk="export_pk",
395
- request=ExportConvert(
396
- export_type="export_type",
397
- ),
447
+ export_type="export_type",
398
448
  )
399
449
  """
400
450
  _response = self._client_wrapper.httpx_client.request(
401
451
  f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert",
402
452
  method="POST",
403
- json=request,
453
+ json={"export_type": export_type},
404
454
  request_options=request_options,
405
455
  omit=OMIT,
406
456
  )
@@ -657,7 +707,22 @@ class AsyncExportsClient:
657
707
  raise ApiError(status_code=_response.status_code, body=_response_json)
658
708
 
659
709
  async def create(
660
- self, id: int, *, request: ExportCreate, request_options: typing.Optional[RequestOptions] = None
710
+ self,
711
+ id_: int,
712
+ *,
713
+ title: typing.Optional[str] = OMIT,
714
+ id: typing.Optional[int] = OMIT,
715
+ created_by: typing.Optional[UserSimple] = OMIT,
716
+ created_at: typing.Optional[dt.datetime] = OMIT,
717
+ finished_at: typing.Optional[dt.datetime] = OMIT,
718
+ status: typing.Optional[ExportCreateStatus] = OMIT,
719
+ md5: typing.Optional[str] = OMIT,
720
+ counters: typing.Optional[typing.Dict[str, typing.Any]] = OMIT,
721
+ converted_formats: typing.Optional[typing.Sequence[ConvertedFormat]] = OMIT,
722
+ task_filter_options: typing.Optional[TaskFilterOptions] = OMIT,
723
+ annotation_filter_options: typing.Optional[AnnotationFilterOptions] = OMIT,
724
+ serialization_options: typing.Optional[SerializationOptions] = OMIT,
725
+ request_options: typing.Optional[RequestOptions] = None,
661
726
  ) -> ExportCreate:
662
727
  """
663
728
  Create a new export request to start a background task and generate an export file (snapshot) for a specific project by ID. The project ID can be found in the URL when viewing the project in Label Studio, or you can retrieve all project IDs using [List all projects](../list).
@@ -668,10 +733,34 @@ class AsyncExportsClient:
668
733
 
669
734
  Parameters
670
735
  ----------
671
- id : int
736
+ id_ : int
672
737
  A unique integer value identifying this project.
673
738
 
674
- request : ExportCreate
739
+ title : typing.Optional[str]
740
+
741
+ id : typing.Optional[int]
742
+
743
+ created_by : typing.Optional[UserSimple]
744
+
745
+ created_at : typing.Optional[dt.datetime]
746
+ Creation time
747
+
748
+ finished_at : typing.Optional[dt.datetime]
749
+ Complete or fail time
750
+
751
+ status : typing.Optional[ExportCreateStatus]
752
+
753
+ md5 : typing.Optional[str]
754
+
755
+ counters : typing.Optional[typing.Dict[str, typing.Any]]
756
+
757
+ converted_formats : typing.Optional[typing.Sequence[ConvertedFormat]]
758
+
759
+ task_filter_options : typing.Optional[TaskFilterOptions]
760
+
761
+ annotation_filter_options : typing.Optional[AnnotationFilterOptions]
762
+
763
+ serialization_options : typing.Optional[SerializationOptions]
675
764
 
676
765
  request_options : typing.Optional[RequestOptions]
677
766
  Request-specific configuration.
@@ -683,21 +772,32 @@ class AsyncExportsClient:
683
772
 
684
773
  Examples
685
774
  --------
686
- from label_studio_sdk import ExportCreate
687
775
  from label_studio_sdk.client import AsyncLabelStudio
688
776
 
689
777
  client = AsyncLabelStudio(
690
778
  api_key="YOUR_API_KEY",
691
779
  )
692
780
  await client.projects.exports.create(
693
- id=1,
694
- request=ExportCreate(),
781
+ id_=1,
695
782
  )
696
783
  """
697
784
  _response = await self._client_wrapper.httpx_client.request(
698
- f"api/projects/{jsonable_encoder(id)}/exports/",
785
+ f"api/projects/{jsonable_encoder(id_)}/exports/",
699
786
  method="POST",
700
- json=request,
787
+ json={
788
+ "title": title,
789
+ "id": id,
790
+ "created_by": created_by,
791
+ "created_at": created_at,
792
+ "finished_at": finished_at,
793
+ "status": status,
794
+ "md5": md5,
795
+ "counters": counters,
796
+ "converted_formats": converted_formats,
797
+ "task_filter_options": task_filter_options,
798
+ "annotation_filter_options": annotation_filter_options,
799
+ "serialization_options": serialization_options,
800
+ },
701
801
  request_options=request_options,
702
802
  omit=OMIT,
703
803
  )
@@ -805,12 +905,7 @@ class AsyncExportsClient:
805
905
  raise ApiError(status_code=_response.status_code, body=_response_json)
806
906
 
807
907
  async def convert(
808
- self,
809
- id: int,
810
- export_pk: str,
811
- *,
812
- request: ExportConvert,
813
- request_options: typing.Optional[RequestOptions] = None,
908
+ self, id: int, export_pk: str, *, export_type: str, request_options: typing.Optional[RequestOptions] = None
814
909
  ) -> ExportConvert:
815
910
  """
816
911
  You can use this to convert an export snapshot into the selected format.
@@ -829,7 +924,8 @@ class AsyncExportsClient:
829
924
  export_pk : str
830
925
  Primary key identifying the export file.
831
926
 
832
- request : ExportConvert
927
+ export_type : str
928
+ Export file format.
833
929
 
834
930
  request_options : typing.Optional[RequestOptions]
835
931
  Request-specific configuration.
@@ -841,7 +937,6 @@ class AsyncExportsClient:
841
937
 
842
938
  Examples
843
939
  --------
844
- from label_studio_sdk import ExportConvert
845
940
  from label_studio_sdk.client import AsyncLabelStudio
846
941
 
847
942
  client = AsyncLabelStudio(
@@ -850,15 +945,13 @@ class AsyncExportsClient:
850
945
  await client.projects.exports.convert(
851
946
  id=1,
852
947
  export_pk="export_pk",
853
- request=ExportConvert(
854
- export_type="export_type",
855
- ),
948
+ export_type="export_type",
856
949
  )
857
950
  """
858
951
  _response = await self._client_wrapper.httpx_client.request(
859
952
  f"api/projects/{jsonable_encoder(id)}/exports/{jsonable_encoder(export_pk)}/convert",
860
953
  method="POST",
861
- json=request,
954
+ json={"export_type": export_type},
862
955
  request_options=request_options,
863
956
  omit=OMIT,
864
957
  )
@@ -0,0 +1,21 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .types import (
4
+ PromptsBatchFailedPredictionsRequestFailedPredictionsItem,
5
+ PromptsBatchFailedPredictionsResponse,
6
+ PromptsBatchPredictionsRequestResultsItem,
7
+ PromptsBatchPredictionsResponse,
8
+ )
9
+ from . import indicators, runs, versions
10
+ from .runs import RunsListRequestProjectSubset
11
+
12
+ __all__ = [
13
+ "PromptsBatchFailedPredictionsRequestFailedPredictionsItem",
14
+ "PromptsBatchFailedPredictionsResponse",
15
+ "PromptsBatchPredictionsRequestResultsItem",
16
+ "PromptsBatchPredictionsResponse",
17
+ "RunsListRequestProjectSubset",
18
+ "indicators",
19
+ "runs",
20
+ "versions",
21
+ ]