label-studio-sdk 0.0.32__py3-none-any.whl → 1.0.0__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.
Files changed (245) hide show
  1. label_studio_sdk/__init__.py +206 -6
  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/_legacy/__init__.py +11 -0
  16. label_studio_sdk/_legacy/client.py +471 -0
  17. label_studio_sdk/_legacy/exceptions.py +10 -0
  18. label_studio_sdk/_legacy/label_interface/__init__.py +1 -0
  19. label_studio_sdk/_legacy/label_interface/base.py +77 -0
  20. label_studio_sdk/_legacy/label_interface/control_tags.py +756 -0
  21. label_studio_sdk/_legacy/label_interface/data_examples.json +96 -0
  22. label_studio_sdk/_legacy/label_interface/interface.py +925 -0
  23. label_studio_sdk/_legacy/label_interface/label_tags.py +72 -0
  24. label_studio_sdk/_legacy/label_interface/object_tags.py +292 -0
  25. label_studio_sdk/_legacy/label_interface/region.py +43 -0
  26. label_studio_sdk/_legacy/objects.py +35 -0
  27. label_studio_sdk/{project.py → _legacy/project.py} +711 -258
  28. label_studio_sdk/_legacy/schema/label_config_schema.json +226 -0
  29. label_studio_sdk/{users.py → _legacy/users.py} +15 -13
  30. label_studio_sdk/{utils.py → _legacy/utils.py} +31 -30
  31. label_studio_sdk/{workspaces.py → _legacy/workspaces.py} +13 -11
  32. label_studio_sdk/actions/__init__.py +2 -0
  33. label_studio_sdk/actions/client.py +150 -0
  34. label_studio_sdk/annotations/__init__.py +2 -0
  35. label_studio_sdk/annotations/client.py +750 -0
  36. label_studio_sdk/client.py +164 -436
  37. label_studio_sdk/converter/__init__.py +7 -0
  38. label_studio_sdk/converter/audio.py +56 -0
  39. label_studio_sdk/converter/brush.py +452 -0
  40. label_studio_sdk/converter/converter.py +1175 -0
  41. label_studio_sdk/converter/exports/__init__.py +0 -0
  42. label_studio_sdk/converter/exports/csv.py +82 -0
  43. label_studio_sdk/converter/exports/csv2.py +103 -0
  44. label_studio_sdk/converter/funsd.py +85 -0
  45. label_studio_sdk/converter/imports/__init__.py +0 -0
  46. label_studio_sdk/converter/imports/coco.py +314 -0
  47. label_studio_sdk/converter/imports/colors.py +198 -0
  48. label_studio_sdk/converter/imports/label_config.py +45 -0
  49. label_studio_sdk/converter/imports/pathtrack.py +269 -0
  50. label_studio_sdk/converter/imports/yolo.py +236 -0
  51. label_studio_sdk/converter/main.py +202 -0
  52. label_studio_sdk/converter/utils.py +473 -0
  53. label_studio_sdk/core/__init__.py +33 -0
  54. label_studio_sdk/core/api_error.py +15 -0
  55. label_studio_sdk/core/client_wrapper.py +55 -0
  56. label_studio_sdk/core/datetime_utils.py +28 -0
  57. label_studio_sdk/core/file.py +38 -0
  58. label_studio_sdk/core/http_client.py +443 -0
  59. label_studio_sdk/core/jsonable_encoder.py +99 -0
  60. label_studio_sdk/core/pagination.py +87 -0
  61. label_studio_sdk/core/pydantic_utilities.py +28 -0
  62. label_studio_sdk/core/query_encoder.py +33 -0
  63. label_studio_sdk/core/remove_none_from_dict.py +11 -0
  64. label_studio_sdk/core/request_options.py +32 -0
  65. label_studio_sdk/data_manager.py +32 -23
  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 +722 -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 +52 -0
  75. label_studio_sdk/export_storage/azure/types/azure_update_response.py +52 -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 +722 -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 +52 -0
  81. label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +52 -0
  82. label_studio_sdk/export_storage/local/__init__.py +5 -0
  83. label_studio_sdk/export_storage/local/client.py +688 -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 +47 -0
  86. label_studio_sdk/export_storage/local/types/local_update_response.py +47 -0
  87. label_studio_sdk/export_storage/redis/__init__.py +5 -0
  88. label_studio_sdk/export_storage/redis/client.py +714 -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 +57 -0
  91. label_studio_sdk/export_storage/redis/types/redis_update_response.py +57 -0
  92. label_studio_sdk/export_storage/s3/__init__.py +5 -0
  93. label_studio_sdk/export_storage/s3/client.py +820 -0
  94. label_studio_sdk/export_storage/s3/types/__init__.py +6 -0
  95. label_studio_sdk/export_storage/s3/types/s3create_response.py +74 -0
  96. label_studio_sdk/export_storage/s3/types/s3update_response.py +74 -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 +812 -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 +72 -0
  106. label_studio_sdk/import_storage/azure/types/azure_update_response.py +72 -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 +812 -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 +72 -0
  112. label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +72 -0
  113. label_studio_sdk/import_storage/local/__init__.py +5 -0
  114. label_studio_sdk/import_storage/local/client.py +690 -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 +47 -0
  117. label_studio_sdk/import_storage/local/types/local_update_response.py +47 -0
  118. label_studio_sdk/import_storage/redis/__init__.py +5 -0
  119. label_studio_sdk/import_storage/redis/client.py +768 -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 +62 -0
  122. label_studio_sdk/import_storage/redis/types/redis_update_response.py +62 -0
  123. label_studio_sdk/import_storage/s3/__init__.py +5 -0
  124. label_studio_sdk/import_storage/s3/client.py +912 -0
  125. label_studio_sdk/import_storage/s3/types/__init__.py +6 -0
  126. label_studio_sdk/import_storage/s3/types/s3create_response.py +99 -0
  127. label_studio_sdk/import_storage/s3/types/s3update_response.py +99 -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/ml/__init__.py +19 -0
  131. label_studio_sdk/ml/client.py +981 -0
  132. label_studio_sdk/ml/types/__init__.py +17 -0
  133. label_studio_sdk/ml/types/ml_create_request_auth_method.py +5 -0
  134. label_studio_sdk/ml/types/ml_create_response.py +78 -0
  135. label_studio_sdk/ml/types/ml_create_response_auth_method.py +5 -0
  136. label_studio_sdk/ml/types/ml_update_request_auth_method.py +5 -0
  137. label_studio_sdk/ml/types/ml_update_response.py +78 -0
  138. label_studio_sdk/ml/types/ml_update_response_auth_method.py +5 -0
  139. label_studio_sdk/predictions/__init__.py +2 -0
  140. label_studio_sdk/predictions/client.py +638 -0
  141. label_studio_sdk/projects/__init__.py +6 -0
  142. label_studio_sdk/projects/client.py +1053 -0
  143. label_studio_sdk/projects/exports/__init__.py +2 -0
  144. label_studio_sdk/projects/exports/client.py +930 -0
  145. label_studio_sdk/projects/types/__init__.py +7 -0
  146. label_studio_sdk/projects/types/projects_create_response.py +96 -0
  147. label_studio_sdk/projects/types/projects_import_tasks_response.py +71 -0
  148. label_studio_sdk/projects/types/projects_list_response.py +33 -0
  149. label_studio_sdk/py.typed +0 -0
  150. label_studio_sdk/tasks/__init__.py +5 -0
  151. label_studio_sdk/tasks/client.py +811 -0
  152. label_studio_sdk/tasks/types/__init__.py +6 -0
  153. label_studio_sdk/tasks/types/tasks_list_request_fields.py +5 -0
  154. label_studio_sdk/tasks/types/tasks_list_response.py +48 -0
  155. label_studio_sdk/types/__init__.py +115 -0
  156. label_studio_sdk/types/annotation.py +116 -0
  157. label_studio_sdk/types/annotation_filter_options.py +42 -0
  158. label_studio_sdk/types/annotation_last_action.py +19 -0
  159. label_studio_sdk/types/azure_blob_export_storage.py +112 -0
  160. label_studio_sdk/types/azure_blob_export_storage_status.py +7 -0
  161. label_studio_sdk/types/azure_blob_import_storage.py +113 -0
  162. label_studio_sdk/types/azure_blob_import_storage_status.py +7 -0
  163. label_studio_sdk/types/base_task.py +113 -0
  164. label_studio_sdk/types/base_user.py +42 -0
  165. label_studio_sdk/types/converted_format.py +36 -0
  166. label_studio_sdk/types/converted_format_status.py +5 -0
  167. label_studio_sdk/types/export.py +48 -0
  168. label_studio_sdk/types/export_convert.py +32 -0
  169. label_studio_sdk/types/export_create.py +54 -0
  170. label_studio_sdk/types/export_create_status.py +5 -0
  171. label_studio_sdk/types/export_status.py +5 -0
  172. label_studio_sdk/types/file_upload.py +30 -0
  173. label_studio_sdk/types/filter.py +53 -0
  174. label_studio_sdk/types/filter_group.py +35 -0
  175. label_studio_sdk/types/gcs_export_storage.py +112 -0
  176. label_studio_sdk/types/gcs_export_storage_status.py +7 -0
  177. label_studio_sdk/types/gcs_import_storage.py +113 -0
  178. label_studio_sdk/types/gcs_import_storage_status.py +7 -0
  179. label_studio_sdk/types/local_files_export_storage.py +97 -0
  180. label_studio_sdk/types/local_files_export_storage_status.py +7 -0
  181. label_studio_sdk/types/local_files_import_storage.py +92 -0
  182. label_studio_sdk/types/local_files_import_storage_status.py +7 -0
  183. label_studio_sdk/types/ml_backend.py +89 -0
  184. label_studio_sdk/types/ml_backend_auth_method.py +5 -0
  185. label_studio_sdk/types/ml_backend_state.py +5 -0
  186. label_studio_sdk/types/prediction.py +78 -0
  187. label_studio_sdk/types/project.py +198 -0
  188. label_studio_sdk/types/project_import.py +63 -0
  189. label_studio_sdk/types/project_import_status.py +5 -0
  190. label_studio_sdk/types/project_label_config.py +32 -0
  191. label_studio_sdk/types/project_sampling.py +7 -0
  192. label_studio_sdk/types/project_skip_queue.py +5 -0
  193. label_studio_sdk/types/redis_export_storage.py +117 -0
  194. label_studio_sdk/types/redis_export_storage_status.py +7 -0
  195. label_studio_sdk/types/redis_import_storage.py +112 -0
  196. label_studio_sdk/types/redis_import_storage_status.py +7 -0
  197. label_studio_sdk/types/s3export_storage.py +134 -0
  198. label_studio_sdk/types/s3export_storage_status.py +7 -0
  199. label_studio_sdk/types/s3import_storage.py +140 -0
  200. label_studio_sdk/types/s3import_storage_status.py +7 -0
  201. label_studio_sdk/types/serialization_option.py +36 -0
  202. label_studio_sdk/types/serialization_options.py +45 -0
  203. label_studio_sdk/types/task.py +157 -0
  204. label_studio_sdk/types/task_filter_options.py +49 -0
  205. label_studio_sdk/types/user_simple.py +37 -0
  206. label_studio_sdk/types/view.py +55 -0
  207. label_studio_sdk/types/webhook.py +67 -0
  208. label_studio_sdk/types/webhook_actions_item.py +21 -0
  209. label_studio_sdk/types/webhook_serializer_for_update.py +67 -0
  210. label_studio_sdk/types/webhook_serializer_for_update_actions_item.py +21 -0
  211. label_studio_sdk/users/__init__.py +5 -0
  212. label_studio_sdk/users/client.py +830 -0
  213. label_studio_sdk/users/types/__init__.py +6 -0
  214. label_studio_sdk/users/types/users_get_token_response.py +36 -0
  215. label_studio_sdk/users/types/users_reset_token_response.py +36 -0
  216. label_studio_sdk/version.py +4 -0
  217. label_studio_sdk/views/__init__.py +31 -0
  218. label_studio_sdk/views/client.py +564 -0
  219. label_studio_sdk/views/types/__init__.py +29 -0
  220. label_studio_sdk/views/types/views_create_request_data.py +43 -0
  221. label_studio_sdk/views/types/views_create_request_data_filters.py +43 -0
  222. label_studio_sdk/views/types/views_create_request_data_filters_conjunction.py +5 -0
  223. label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +47 -0
  224. label_studio_sdk/views/types/views_create_request_data_ordering_item.py +38 -0
  225. label_studio_sdk/views/types/views_create_request_data_ordering_item_direction.py +5 -0
  226. label_studio_sdk/views/types/views_update_request_data.py +43 -0
  227. label_studio_sdk/views/types/views_update_request_data_filters.py +43 -0
  228. label_studio_sdk/views/types/views_update_request_data_filters_conjunction.py +5 -0
  229. label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +47 -0
  230. label_studio_sdk/views/types/views_update_request_data_ordering_item.py +38 -0
  231. label_studio_sdk/views/types/views_update_request_data_ordering_item_direction.py +5 -0
  232. label_studio_sdk/webhooks/__init__.py +5 -0
  233. label_studio_sdk/webhooks/client.py +636 -0
  234. label_studio_sdk/webhooks/types/__init__.py +5 -0
  235. label_studio_sdk/webhooks/types/webhooks_update_request_actions_item.py +21 -0
  236. label_studio_sdk-1.0.0.dist-info/METADATA +307 -0
  237. label_studio_sdk-1.0.0.dist-info/RECORD +239 -0
  238. {label_studio_sdk-0.0.32.dist-info → label_studio_sdk-1.0.0.dist-info}/WHEEL +1 -2
  239. docs/__init__.py +0 -3
  240. label_studio_sdk-0.0.32.dist-info/LICENSE +0 -201
  241. label_studio_sdk-0.0.32.dist-info/METADATA +0 -22
  242. label_studio_sdk-0.0.32.dist-info/RECORD +0 -15
  243. label_studio_sdk-0.0.32.dist-info/top_level.txt +0 -3
  244. tests/test_client.py +0 -26
  245. {tests → label_studio_sdk/_extensions}/__init__.py +0 -0
@@ -0,0 +1,134 @@
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 .s3export_storage_status import S3ExportStorageStatus
9
+
10
+
11
+ class S3ExportStorage(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ type: typing.Optional[str] = None
14
+ synchronizable: typing.Optional[bool] = None
15
+ last_sync: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
16
+ """
17
+ Last sync finished time
18
+ """
19
+
20
+ last_sync_count: typing.Optional[int] = pydantic_v1.Field(default=None)
21
+ """
22
+ Count of tasks synced last time
23
+ """
24
+
25
+ last_sync_job: typing.Optional[str] = pydantic_v1.Field(default=None)
26
+ """
27
+ Last sync job ID
28
+ """
29
+
30
+ status: typing.Optional[S3ExportStorageStatus] = None
31
+ traceback: typing.Optional[str] = pydantic_v1.Field(default=None)
32
+ """
33
+ Traceback report for the last failed sync
34
+ """
35
+
36
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
37
+ """
38
+ Meta and debug information about storage processes
39
+ """
40
+
41
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
42
+ """
43
+ Cloud storage title
44
+ """
45
+
46
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
47
+ """
48
+ Cloud storage description
49
+ """
50
+
51
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
52
+ """
53
+ Creation time
54
+ """
55
+
56
+ can_delete_objects: typing.Optional[bool] = pydantic_v1.Field(default=None)
57
+ """
58
+ Deletion from storage enabled
59
+ """
60
+
61
+ bucket: typing.Optional[str] = pydantic_v1.Field(default=None)
62
+ """
63
+ S3 bucket name
64
+ """
65
+
66
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
67
+ """
68
+ S3 bucket prefix
69
+ """
70
+
71
+ regex_filter: typing.Optional[str] = pydantic_v1.Field(default=None)
72
+ """
73
+ Cloud storage regex for filtering objects
74
+ """
75
+
76
+ use_blob_urls: typing.Optional[bool] = pydantic_v1.Field(default=None)
77
+ """
78
+ Interpret objects as BLOBs and generate URLs
79
+ """
80
+
81
+ aws_access_key_id: typing.Optional[str] = pydantic_v1.Field(default=None)
82
+ """
83
+ AWS_ACCESS_KEY_ID
84
+ """
85
+
86
+ aws_secret_access_key: typing.Optional[str] = pydantic_v1.Field(default=None)
87
+ """
88
+ AWS_SECRET_ACCESS_KEY
89
+ """
90
+
91
+ aws_session_token: typing.Optional[str] = pydantic_v1.Field(default=None)
92
+ """
93
+ AWS_SESSION_TOKEN
94
+ """
95
+
96
+ aws_sse_kms_key_id: typing.Optional[str] = pydantic_v1.Field(default=None)
97
+ """
98
+ AWS SSE KMS Key ID
99
+ """
100
+
101
+ region_name: typing.Optional[str] = pydantic_v1.Field(default=None)
102
+ """
103
+ AWS Region
104
+ """
105
+
106
+ s3endpoint: typing.Optional[str] = pydantic_v1.Field(alias="s3_endpoint", default=None)
107
+ """
108
+ S3 Endpoint
109
+ """
110
+
111
+ project: int = pydantic_v1.Field()
112
+ """
113
+ A unique integer value identifying this project.
114
+ """
115
+
116
+ def json(self, **kwargs: typing.Any) -> str:
117
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
118
+ return super().json(**kwargs_with_defaults)
119
+
120
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
121
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
122
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
123
+
124
+ return deep_union_pydantic_dicts(
125
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
126
+ )
127
+
128
+ class Config:
129
+ frozen = True
130
+ smart_union = True
131
+ allow_population_by_field_name = True
132
+ populate_by_name = True
133
+ extra = pydantic_v1.Extra.allow
134
+ 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
+ S3ExportStorageStatus = typing.Union[
6
+ typing.Literal["initialized", "queued", "in_progress", "failed", "completed"], typing.Any
7
+ ]
@@ -0,0 +1,140 @@
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 .s3import_storage_status import S3ImportStorageStatus
9
+
10
+
11
+ class S3ImportStorage(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
+ last_sync: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
17
+ """
18
+ Last sync finished time
19
+ """
20
+
21
+ last_sync_count: typing.Optional[int] = pydantic_v1.Field(default=None)
22
+ """
23
+ Count of tasks synced last time
24
+ """
25
+
26
+ last_sync_job: typing.Optional[str] = pydantic_v1.Field(default=None)
27
+ """
28
+ Last sync job ID
29
+ """
30
+
31
+ status: typing.Optional[S3ImportStorageStatus] = None
32
+ traceback: typing.Optional[str] = pydantic_v1.Field(default=None)
33
+ """
34
+ Traceback report for the last failed sync
35
+ """
36
+
37
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
38
+ """
39
+ Meta and debug information about storage processes
40
+ """
41
+
42
+ title: typing.Optional[str] = pydantic_v1.Field(default=None)
43
+ """
44
+ Cloud storage title
45
+ """
46
+
47
+ description: typing.Optional[str] = pydantic_v1.Field(default=None)
48
+ """
49
+ Cloud storage description
50
+ """
51
+
52
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
53
+ """
54
+ Creation time
55
+ """
56
+
57
+ bucket: typing.Optional[str] = pydantic_v1.Field(default=None)
58
+ """
59
+ S3 bucket name
60
+ """
61
+
62
+ prefix: typing.Optional[str] = pydantic_v1.Field(default=None)
63
+ """
64
+ S3 bucket prefix
65
+ """
66
+
67
+ regex_filter: typing.Optional[str] = pydantic_v1.Field(default=None)
68
+ """
69
+ Cloud storage regex for filtering objects
70
+ """
71
+
72
+ use_blob_urls: typing.Optional[bool] = pydantic_v1.Field(default=None)
73
+ """
74
+ Interpret objects as BLOBs and generate URLs
75
+ """
76
+
77
+ aws_access_key_id: typing.Optional[str] = pydantic_v1.Field(default=None)
78
+ """
79
+ AWS_ACCESS_KEY_ID
80
+ """
81
+
82
+ aws_secret_access_key: typing.Optional[str] = pydantic_v1.Field(default=None)
83
+ """
84
+ AWS_SECRET_ACCESS_KEY
85
+ """
86
+
87
+ aws_session_token: typing.Optional[str] = pydantic_v1.Field(default=None)
88
+ """
89
+ AWS_SESSION_TOKEN
90
+ """
91
+
92
+ aws_sse_kms_key_id: typing.Optional[str] = pydantic_v1.Field(default=None)
93
+ """
94
+ AWS SSE KMS Key ID
95
+ """
96
+
97
+ region_name: typing.Optional[str] = pydantic_v1.Field(default=None)
98
+ """
99
+ AWS Region
100
+ """
101
+
102
+ s3endpoint: typing.Optional[str] = pydantic_v1.Field(alias="s3_endpoint", default=None)
103
+ """
104
+ S3 Endpoint
105
+ """
106
+
107
+ presign_ttl: typing.Optional[int] = pydantic_v1.Field(default=None)
108
+ """
109
+ Presigned URLs TTL (in minutes)
110
+ """
111
+
112
+ recursive_scan: typing.Optional[bool] = pydantic_v1.Field(default=None)
113
+ """
114
+ Perform recursive scan over the bucket content
115
+ """
116
+
117
+ project: int = pydantic_v1.Field()
118
+ """
119
+ A unique integer value identifying this project.
120
+ """
121
+
122
+ def json(self, **kwargs: typing.Any) -> str:
123
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
124
+ return super().json(**kwargs_with_defaults)
125
+
126
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
127
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
128
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
129
+
130
+ return deep_union_pydantic_dicts(
131
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
132
+ )
133
+
134
+ class Config:
135
+ frozen = True
136
+ smart_union = True
137
+ allow_population_by_field_name = True
138
+ populate_by_name = True
139
+ extra = pydantic_v1.Extra.allow
140
+ 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
+ S3ImportStorageStatus = typing.Union[
6
+ typing.Literal["initialized", "queued", "in_progress", "failed", "completed"], typing.Any
7
+ ]
@@ -0,0 +1,36 @@
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 SerializationOption(pydantic_v1.BaseModel):
11
+ """
12
+ JSON dict with parameters
13
+ """
14
+
15
+ only_id: typing.Optional[bool] = pydantic_v1.Field(default=None)
16
+ """
17
+ Include a full json body or IDs only
18
+ """
19
+
20
+ def json(self, **kwargs: typing.Any) -> str:
21
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
22
+ return super().json(**kwargs_with_defaults)
23
+
24
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
25
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
26
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
27
+
28
+ return deep_union_pydantic_dicts(
29
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
30
+ )
31
+
32
+ class Config:
33
+ frozen = True
34
+ smart_union = True
35
+ extra = pydantic_v1.Extra.allow
36
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,45 @@
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 .serialization_option import SerializationOption
9
+
10
+
11
+ class SerializationOptions(pydantic_v1.BaseModel):
12
+ drafts: typing.Optional[SerializationOption] = None
13
+ predictions: typing.Optional[SerializationOption] = None
14
+ include_annotation_history: typing.Optional[bool] = pydantic_v1.Field(default=None)
15
+ """
16
+ Include annotation history
17
+ """
18
+
19
+ annotations_completed_by: typing.Optional[SerializationOption] = pydantic_v1.Field(
20
+ alias="annotations__completed_by", default=None
21
+ )
22
+ interpolate_key_frames: typing.Optional[bool] = pydantic_v1.Field(default=None)
23
+ """
24
+ Interpolate video key frames
25
+ """
26
+
27
+ def json(self, **kwargs: typing.Any) -> str:
28
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
29
+ return super().json(**kwargs_with_defaults)
30
+
31
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
32
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
33
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
34
+
35
+ return deep_union_pydantic_dicts(
36
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
37
+ )
38
+
39
+ class Config:
40
+ frozen = True
41
+ smart_union = True
42
+ allow_population_by_field_name = True
43
+ populate_by_name = True
44
+ extra = pydantic_v1.Extra.allow
45
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,157 @@
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 Task(pydantic_v1.BaseModel):
11
+ id: typing.Optional[int] = pydantic_v1.Field(default=None)
12
+ """
13
+ Unique ID of the task
14
+ """
15
+
16
+ predictions: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field(default=None)
17
+ """
18
+ Predictions for this task
19
+ """
20
+
21
+ annotations: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field(default=None)
22
+ """
23
+ Annotations for this task
24
+ """
25
+
26
+ drafts: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field(default=None)
27
+ """
28
+ Drafts for this task
29
+ """
30
+
31
+ annotators: typing.Optional[typing.List[int]] = pydantic_v1.Field(default=None)
32
+ """
33
+ List of annotators' IDs for this task
34
+ """
35
+
36
+ inner_id: typing.Optional[int] = pydantic_v1.Field(default=None)
37
+ """
38
+ Inner ID of the task
39
+ """
40
+
41
+ cancelled_annotations: typing.Optional[int] = pydantic_v1.Field(default=None)
42
+ """
43
+ Number of cancelled annotations for this task
44
+ """
45
+
46
+ total_annotations: typing.Optional[int] = pydantic_v1.Field(default=None)
47
+ """
48
+ Total number of annotations for this task
49
+ """
50
+
51
+ total_predictions: typing.Optional[int] = pydantic_v1.Field(default=None)
52
+ """
53
+ Total number of predictions for this task
54
+ """
55
+
56
+ completed_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
57
+ """
58
+ Completion time of the task
59
+ """
60
+
61
+ file_upload: typing.Optional[int] = pydantic_v1.Field(default=None)
62
+ """
63
+ File upload ID for this task
64
+ """
65
+
66
+ storage_filename: typing.Optional[str] = pydantic_v1.Field(default=None)
67
+ """
68
+ Storage filename for this task
69
+ """
70
+
71
+ avg_lead_time: typing.Optional[float] = pydantic_v1.Field(default=None)
72
+ """
73
+ Average lead time for this task
74
+ """
75
+
76
+ draft_exists: typing.Optional[bool] = pydantic_v1.Field(default=None)
77
+ """
78
+ Whether a draft exists for this task or not
79
+ """
80
+
81
+ updated_by: typing.Optional[typing.List[typing.Dict[str, typing.Any]]] = pydantic_v1.Field(default=None)
82
+ """
83
+ List of annotators' info who updated this task
84
+ """
85
+
86
+ data: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
87
+ """
88
+ Data of the task
89
+ """
90
+
91
+ meta: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
92
+ """
93
+ Meta information of the task
94
+ """
95
+
96
+ created_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
97
+ """
98
+ Creation time of the task
99
+ """
100
+
101
+ updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
102
+ """
103
+ Last updated time of the task
104
+ """
105
+
106
+ is_labeled: typing.Optional[bool] = pydantic_v1.Field(default=None)
107
+ """
108
+ Whether the task is labeled or not
109
+ """
110
+
111
+ overlap: typing.Optional[float] = pydantic_v1.Field(default=None)
112
+ """
113
+ Overlap for the task
114
+ """
115
+
116
+ comment_count: typing.Optional[int] = pydantic_v1.Field(default=None)
117
+ """
118
+ Number of comments for this task
119
+ """
120
+
121
+ unresolved_comment_count: typing.Optional[int] = pydantic_v1.Field(default=None)
122
+ """
123
+ Number of unresolved comments for this task
124
+ """
125
+
126
+ last_comment_updated_at: typing.Optional[dt.datetime] = pydantic_v1.Field(default=None)
127
+ """
128
+ Last updated time of the comments for this task
129
+ """
130
+
131
+ project: typing.Optional[int] = pydantic_v1.Field(default=None)
132
+ """
133
+ Project ID for this task
134
+ """
135
+
136
+ comment_authors: typing.Optional[typing.List[int]] = pydantic_v1.Field(default=None)
137
+ """
138
+ List of comment authors' IDs for this task
139
+ """
140
+
141
+ def json(self, **kwargs: typing.Any) -> str:
142
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
143
+ return super().json(**kwargs_with_defaults)
144
+
145
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
146
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
147
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
148
+
149
+ return deep_union_pydantic_dicts(
150
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
151
+ )
152
+
153
+ class Config:
154
+ frozen = True
155
+ smart_union = True
156
+ extra = pydantic_v1.Extra.allow
157
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,49 @@
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 TaskFilterOptions(pydantic_v1.BaseModel):
11
+ view: typing.Optional[int] = pydantic_v1.Field(default=None)
12
+ """
13
+ Apply filters from the view ID (a tab from the Data Manager)
14
+ """
15
+
16
+ skipped: typing.Optional[str] = pydantic_v1.Field(default=None)
17
+ """
18
+ `only` - include all tasks with skipped annotations<br>`exclude` - exclude all tasks with skipped annotations
19
+ """
20
+
21
+ finished: typing.Optional[str] = pydantic_v1.Field(default=None)
22
+ """
23
+ `only` - include all finished tasks (is_labeled = true)<br>`exclude` - exclude all finished tasks
24
+ """
25
+
26
+ annotated: typing.Optional[str] = pydantic_v1.Field(default=None)
27
+ """
28
+ `only` - include all tasks with at least one not skipped annotation<br>`exclude` - exclude all tasks with at least one not skipped annotation
29
+ """
30
+
31
+ only_with_annotations: typing.Optional[bool] = None
32
+
33
+ def json(self, **kwargs: typing.Any) -> str:
34
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
35
+ return super().json(**kwargs_with_defaults)
36
+
37
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
38
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
39
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
40
+
41
+ return deep_union_pydantic_dicts(
42
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
43
+ )
44
+
45
+ class Config:
46
+ frozen = True
47
+ smart_union = True
48
+ extra = pydantic_v1.Extra.allow
49
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,37 @@
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 UserSimple(pydantic_v1.BaseModel):
11
+ """
12
+ Project owner
13
+ """
14
+
15
+ id: typing.Optional[int] = None
16
+ first_name: typing.Optional[str] = None
17
+ last_name: typing.Optional[str] = None
18
+ email: typing.Optional[str] = None
19
+ avatar: typing.Optional[str] = None
20
+
21
+ def json(self, **kwargs: typing.Any) -> str:
22
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
23
+ return super().json(**kwargs_with_defaults)
24
+
25
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
26
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
27
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
28
+
29
+ return deep_union_pydantic_dicts(
30
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
31
+ )
32
+
33
+ class Config:
34
+ frozen = True
35
+ smart_union = True
36
+ extra = pydantic_v1.Extra.allow
37
+ json_encoders = {dt.datetime: serialize_datetime}
@@ -0,0 +1,55 @@
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 .filter_group import FilterGroup
9
+
10
+
11
+ class View(pydantic_v1.BaseModel):
12
+ id: typing.Optional[int] = None
13
+ filter_group: typing.Optional[FilterGroup] = None
14
+ data: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
15
+ """
16
+ Custom view data
17
+ """
18
+
19
+ ordering: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
20
+ """
21
+ Ordering parameters
22
+ """
23
+
24
+ selected_items: typing.Optional[typing.Dict[str, typing.Any]] = pydantic_v1.Field(default=None)
25
+ """
26
+ Selected items
27
+ """
28
+
29
+ user: typing.Optional[int] = pydantic_v1.Field(default=None)
30
+ """
31
+ User who made this view
32
+ """
33
+
34
+ project: int = pydantic_v1.Field()
35
+ """
36
+ Project ID
37
+ """
38
+
39
+ def json(self, **kwargs: typing.Any) -> str:
40
+ kwargs_with_defaults: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
41
+ return super().json(**kwargs_with_defaults)
42
+
43
+ def dict(self, **kwargs: typing.Any) -> typing.Dict[str, typing.Any]:
44
+ kwargs_with_defaults_exclude_unset: typing.Any = {"by_alias": True, "exclude_unset": True, **kwargs}
45
+ kwargs_with_defaults_exclude_none: typing.Any = {"by_alias": True, "exclude_none": True, **kwargs}
46
+
47
+ return deep_union_pydantic_dicts(
48
+ super().dict(**kwargs_with_defaults_exclude_unset), super().dict(**kwargs_with_defaults_exclude_none)
49
+ )
50
+
51
+ class Config:
52
+ frozen = True
53
+ smart_union = True
54
+ extra = pydantic_v1.Extra.allow
55
+ json_encoders = {dt.datetime: serialize_datetime}