label-studio-sdk 0.0.34__py3-none-any.whl → 1.0.1__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 (272) hide show
  1. label_studio_sdk/__init__.py +232 -9
  2. label_studio_sdk/_extensions/label_studio_tools/__init__.py +0 -0
  3. label_studio_sdk/_extensions/label_studio_tools/core/__init__.py +0 -0
  4. label_studio_sdk/_extensions/label_studio_tools/core/label_config.py +163 -0
  5. label_studio_sdk/_extensions/label_studio_tools/core/utils/__init__.py +0 -0
  6. label_studio_sdk/_extensions/label_studio_tools/core/utils/exceptions.py +2 -0
  7. label_studio_sdk/_extensions/label_studio_tools/core/utils/io.py +228 -0
  8. label_studio_sdk/_extensions/label_studio_tools/core/utils/params.py +45 -0
  9. label_studio_sdk/_extensions/label_studio_tools/etl/__init__.py +1 -0
  10. label_studio_sdk/_extensions/label_studio_tools/etl/beam.py +34 -0
  11. label_studio_sdk/_extensions/label_studio_tools/etl/example.py +17 -0
  12. label_studio_sdk/_extensions/label_studio_tools/etl/registry.py +67 -0
  13. label_studio_sdk/_extensions/label_studio_tools/postprocessing/__init__.py +0 -0
  14. label_studio_sdk/_extensions/label_studio_tools/postprocessing/video.py +97 -0
  15. label_studio_sdk/_extensions/pager_ext.py +49 -0
  16. label_studio_sdk/_legacy/__init__.py +11 -0
  17. label_studio_sdk/_legacy/client.py +471 -0
  18. label_studio_sdk/_legacy/objects.py +74 -0
  19. label_studio_sdk/{project.py → _legacy/project.py} +2 -2
  20. label_studio_sdk/{schema → _legacy/schema}/label_config_schema.json +14 -14
  21. label_studio_sdk/actions/__init__.py +27 -0
  22. label_studio_sdk/actions/client.py +223 -0
  23. label_studio_sdk/actions/types/__init__.py +25 -0
  24. label_studio_sdk/actions/types/actions_create_request_filters.py +43 -0
  25. label_studio_sdk/actions/types/actions_create_request_filters_conjunction.py +5 -0
  26. label_studio_sdk/actions/types/actions_create_request_filters_items_item.py +49 -0
  27. label_studio_sdk/actions/types/actions_create_request_filters_items_item_filter.py +31 -0
  28. label_studio_sdk/actions/types/actions_create_request_filters_items_item_operator.py +23 -0
  29. label_studio_sdk/actions/types/actions_create_request_id.py +19 -0
  30. label_studio_sdk/actions/types/actions_create_request_ordering_item.py +31 -0
  31. label_studio_sdk/actions/types/actions_create_request_selected_items.py +10 -0
  32. label_studio_sdk/actions/types/actions_create_request_selected_items_excluded.py +39 -0
  33. label_studio_sdk/actions/types/actions_create_request_selected_items_included.py +39 -0
  34. label_studio_sdk/annotations/__init__.py +2 -0
  35. label_studio_sdk/annotations/client.py +750 -0
  36. label_studio_sdk/base_client.py +183 -0
  37. label_studio_sdk/client.py +17 -463
  38. label_studio_sdk/converter/__init__.py +7 -0
  39. label_studio_sdk/converter/audio.py +56 -0
  40. label_studio_sdk/converter/brush.py +452 -0
  41. label_studio_sdk/converter/converter.py +1175 -0
  42. label_studio_sdk/converter/exports/__init__.py +0 -0
  43. label_studio_sdk/converter/exports/csv.py +82 -0
  44. label_studio_sdk/converter/exports/csv2.py +103 -0
  45. label_studio_sdk/converter/funsd.py +85 -0
  46. label_studio_sdk/converter/imports/__init__.py +0 -0
  47. label_studio_sdk/converter/imports/coco.py +314 -0
  48. label_studio_sdk/converter/imports/colors.py +198 -0
  49. label_studio_sdk/converter/imports/label_config.py +45 -0
  50. label_studio_sdk/converter/imports/pathtrack.py +269 -0
  51. label_studio_sdk/converter/imports/yolo.py +236 -0
  52. label_studio_sdk/converter/main.py +202 -0
  53. label_studio_sdk/converter/utils.py +473 -0
  54. label_studio_sdk/core/__init__.py +33 -0
  55. label_studio_sdk/core/api_error.py +15 -0
  56. label_studio_sdk/core/client_wrapper.py +55 -0
  57. label_studio_sdk/core/datetime_utils.py +28 -0
  58. label_studio_sdk/core/file.py +38 -0
  59. label_studio_sdk/core/http_client.py +447 -0
  60. label_studio_sdk/core/jsonable_encoder.py +99 -0
  61. label_studio_sdk/core/pagination.py +87 -0
  62. label_studio_sdk/core/pydantic_utilities.py +28 -0
  63. label_studio_sdk/core/query_encoder.py +33 -0
  64. label_studio_sdk/core/remove_none_from_dict.py +11 -0
  65. label_studio_sdk/core/request_options.py +32 -0
  66. label_studio_sdk/environment.py +7 -0
  67. label_studio_sdk/errors/__init__.py +6 -0
  68. label_studio_sdk/errors/bad_request_error.py +8 -0
  69. label_studio_sdk/errors/internal_server_error.py +8 -0
  70. label_studio_sdk/export_storage/__init__.py +28 -0
  71. label_studio_sdk/export_storage/azure/__init__.py +5 -0
  72. label_studio_sdk/export_storage/azure/client.py +888 -0
  73. label_studio_sdk/export_storage/azure/types/__init__.py +6 -0
  74. label_studio_sdk/export_storage/azure/types/azure_create_response.py +67 -0
  75. label_studio_sdk/export_storage/azure/types/azure_update_response.py +67 -0
  76. label_studio_sdk/export_storage/client.py +107 -0
  77. label_studio_sdk/export_storage/gcs/__init__.py +5 -0
  78. label_studio_sdk/export_storage/gcs/client.py +888 -0
  79. label_studio_sdk/export_storage/gcs/types/__init__.py +6 -0
  80. label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +67 -0
  81. label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +67 -0
  82. label_studio_sdk/export_storage/local/__init__.py +5 -0
  83. label_studio_sdk/export_storage/local/client.py +834 -0
  84. label_studio_sdk/export_storage/local/types/__init__.py +6 -0
  85. label_studio_sdk/export_storage/local/types/local_create_response.py +57 -0
  86. label_studio_sdk/export_storage/local/types/local_update_response.py +57 -0
  87. label_studio_sdk/export_storage/redis/__init__.py +5 -0
  88. label_studio_sdk/export_storage/redis/client.py +918 -0
  89. label_studio_sdk/export_storage/redis/types/__init__.py +6 -0
  90. label_studio_sdk/export_storage/redis/types/redis_create_response.py +72 -0
  91. label_studio_sdk/export_storage/redis/types/redis_update_response.py +72 -0
  92. label_studio_sdk/export_storage/s3/__init__.py +5 -0
  93. label_studio_sdk/export_storage/s3/client.py +1008 -0
  94. label_studio_sdk/export_storage/s3/types/__init__.py +6 -0
  95. label_studio_sdk/export_storage/s3/types/s3create_response.py +89 -0
  96. label_studio_sdk/export_storage/s3/types/s3update_response.py +89 -0
  97. label_studio_sdk/export_storage/types/__init__.py +5 -0
  98. label_studio_sdk/export_storage/types/export_storage_list_types_response_item.py +30 -0
  99. label_studio_sdk/files/__init__.py +2 -0
  100. label_studio_sdk/files/client.py +556 -0
  101. label_studio_sdk/import_storage/__init__.py +28 -0
  102. label_studio_sdk/import_storage/azure/__init__.py +5 -0
  103. label_studio_sdk/import_storage/azure/client.py +988 -0
  104. label_studio_sdk/import_storage/azure/types/__init__.py +6 -0
  105. label_studio_sdk/import_storage/azure/types/azure_create_response.py +82 -0
  106. label_studio_sdk/import_storage/azure/types/azure_update_response.py +82 -0
  107. label_studio_sdk/import_storage/client.py +107 -0
  108. label_studio_sdk/import_storage/gcs/__init__.py +5 -0
  109. label_studio_sdk/import_storage/gcs/client.py +988 -0
  110. label_studio_sdk/import_storage/gcs/types/__init__.py +6 -0
  111. label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +82 -0
  112. label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +82 -0
  113. label_studio_sdk/import_storage/local/__init__.py +5 -0
  114. label_studio_sdk/import_storage/local/client.py +836 -0
  115. label_studio_sdk/import_storage/local/types/__init__.py +6 -0
  116. label_studio_sdk/import_storage/local/types/local_create_response.py +57 -0
  117. label_studio_sdk/import_storage/local/types/local_update_response.py +57 -0
  118. label_studio_sdk/import_storage/redis/__init__.py +5 -0
  119. label_studio_sdk/import_storage/redis/client.py +924 -0
  120. label_studio_sdk/import_storage/redis/types/__init__.py +6 -0
  121. label_studio_sdk/import_storage/redis/types/redis_create_response.py +72 -0
  122. label_studio_sdk/import_storage/redis/types/redis_update_response.py +72 -0
  123. label_studio_sdk/import_storage/s3/__init__.py +5 -0
  124. label_studio_sdk/import_storage/s3/client.py +1138 -0
  125. label_studio_sdk/import_storage/s3/types/__init__.py +6 -0
  126. label_studio_sdk/import_storage/s3/types/s3create_response.py +109 -0
  127. label_studio_sdk/import_storage/s3/types/s3update_response.py +109 -0
  128. label_studio_sdk/import_storage/types/__init__.py +5 -0
  129. label_studio_sdk/import_storage/types/import_storage_list_types_response_item.py +30 -0
  130. label_studio_sdk/label_interface/base.py +10 -0
  131. label_studio_sdk/label_interface/control_tags.py +109 -71
  132. label_studio_sdk/label_interface/data_examples.json +96 -0
  133. label_studio_sdk/label_interface/interface.py +102 -53
  134. label_studio_sdk/label_interface/object_tags.py +8 -13
  135. label_studio_sdk/label_interface/region.py +33 -1
  136. label_studio_sdk/ml/__init__.py +19 -0
  137. label_studio_sdk/ml/client.py +981 -0
  138. label_studio_sdk/ml/types/__init__.py +17 -0
  139. label_studio_sdk/ml/types/ml_create_request_auth_method.py +5 -0
  140. label_studio_sdk/ml/types/ml_create_response.py +78 -0
  141. label_studio_sdk/ml/types/ml_create_response_auth_method.py +5 -0
  142. label_studio_sdk/ml/types/ml_update_request_auth_method.py +5 -0
  143. label_studio_sdk/ml/types/ml_update_response.py +78 -0
  144. label_studio_sdk/ml/types/ml_update_response_auth_method.py +5 -0
  145. label_studio_sdk/predictions/__init__.py +2 -0
  146. label_studio_sdk/predictions/client.py +638 -0
  147. label_studio_sdk/projects/__init__.py +6 -0
  148. label_studio_sdk/projects/client.py +1055 -0
  149. label_studio_sdk/projects/client_ext.py +19 -0
  150. label_studio_sdk/projects/exports/__init__.py +2 -0
  151. label_studio_sdk/projects/exports/client.py +930 -0
  152. label_studio_sdk/projects/types/__init__.py +7 -0
  153. label_studio_sdk/projects/types/projects_create_response.py +96 -0
  154. label_studio_sdk/projects/types/projects_import_tasks_response.py +71 -0
  155. label_studio_sdk/projects/types/projects_list_response.py +33 -0
  156. label_studio_sdk/py.typed +0 -0
  157. label_studio_sdk/tasks/__init__.py +5 -0
  158. label_studio_sdk/tasks/client.py +835 -0
  159. label_studio_sdk/tasks/client_ext.py +18 -0
  160. label_studio_sdk/tasks/types/__init__.py +6 -0
  161. label_studio_sdk/tasks/types/tasks_list_request_fields.py +5 -0
  162. label_studio_sdk/tasks/types/tasks_list_response.py +48 -0
  163. label_studio_sdk/types/__init__.py +115 -0
  164. label_studio_sdk/types/annotation.py +116 -0
  165. label_studio_sdk/types/annotation_filter_options.py +42 -0
  166. label_studio_sdk/types/annotation_last_action.py +19 -0
  167. label_studio_sdk/types/azure_blob_export_storage.py +112 -0
  168. label_studio_sdk/types/azure_blob_export_storage_status.py +7 -0
  169. label_studio_sdk/types/azure_blob_import_storage.py +113 -0
  170. label_studio_sdk/types/azure_blob_import_storage_status.py +7 -0
  171. label_studio_sdk/types/base_task.py +113 -0
  172. label_studio_sdk/types/base_user.py +42 -0
  173. label_studio_sdk/types/converted_format.py +36 -0
  174. label_studio_sdk/types/converted_format_status.py +5 -0
  175. label_studio_sdk/types/export.py +48 -0
  176. label_studio_sdk/types/export_convert.py +32 -0
  177. label_studio_sdk/types/export_create.py +54 -0
  178. label_studio_sdk/types/export_create_status.py +5 -0
  179. label_studio_sdk/types/export_status.py +5 -0
  180. label_studio_sdk/types/file_upload.py +30 -0
  181. label_studio_sdk/types/filter.py +53 -0
  182. label_studio_sdk/types/filter_group.py +35 -0
  183. label_studio_sdk/types/gcs_export_storage.py +112 -0
  184. label_studio_sdk/types/gcs_export_storage_status.py +7 -0
  185. label_studio_sdk/types/gcs_import_storage.py +113 -0
  186. label_studio_sdk/types/gcs_import_storage_status.py +7 -0
  187. label_studio_sdk/types/local_files_export_storage.py +97 -0
  188. label_studio_sdk/types/local_files_export_storage_status.py +7 -0
  189. label_studio_sdk/types/local_files_import_storage.py +92 -0
  190. label_studio_sdk/types/local_files_import_storage_status.py +7 -0
  191. label_studio_sdk/types/ml_backend.py +89 -0
  192. label_studio_sdk/types/ml_backend_auth_method.py +5 -0
  193. label_studio_sdk/types/ml_backend_state.py +5 -0
  194. label_studio_sdk/types/prediction.py +78 -0
  195. label_studio_sdk/types/project.py +198 -0
  196. label_studio_sdk/types/project_import.py +63 -0
  197. label_studio_sdk/types/project_import_status.py +5 -0
  198. label_studio_sdk/types/project_label_config.py +32 -0
  199. label_studio_sdk/types/project_sampling.py +7 -0
  200. label_studio_sdk/types/project_skip_queue.py +5 -0
  201. label_studio_sdk/types/redis_export_storage.py +117 -0
  202. label_studio_sdk/types/redis_export_storage_status.py +7 -0
  203. label_studio_sdk/types/redis_import_storage.py +112 -0
  204. label_studio_sdk/types/redis_import_storage_status.py +7 -0
  205. label_studio_sdk/types/s3export_storage.py +134 -0
  206. label_studio_sdk/types/s3export_storage_status.py +7 -0
  207. label_studio_sdk/types/s3import_storage.py +140 -0
  208. label_studio_sdk/types/s3import_storage_status.py +7 -0
  209. label_studio_sdk/types/serialization_option.py +36 -0
  210. label_studio_sdk/types/serialization_options.py +45 -0
  211. label_studio_sdk/types/task.py +157 -0
  212. label_studio_sdk/types/task_filter_options.py +49 -0
  213. label_studio_sdk/types/user_simple.py +37 -0
  214. label_studio_sdk/types/view.py +55 -0
  215. label_studio_sdk/types/webhook.py +67 -0
  216. label_studio_sdk/types/webhook_actions_item.py +21 -0
  217. label_studio_sdk/types/webhook_serializer_for_update.py +67 -0
  218. label_studio_sdk/types/webhook_serializer_for_update_actions_item.py +21 -0
  219. label_studio_sdk/users/__init__.py +5 -0
  220. label_studio_sdk/users/client.py +830 -0
  221. label_studio_sdk/users/types/__init__.py +6 -0
  222. label_studio_sdk/users/types/users_get_token_response.py +36 -0
  223. label_studio_sdk/users/types/users_reset_token_response.py +36 -0
  224. label_studio_sdk/version.py +4 -0
  225. label_studio_sdk/views/__init__.py +35 -0
  226. label_studio_sdk/views/client.py +564 -0
  227. label_studio_sdk/views/types/__init__.py +33 -0
  228. label_studio_sdk/views/types/views_create_request_data.py +43 -0
  229. label_studio_sdk/views/types/views_create_request_data_filters.py +43 -0
  230. label_studio_sdk/views/types/views_create_request_data_filters_conjunction.py +5 -0
  231. label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +49 -0
  232. label_studio_sdk/views/types/views_create_request_data_filters_items_item_filter.py +31 -0
  233. label_studio_sdk/views/types/views_create_request_data_filters_items_item_operator.py +23 -0
  234. label_studio_sdk/views/types/views_create_request_data_ordering_item.py +31 -0
  235. label_studio_sdk/views/types/views_update_request_data.py +43 -0
  236. label_studio_sdk/views/types/views_update_request_data_filters.py +43 -0
  237. label_studio_sdk/views/types/views_update_request_data_filters_conjunction.py +5 -0
  238. label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +49 -0
  239. label_studio_sdk/views/types/views_update_request_data_filters_items_item_filter.py +31 -0
  240. label_studio_sdk/views/types/views_update_request_data_filters_items_item_operator.py +23 -0
  241. label_studio_sdk/views/types/views_update_request_data_ordering_item.py +31 -0
  242. label_studio_sdk/webhooks/__init__.py +5 -0
  243. label_studio_sdk/webhooks/client.py +636 -0
  244. label_studio_sdk/webhooks/types/__init__.py +5 -0
  245. label_studio_sdk/webhooks/types/webhooks_update_request_actions_item.py +21 -0
  246. label_studio_sdk-1.0.1.dist-info/METADATA +163 -0
  247. label_studio_sdk-1.0.1.dist-info/RECORD +256 -0
  248. {label_studio_sdk-0.0.34.dist-info → label_studio_sdk-1.0.1.dist-info}/WHEEL +1 -2
  249. label_studio_sdk/objects.py +0 -35
  250. label_studio_sdk-0.0.34.dist-info/LICENSE +0 -201
  251. label_studio_sdk-0.0.34.dist-info/METADATA +0 -24
  252. label_studio_sdk-0.0.34.dist-info/RECORD +0 -37
  253. label_studio_sdk-0.0.34.dist-info/top_level.txt +0 -2
  254. tests/test_client.py +0 -37
  255. tests/test_export.py +0 -105
  256. tests/test_interface/__init__.py +0 -1
  257. tests/test_interface/configs.py +0 -137
  258. tests/test_interface/mockups.py +0 -22
  259. tests/test_interface/test_compat.py +0 -64
  260. tests/test_interface/test_control_tags.py +0 -55
  261. tests/test_interface/test_data_generation.py +0 -45
  262. tests/test_interface/test_lpi.py +0 -15
  263. tests/test_interface/test_main.py +0 -196
  264. tests/test_interface/test_object_tags.py +0 -36
  265. tests/test_interface/test_region.py +0 -36
  266. tests/test_interface/test_validate_summary.py +0 -35
  267. tests/test_interface/test_validation.py +0 -59
  268. {tests → label_studio_sdk/_extensions}/__init__.py +0 -0
  269. /label_studio_sdk/{exceptions.py → _legacy/exceptions.py} +0 -0
  270. /label_studio_sdk/{users.py → _legacy/users.py} +0 -0
  271. /label_studio_sdk/{utils.py → _legacy/utils.py} +0 -0
  272. /label_studio_sdk/{workspaces.py → _legacy/workspaces.py} +0 -0
@@ -0,0 +1,18 @@
1
+ from .client import TasksClient, AsyncTasksClient
2
+ from label_studio_sdk._extensions.pager_ext import SyncPagerExt, AsyncPagerExt, T
3
+
4
+
5
+ class TasksClientExt(TasksClient):
6
+
7
+ def list(self, **kwargs) -> SyncPagerExt[T]:
8
+ return SyncPagerExt.from_sync_pager(super().list(**kwargs))
9
+
10
+ list.__doc__ = TasksClient.list.__doc__
11
+
12
+
13
+ class AsyncTasksClientExt(AsyncTasksClient):
14
+
15
+ async def list(self, **kwargs):
16
+ return await AsyncPagerExt.from_async_pager(await super().list(**kwargs))
17
+
18
+ list.__doc__ = AsyncTasksClient.list.__doc__
@@ -0,0 +1,6 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .tasks_list_request_fields import TasksListRequestFields
4
+ from .tasks_list_response import TasksListResponse
5
+
6
+ __all__ = ["TasksListRequestFields", "TasksListResponse"]
@@ -0,0 +1,5 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ TasksListRequestFields = typing.Union[typing.Literal["all", "task_only"], typing.Any]
@@ -0,0 +1,48 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ...core.datetime_utils import serialize_datetime
7
+ from ...core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from ...types.task import Task
9
+
10
+
11
+ class TasksListResponse(pydantic_v1.BaseModel):
12
+ tasks: typing.Optional[typing.List[Task]] = pydantic_v1.Field(default=None)
13
+ """
14
+ List of tasks, each task contains predictions and annotations if `fields` query parameter is set to `all`
15
+ """
16
+
17
+ total: typing.Optional[int] = pydantic_v1.Field(default=None)
18
+ """
19
+ Total number of tasks
20
+ """
21
+
22
+ total_annotations: typing.Optional[int] = pydantic_v1.Field(default=None)
23
+ """
24
+ Total number of annotations
25
+ """
26
+
27
+ total_predictions: typing.Optional[int] = pydantic_v1.Field(default=None)
28
+ """
29
+ Total number of predictions
30
+ """
31
+
32
+ def json(self, **kwargs: typing.Any) -> str:
33
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
34
+ return super().json(**kwargs_with_defaults)
35
+
36
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
37
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
38
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
39
+
40
+ return deep_union_pydantic_dicts(
41
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
42
+ )
43
+
44
+ class Config:
45
+ frozen = True
46
+ smart_union = True
47
+ extra = pydantic_v1.Extra.allow
48
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,115 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ from .annotation import Annotation
4
+ from .annotation_filter_options import AnnotationFilterOptions
5
+ from .annotation_last_action import AnnotationLastAction
6
+ from .azure_blob_export_storage import AzureBlobExportStorage
7
+ from .azure_blob_export_storage_status import AzureBlobExportStorageStatus
8
+ from .azure_blob_import_storage import AzureBlobImportStorage
9
+ from .azure_blob_import_storage_status import AzureBlobImportStorageStatus
10
+ from .base_task import BaseTask
11
+ from .base_user import BaseUser
12
+ from .converted_format import ConvertedFormat
13
+ from .converted_format_status import ConvertedFormatStatus
14
+ from .export import Export
15
+ from .export_convert import ExportConvert
16
+ from .export_create import ExportCreate
17
+ from .export_create_status import ExportCreateStatus
18
+ from .export_status import ExportStatus
19
+ from .file_upload import FileUpload
20
+ from .filter import Filter
21
+ from .filter_group import FilterGroup
22
+ from .gcs_export_storage import GcsExportStorage
23
+ from .gcs_export_storage_status import GcsExportStorageStatus
24
+ from .gcs_import_storage import GcsImportStorage
25
+ from .gcs_import_storage_status import GcsImportStorageStatus
26
+ from .local_files_export_storage import LocalFilesExportStorage
27
+ from .local_files_export_storage_status import LocalFilesExportStorageStatus
28
+ from .local_files_import_storage import LocalFilesImportStorage
29
+ from .local_files_import_storage_status import LocalFilesImportStorageStatus
30
+ from .ml_backend import MlBackend
31
+ from .ml_backend_auth_method import MlBackendAuthMethod
32
+ from .ml_backend_state import MlBackendState
33
+ from .prediction import Prediction
34
+ from .project import Project
35
+ from .project_import import ProjectImport
36
+ from .project_import_status import ProjectImportStatus
37
+ from .project_label_config import ProjectLabelConfig
38
+ from .project_sampling import ProjectSampling
39
+ from .project_skip_queue import ProjectSkipQueue
40
+ from .redis_export_storage import RedisExportStorage
41
+ from .redis_export_storage_status import RedisExportStorageStatus
42
+ from .redis_import_storage import RedisImportStorage
43
+ from .redis_import_storage_status import RedisImportStorageStatus
44
+ from .s3export_storage import S3ExportStorage
45
+ from .s3export_storage_status import S3ExportStorageStatus
46
+ from .s3import_storage import S3ImportStorage
47
+ from .s3import_storage_status import S3ImportStorageStatus
48
+ from .serialization_option import SerializationOption
49
+ from .serialization_options import SerializationOptions
50
+ from .task import Task
51
+ from .task_filter_options import TaskFilterOptions
52
+ from .user_simple import UserSimple
53
+ from .view import View
54
+ from .webhook import Webhook
55
+ from .webhook_actions_item import WebhookActionsItem
56
+ from .webhook_serializer_for_update import WebhookSerializerForUpdate
57
+ from .webhook_serializer_for_update_actions_item import WebhookSerializerForUpdateActionsItem
58
+
59
+ __all__ = [
60
+ "Annotation",
61
+ "AnnotationFilterOptions",
62
+ "AnnotationLastAction",
63
+ "AzureBlobExportStorage",
64
+ "AzureBlobExportStorageStatus",
65
+ "AzureBlobImportStorage",
66
+ "AzureBlobImportStorageStatus",
67
+ "BaseTask",
68
+ "BaseUser",
69
+ "ConvertedFormat",
70
+ "ConvertedFormatStatus",
71
+ "Export",
72
+ "ExportConvert",
73
+ "ExportCreate",
74
+ "ExportCreateStatus",
75
+ "ExportStatus",
76
+ "FileUpload",
77
+ "Filter",
78
+ "FilterGroup",
79
+ "GcsExportStorage",
80
+ "GcsExportStorageStatus",
81
+ "GcsImportStorage",
82
+ "GcsImportStorageStatus",
83
+ "LocalFilesExportStorage",
84
+ "LocalFilesExportStorageStatus",
85
+ "LocalFilesImportStorage",
86
+ "LocalFilesImportStorageStatus",
87
+ "MlBackend",
88
+ "MlBackendAuthMethod",
89
+ "MlBackendState",
90
+ "Prediction",
91
+ "Project",
92
+ "ProjectImport",
93
+ "ProjectImportStatus",
94
+ "ProjectLabelConfig",
95
+ "ProjectSampling",
96
+ "ProjectSkipQueue",
97
+ "RedisExportStorage",
98
+ "RedisExportStorageStatus",
99
+ "RedisImportStorage",
100
+ "RedisImportStorageStatus",
101
+ "S3ExportStorage",
102
+ "S3ExportStorageStatus",
103
+ "S3ImportStorage",
104
+ "S3ImportStorageStatus",
105
+ "SerializationOption",
106
+ "SerializationOptions",
107
+ "Task",
108
+ "TaskFilterOptions",
109
+ "UserSimple",
110
+ "View",
111
+ "Webhook",
112
+ "WebhookActionsItem",
113
+ "WebhookSerializerForUpdate",
114
+ "WebhookSerializerForUpdateActionsItem",
115
+ ]
@@ -0,0 +1,116 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .annotation_last_action import AnnotationLastAction
9
+
10
+
11
+ class Annotation(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ result: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field(default=None)
14
+ """
15
+ List of annotation results for the task
16
+ """
17
+
18
+ created_username: typing.Optional[str] = pydantic_v1.Field(default=None)
19
+ """
20
+ Username string
21
+ """
22
+
23
+ created_ago: typing.Optional[str] = pydantic_v1.Field(default=None)
24
+ """
25
+ Time delta from creation time
26
+ """
27
+
28
+ completed_by: typing.Optional[int] = None
29
+ unique_id: typing.Optional[str] = None
30
+ was_cancelled: typing.Optional[bool] = pydantic_v1.Field(default=None)
31
+ """
32
+ User skipped the task
33
+ """
34
+
35
+ ground_truth: typing.Optional[bool] = pydantic_v1.Field(default=None)
36
+ """
37
+ This annotation is a Ground Truth (ground_truth)
38
+ """
39
+
40
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
41
+ """
42
+ Creation time
43
+ """
44
+
45
+ updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
46
+ """
47
+ Last updated time
48
+ """
49
+
50
+ draft_created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
51
+ """
52
+ Draft creation time
53
+ """
54
+
55
+ lead_time: typing.Optional[float] = pydantic_v1.Field(default=None)
56
+ """
57
+ How much time it took to annotate the task
58
+ """
59
+
60
+ import_id: typing.Optional[int] = pydantic_v1.Field(default=None)
61
+ """
62
+ Original annotation ID that was at the import step or NULL if this annotation wasn't imported
63
+ """
64
+
65
+ last_action: typing.Optional[AnnotationLastAction] = pydantic_v1.Field(default=None)
66
+ """
67
+ Action which was performed in the last annotation history item
68
+ """
69
+
70
+ task: typing.Optional[int] = pydantic_v1.Field(default=None)
71
+ """
72
+ Corresponding task for this annotation
73
+ """
74
+
75
+ project: typing.Optional[int] = pydantic_v1.Field(default=None)
76
+ """
77
+ Project ID for this annotation
78
+ """
79
+
80
+ updated_by: typing.Optional[int] = pydantic_v1.Field(default=None)
81
+ """
82
+ Last user who updated this annotation
83
+ """
84
+
85
+ parent_prediction: typing.Optional[int] = pydantic_v1.Field(default=None)
86
+ """
87
+ Points to the prediction from which this annotation was created
88
+ """
89
+
90
+ parent_annotation: typing.Optional[int] = pydantic_v1.Field(default=None)
91
+ """
92
+ Points to the parent annotation from which this annotation was created
93
+ """
94
+
95
+ last_created_by: typing.Optional[int] = pydantic_v1.Field(default=None)
96
+ """
97
+ User who created the last annotation history item
98
+ """
99
+
100
+ def json(self, **kwargs: typing.Any) -> str:
101
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
102
+ return super().json(**kwargs_with_defaults)
103
+
104
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
105
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
106
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
107
+
108
+ return deep_union_pydantic_dicts(
109
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
110
+ )
111
+
112
+ class Config:
113
+ frozen = True
114
+ smart_union = True
115
+ extra = pydantic_v1.Extra.allow
116
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,42 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+
9
+
10
+ class AnnotationFilterOptions(pydantic_v1.BaseModel):
11
+ usual: typing.Optional[bool] = pydantic_v1.Field(default=None)
12
+ """
13
+ Include not skipped and not ground truth annotations
14
+ """
15
+
16
+ ground_truth: typing.Optional[bool] = pydantic_v1.Field(default=None)
17
+ """
18
+ Include ground truth annotations
19
+ """
20
+
21
+ skipped: typing.Optional[bool] = pydantic_v1.Field(default=None)
22
+ """
23
+ Include skipped annotations
24
+ """
25
+
26
+ def json(self, **kwargs: typing.Any) -> str:
27
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
28
+ return super().json(**kwargs_with_defaults)
29
+
30
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
31
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
32
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
33
+
34
+ return deep_union_pydantic_dicts(
35
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
36
+ )
37
+
38
+ class Config:
39
+ frozen = True
40
+ smart_union = True
41
+ extra = pydantic_v1.Extra.allow
42
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,19 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AnnotationLastAction = typing.Union[
6
+ typing.Literal[
7
+ "prediction",
8
+ "propagated_annotation",
9
+ "imported",
10
+ "submitted",
11
+ "updated",
12
+ "skipped",
13
+ "accepted",
14
+ "rejected",
15
+ "fixed_and_accepted",
16
+ "deleted_review",
17
+ ],
18
+ typing.Any,
19
+ ]
@@ -0,0 +1,112 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .azure_blob_export_storage_status import AzureBlobExportStorageStatus
9
+
10
+
11
+ class AzureBlobExportStorage(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ type: typing.Optional[str] = None
14
+ synchronizable: typing.Optional[bool] = None
15
+ container: typing.Optional[str] = pydantic_v1.Field(default=None)
16
+ """
17
+ Azure blob container
18
+ """
19
+
20
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
21
+ """
22
+ Azure blob prefix name
23
+ """
24
+
25
+ regex_filter: typing.Optional[str] = pydantic_v1.Field(default=None)
26
+ """
27
+ Cloud storage regex for filtering objects
28
+ """
29
+
30
+ use_blob_urls: typing.Optional[bool] = pydantic_v1.Field(default=None)
31
+ """
32
+ Interpret objects as BLOBs and generate URLs
33
+ """
34
+
35
+ account_name: typing.Optional[str] = pydantic_v1.Field(default=None)
36
+ """
37
+ Azure Blob account name
38
+ """
39
+
40
+ account_key: typing.Optional[str] = pydantic_v1.Field(default=None)
41
+ """
42
+ Azure Blob account key
43
+ """
44
+
45
+ last_sync: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
46
+ """
47
+ Last sync finished time
48
+ """
49
+
50
+ last_sync_count: typing.Optional[int] = pydantic_v1.Field(default=None)
51
+ """
52
+ Count of tasks synced last time
53
+ """
54
+
55
+ last_sync_job: typing.Optional[str] = pydantic_v1.Field(default=None)
56
+ """
57
+ Last sync job ID
58
+ """
59
+
60
+ status: typing.Optional[AzureBlobExportStorageStatus] = None
61
+ traceback: typing.Optional[str] = pydantic_v1.Field(default=None)
62
+ """
63
+ Traceback report for the last failed sync
64
+ """
65
+
66
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
67
+ """
68
+ Meta and debug information about storage processes
69
+ """
70
+
71
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
72
+ """
73
+ Cloud storage title
74
+ """
75
+
76
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
77
+ """
78
+ Cloud storage description
79
+ """
80
+
81
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
82
+ """
83
+ Creation time
84
+ """
85
+
86
+ can_delete_objects: typing.Optional[bool] = pydantic_v1.Field(default=None)
87
+ """
88
+ Deletion from storage enabled
89
+ """
90
+
91
+ project: int = pydantic_v1.Field()
92
+ """
93
+ A unique integer value identifying this project.
94
+ """
95
+
96
+ def json(self, **kwargs: typing.Any) -> str:
97
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
98
+ return super().json(**kwargs_with_defaults)
99
+
100
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
101
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
102
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
103
+
104
+ return deep_union_pydantic_dicts(
105
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
106
+ )
107
+
108
+ class Config:
109
+ frozen = True
110
+ smart_union = True
111
+ extra = pydantic_v1.Extra.allow
112
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AzureBlobExportStorageStatus = typing.Union[
6
+ typing.Literal["initialized", "queued", "in_progress", "failed", "completed"], typing.Any
7
+ ]
@@ -0,0 +1,113 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import datetime as dt
4
+ import typing
5
+
6
+ from ..core.datetime_utils import serialize_datetime
7
+ from ..core.pydantic_utilities import deep_union_pydantic_dicts, pydantic_v1
8
+ from .azure_blob_import_storage_status import AzureBlobImportStorageStatus
9
+
10
+
11
+ class AzureBlobImportStorage(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ type: typing.Optional[str] = None
14
+ synchronizable: typing.Optional[bool] = None
15
+ presign: typing.Optional[bool] = None
16
+ container: typing.Optional[str] = pydantic_v1.Field(default=None)
17
+ """
18
+ Azure blob container
19
+ """
20
+
21
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
22
+ """
23
+ Azure blob prefix name
24
+ """
25
+
26
+ regex_filter: typing.Optional[str] = pydantic_v1.Field(default=None)
27
+ """
28
+ Cloud storage regex for filtering objects
29
+ """
30
+
31
+ use_blob_urls: typing.Optional[bool] = pydantic_v1.Field(default=None)
32
+ """
33
+ Interpret objects as BLOBs and generate URLs
34
+ """
35
+
36
+ account_name: typing.Optional[str] = pydantic_v1.Field(default=None)
37
+ """
38
+ Azure Blob account name
39
+ """
40
+
41
+ account_key: typing.Optional[str] = pydantic_v1.Field(default=None)
42
+ """
43
+ Azure Blob account key
44
+ """
45
+
46
+ last_sync: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
47
+ """
48
+ Last sync finished time
49
+ """
50
+
51
+ last_sync_count: typing.Optional[int] = pydantic_v1.Field(default=None)
52
+ """
53
+ Count of tasks synced last time
54
+ """
55
+
56
+ last_sync_job: typing.Optional[str] = pydantic_v1.Field(default=None)
57
+ """
58
+ Last sync job ID
59
+ """
60
+
61
+ status: typing.Optional[AzureBlobImportStorageStatus] = None
62
+ traceback: typing.Optional[str] = pydantic_v1.Field(default=None)
63
+ """
64
+ Traceback report for the last failed sync
65
+ """
66
+
67
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
68
+ """
69
+ Meta and debug information about storage processes
70
+ """
71
+
72
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
73
+ """
74
+ Cloud storage title
75
+ """
76
+
77
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
78
+ """
79
+ Cloud storage description
80
+ """
81
+
82
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
83
+ """
84
+ Creation time
85
+ """
86
+
87
+ presign_ttl: typing.Optional[int] = pydantic_v1.Field(default=None)
88
+ """
89
+ Presigned URLs TTL (in minutes)
90
+ """
91
+
92
+ project: int = pydantic_v1.Field()
93
+ """
94
+ A unique integer value identifying this project.
95
+ """
96
+
97
+ def json(self, **kwargs: typing.Any) -> str:
98
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
99
+ return super().json(**kwargs_with_defaults)
100
+
101
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
102
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
103
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
104
+
105
+ return deep_union_pydantic_dicts(
106
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
107
+ )
108
+
109
+ class Config:
110
+ frozen = True
111
+ smart_union = True
112
+ extra = pydantic_v1.Extra.allow
113
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ AzureBlobImportStorageStatus = typing.Union[
6
+ typing.Literal["initialized", "queued", "in_progress", "failed", "completed"], typing.Any
7
+ ]