label-studio-sdk 0.0.34__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 (256) hide show
  1. label_studio_sdk/__init__.py +206 -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/_legacy/__init__.py +11 -0
  16. label_studio_sdk/_legacy/client.py +471 -0
  17. label_studio_sdk/_legacy/label_interface/data_examples.json +96 -0
  18. label_studio_sdk/{label_interface → _legacy/label_interface}/interface.py +9 -6
  19. label_studio_sdk/{project.py → _legacy/project.py} +2 -2
  20. label_studio_sdk/actions/__init__.py +2 -0
  21. label_studio_sdk/actions/client.py +150 -0
  22. label_studio_sdk/annotations/__init__.py +2 -0
  23. label_studio_sdk/annotations/client.py +750 -0
  24. label_studio_sdk/client.py +162 -450
  25. label_studio_sdk/converter/__init__.py +7 -0
  26. label_studio_sdk/converter/audio.py +56 -0
  27. label_studio_sdk/converter/brush.py +452 -0
  28. label_studio_sdk/converter/converter.py +1175 -0
  29. label_studio_sdk/converter/exports/__init__.py +0 -0
  30. label_studio_sdk/converter/exports/csv.py +82 -0
  31. label_studio_sdk/converter/exports/csv2.py +103 -0
  32. label_studio_sdk/converter/funsd.py +85 -0
  33. label_studio_sdk/converter/imports/__init__.py +0 -0
  34. label_studio_sdk/converter/imports/coco.py +314 -0
  35. label_studio_sdk/converter/imports/colors.py +198 -0
  36. label_studio_sdk/converter/imports/label_config.py +45 -0
  37. label_studio_sdk/converter/imports/pathtrack.py +269 -0
  38. label_studio_sdk/converter/imports/yolo.py +236 -0
  39. label_studio_sdk/converter/main.py +202 -0
  40. label_studio_sdk/converter/utils.py +473 -0
  41. label_studio_sdk/core/__init__.py +33 -0
  42. label_studio_sdk/core/api_error.py +15 -0
  43. label_studio_sdk/core/client_wrapper.py +55 -0
  44. label_studio_sdk/core/datetime_utils.py +28 -0
  45. label_studio_sdk/core/file.py +38 -0
  46. label_studio_sdk/core/http_client.py +443 -0
  47. label_studio_sdk/core/jsonable_encoder.py +99 -0
  48. label_studio_sdk/core/pagination.py +87 -0
  49. label_studio_sdk/core/pydantic_utilities.py +28 -0
  50. label_studio_sdk/core/query_encoder.py +33 -0
  51. label_studio_sdk/core/remove_none_from_dict.py +11 -0
  52. label_studio_sdk/core/request_options.py +32 -0
  53. label_studio_sdk/environment.py +7 -0
  54. label_studio_sdk/errors/__init__.py +6 -0
  55. label_studio_sdk/errors/bad_request_error.py +8 -0
  56. label_studio_sdk/errors/internal_server_error.py +8 -0
  57. label_studio_sdk/export_storage/__init__.py +28 -0
  58. label_studio_sdk/export_storage/azure/__init__.py +5 -0
  59. label_studio_sdk/export_storage/azure/client.py +722 -0
  60. label_studio_sdk/export_storage/azure/types/__init__.py +6 -0
  61. label_studio_sdk/export_storage/azure/types/azure_create_response.py +52 -0
  62. label_studio_sdk/export_storage/azure/types/azure_update_response.py +52 -0
  63. label_studio_sdk/export_storage/client.py +107 -0
  64. label_studio_sdk/export_storage/gcs/__init__.py +5 -0
  65. label_studio_sdk/export_storage/gcs/client.py +722 -0
  66. label_studio_sdk/export_storage/gcs/types/__init__.py +6 -0
  67. label_studio_sdk/export_storage/gcs/types/gcs_create_response.py +52 -0
  68. label_studio_sdk/export_storage/gcs/types/gcs_update_response.py +52 -0
  69. label_studio_sdk/export_storage/local/__init__.py +5 -0
  70. label_studio_sdk/export_storage/local/client.py +688 -0
  71. label_studio_sdk/export_storage/local/types/__init__.py +6 -0
  72. label_studio_sdk/export_storage/local/types/local_create_response.py +47 -0
  73. label_studio_sdk/export_storage/local/types/local_update_response.py +47 -0
  74. label_studio_sdk/export_storage/redis/__init__.py +5 -0
  75. label_studio_sdk/export_storage/redis/client.py +714 -0
  76. label_studio_sdk/export_storage/redis/types/__init__.py +6 -0
  77. label_studio_sdk/export_storage/redis/types/redis_create_response.py +57 -0
  78. label_studio_sdk/export_storage/redis/types/redis_update_response.py +57 -0
  79. label_studio_sdk/export_storage/s3/__init__.py +5 -0
  80. label_studio_sdk/export_storage/s3/client.py +820 -0
  81. label_studio_sdk/export_storage/s3/types/__init__.py +6 -0
  82. label_studio_sdk/export_storage/s3/types/s3create_response.py +74 -0
  83. label_studio_sdk/export_storage/s3/types/s3update_response.py +74 -0
  84. label_studio_sdk/export_storage/types/__init__.py +5 -0
  85. label_studio_sdk/export_storage/types/export_storage_list_types_response_item.py +30 -0
  86. label_studio_sdk/files/__init__.py +2 -0
  87. label_studio_sdk/files/client.py +556 -0
  88. label_studio_sdk/import_storage/__init__.py +28 -0
  89. label_studio_sdk/import_storage/azure/__init__.py +5 -0
  90. label_studio_sdk/import_storage/azure/client.py +812 -0
  91. label_studio_sdk/import_storage/azure/types/__init__.py +6 -0
  92. label_studio_sdk/import_storage/azure/types/azure_create_response.py +72 -0
  93. label_studio_sdk/import_storage/azure/types/azure_update_response.py +72 -0
  94. label_studio_sdk/import_storage/client.py +107 -0
  95. label_studio_sdk/import_storage/gcs/__init__.py +5 -0
  96. label_studio_sdk/import_storage/gcs/client.py +812 -0
  97. label_studio_sdk/import_storage/gcs/types/__init__.py +6 -0
  98. label_studio_sdk/import_storage/gcs/types/gcs_create_response.py +72 -0
  99. label_studio_sdk/import_storage/gcs/types/gcs_update_response.py +72 -0
  100. label_studio_sdk/import_storage/local/__init__.py +5 -0
  101. label_studio_sdk/import_storage/local/client.py +690 -0
  102. label_studio_sdk/import_storage/local/types/__init__.py +6 -0
  103. label_studio_sdk/import_storage/local/types/local_create_response.py +47 -0
  104. label_studio_sdk/import_storage/local/types/local_update_response.py +47 -0
  105. label_studio_sdk/import_storage/redis/__init__.py +5 -0
  106. label_studio_sdk/import_storage/redis/client.py +768 -0
  107. label_studio_sdk/import_storage/redis/types/__init__.py +6 -0
  108. label_studio_sdk/import_storage/redis/types/redis_create_response.py +62 -0
  109. label_studio_sdk/import_storage/redis/types/redis_update_response.py +62 -0
  110. label_studio_sdk/import_storage/s3/__init__.py +5 -0
  111. label_studio_sdk/import_storage/s3/client.py +912 -0
  112. label_studio_sdk/import_storage/s3/types/__init__.py +6 -0
  113. label_studio_sdk/import_storage/s3/types/s3create_response.py +99 -0
  114. label_studio_sdk/import_storage/s3/types/s3update_response.py +99 -0
  115. label_studio_sdk/import_storage/types/__init__.py +5 -0
  116. label_studio_sdk/import_storage/types/import_storage_list_types_response_item.py +30 -0
  117. label_studio_sdk/ml/__init__.py +19 -0
  118. label_studio_sdk/ml/client.py +981 -0
  119. label_studio_sdk/ml/types/__init__.py +17 -0
  120. label_studio_sdk/ml/types/ml_create_request_auth_method.py +5 -0
  121. label_studio_sdk/ml/types/ml_create_response.py +78 -0
  122. label_studio_sdk/ml/types/ml_create_response_auth_method.py +5 -0
  123. label_studio_sdk/ml/types/ml_update_request_auth_method.py +5 -0
  124. label_studio_sdk/ml/types/ml_update_response.py +78 -0
  125. label_studio_sdk/ml/types/ml_update_response_auth_method.py +5 -0
  126. label_studio_sdk/predictions/__init__.py +2 -0
  127. label_studio_sdk/predictions/client.py +638 -0
  128. label_studio_sdk/projects/__init__.py +6 -0
  129. label_studio_sdk/projects/client.py +1053 -0
  130. label_studio_sdk/projects/exports/__init__.py +2 -0
  131. label_studio_sdk/projects/exports/client.py +930 -0
  132. label_studio_sdk/projects/types/__init__.py +7 -0
  133. label_studio_sdk/projects/types/projects_create_response.py +96 -0
  134. label_studio_sdk/projects/types/projects_import_tasks_response.py +71 -0
  135. label_studio_sdk/projects/types/projects_list_response.py +33 -0
  136. label_studio_sdk/py.typed +0 -0
  137. label_studio_sdk/tasks/__init__.py +5 -0
  138. label_studio_sdk/tasks/client.py +811 -0
  139. label_studio_sdk/tasks/types/__init__.py +6 -0
  140. label_studio_sdk/tasks/types/tasks_list_request_fields.py +5 -0
  141. label_studio_sdk/tasks/types/tasks_list_response.py +48 -0
  142. label_studio_sdk/types/__init__.py +115 -0
  143. label_studio_sdk/types/annotation.py +116 -0
  144. label_studio_sdk/types/annotation_filter_options.py +42 -0
  145. label_studio_sdk/types/annotation_last_action.py +19 -0
  146. label_studio_sdk/types/azure_blob_export_storage.py +112 -0
  147. label_studio_sdk/types/azure_blob_export_storage_status.py +7 -0
  148. label_studio_sdk/types/azure_blob_import_storage.py +113 -0
  149. label_studio_sdk/types/azure_blob_import_storage_status.py +7 -0
  150. label_studio_sdk/types/base_task.py +113 -0
  151. label_studio_sdk/types/base_user.py +42 -0
  152. label_studio_sdk/types/converted_format.py +36 -0
  153. label_studio_sdk/types/converted_format_status.py +5 -0
  154. label_studio_sdk/types/export.py +48 -0
  155. label_studio_sdk/types/export_convert.py +32 -0
  156. label_studio_sdk/types/export_create.py +54 -0
  157. label_studio_sdk/types/export_create_status.py +5 -0
  158. label_studio_sdk/types/export_status.py +5 -0
  159. label_studio_sdk/types/file_upload.py +30 -0
  160. label_studio_sdk/types/filter.py +53 -0
  161. label_studio_sdk/types/filter_group.py +35 -0
  162. label_studio_sdk/types/gcs_export_storage.py +112 -0
  163. label_studio_sdk/types/gcs_export_storage_status.py +7 -0
  164. label_studio_sdk/types/gcs_import_storage.py +113 -0
  165. label_studio_sdk/types/gcs_import_storage_status.py +7 -0
  166. label_studio_sdk/types/local_files_export_storage.py +97 -0
  167. label_studio_sdk/types/local_files_export_storage_status.py +7 -0
  168. label_studio_sdk/types/local_files_import_storage.py +92 -0
  169. label_studio_sdk/types/local_files_import_storage_status.py +7 -0
  170. label_studio_sdk/types/ml_backend.py +89 -0
  171. label_studio_sdk/types/ml_backend_auth_method.py +5 -0
  172. label_studio_sdk/types/ml_backend_state.py +5 -0
  173. label_studio_sdk/types/prediction.py +78 -0
  174. label_studio_sdk/types/project.py +198 -0
  175. label_studio_sdk/types/project_import.py +63 -0
  176. label_studio_sdk/types/project_import_status.py +5 -0
  177. label_studio_sdk/types/project_label_config.py +32 -0
  178. label_studio_sdk/types/project_sampling.py +7 -0
  179. label_studio_sdk/types/project_skip_queue.py +5 -0
  180. label_studio_sdk/types/redis_export_storage.py +117 -0
  181. label_studio_sdk/types/redis_export_storage_status.py +7 -0
  182. label_studio_sdk/types/redis_import_storage.py +112 -0
  183. label_studio_sdk/types/redis_import_storage_status.py +7 -0
  184. label_studio_sdk/types/s3export_storage.py +134 -0
  185. label_studio_sdk/types/s3export_storage_status.py +7 -0
  186. label_studio_sdk/types/s3import_storage.py +140 -0
  187. label_studio_sdk/types/s3import_storage_status.py +7 -0
  188. label_studio_sdk/types/serialization_option.py +36 -0
  189. label_studio_sdk/types/serialization_options.py +45 -0
  190. label_studio_sdk/types/task.py +157 -0
  191. label_studio_sdk/types/task_filter_options.py +49 -0
  192. label_studio_sdk/types/user_simple.py +37 -0
  193. label_studio_sdk/types/view.py +55 -0
  194. label_studio_sdk/types/webhook.py +67 -0
  195. label_studio_sdk/types/webhook_actions_item.py +21 -0
  196. label_studio_sdk/types/webhook_serializer_for_update.py +67 -0
  197. label_studio_sdk/types/webhook_serializer_for_update_actions_item.py +21 -0
  198. label_studio_sdk/users/__init__.py +5 -0
  199. label_studio_sdk/users/client.py +830 -0
  200. label_studio_sdk/users/types/__init__.py +6 -0
  201. label_studio_sdk/users/types/users_get_token_response.py +36 -0
  202. label_studio_sdk/users/types/users_reset_token_response.py +36 -0
  203. label_studio_sdk/version.py +4 -0
  204. label_studio_sdk/views/__init__.py +31 -0
  205. label_studio_sdk/views/client.py +564 -0
  206. label_studio_sdk/views/types/__init__.py +29 -0
  207. label_studio_sdk/views/types/views_create_request_data.py +43 -0
  208. label_studio_sdk/views/types/views_create_request_data_filters.py +43 -0
  209. label_studio_sdk/views/types/views_create_request_data_filters_conjunction.py +5 -0
  210. label_studio_sdk/views/types/views_create_request_data_filters_items_item.py +47 -0
  211. label_studio_sdk/views/types/views_create_request_data_ordering_item.py +38 -0
  212. label_studio_sdk/views/types/views_create_request_data_ordering_item_direction.py +5 -0
  213. label_studio_sdk/views/types/views_update_request_data.py +43 -0
  214. label_studio_sdk/views/types/views_update_request_data_filters.py +43 -0
  215. label_studio_sdk/views/types/views_update_request_data_filters_conjunction.py +5 -0
  216. label_studio_sdk/views/types/views_update_request_data_filters_items_item.py +47 -0
  217. label_studio_sdk/views/types/views_update_request_data_ordering_item.py +38 -0
  218. label_studio_sdk/views/types/views_update_request_data_ordering_item_direction.py +5 -0
  219. label_studio_sdk/webhooks/__init__.py +5 -0
  220. label_studio_sdk/webhooks/client.py +636 -0
  221. label_studio_sdk/webhooks/types/__init__.py +5 -0
  222. label_studio_sdk/webhooks/types/webhooks_update_request_actions_item.py +21 -0
  223. label_studio_sdk-1.0.0.dist-info/METADATA +307 -0
  224. label_studio_sdk-1.0.0.dist-info/RECORD +239 -0
  225. {label_studio_sdk-0.0.34.dist-info → label_studio_sdk-1.0.0.dist-info}/WHEEL +1 -2
  226. label_studio_sdk-0.0.34.dist-info/LICENSE +0 -201
  227. label_studio_sdk-0.0.34.dist-info/METADATA +0 -24
  228. label_studio_sdk-0.0.34.dist-info/RECORD +0 -37
  229. label_studio_sdk-0.0.34.dist-info/top_level.txt +0 -2
  230. tests/test_client.py +0 -37
  231. tests/test_export.py +0 -105
  232. tests/test_interface/__init__.py +0 -1
  233. tests/test_interface/configs.py +0 -137
  234. tests/test_interface/mockups.py +0 -22
  235. tests/test_interface/test_compat.py +0 -64
  236. tests/test_interface/test_control_tags.py +0 -55
  237. tests/test_interface/test_data_generation.py +0 -45
  238. tests/test_interface/test_lpi.py +0 -15
  239. tests/test_interface/test_main.py +0 -196
  240. tests/test_interface/test_object_tags.py +0 -36
  241. tests/test_interface/test_region.py +0 -36
  242. tests/test_interface/test_validate_summary.py +0 -35
  243. tests/test_interface/test_validation.py +0 -59
  244. {tests → label_studio_sdk/_extensions}/__init__.py +0 -0
  245. /label_studio_sdk/{exceptions.py → _legacy/exceptions.py} +0 -0
  246. /label_studio_sdk/{label_interface → _legacy/label_interface}/__init__.py +0 -0
  247. /label_studio_sdk/{label_interface → _legacy/label_interface}/base.py +0 -0
  248. /label_studio_sdk/{label_interface → _legacy/label_interface}/control_tags.py +0 -0
  249. /label_studio_sdk/{label_interface → _legacy/label_interface}/label_tags.py +0 -0
  250. /label_studio_sdk/{label_interface → _legacy/label_interface}/object_tags.py +0 -0
  251. /label_studio_sdk/{label_interface → _legacy/label_interface}/region.py +0 -0
  252. /label_studio_sdk/{objects.py → _legacy/objects.py} +0 -0
  253. /label_studio_sdk/{schema → _legacy/schema}/label_config_schema.json +0 -0
  254. /label_studio_sdk/{users.py → _legacy/users.py} +0 -0
  255. /label_studio_sdk/{utils.py → _legacy/utils.py} +0 -0
  256. /label_studio_sdk/{workspaces.py → _legacy/workspaces.py} +0 -0
@@ -0,0 +1,96 @@
1
+ {
2
+ "editor_preview": {
3
+ "TextRaw": "To have faith is to trust yourself to the water",
4
+ "TextUrl": "https://htx-pub.s3.amazonaws.com/example.txt",
5
+ "HyperText": "<div style=\"max-width: 750px\"><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Jules<\/b>: No no, Mr. Wolfe, it's not like that. Your help is definitely appreciated.<\/p><\/div><\/div><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Vincent<\/b>: Look, Mr. Wolfe, I respect you. I just don't like people barking orders at me, that's all.<\/p><\/div><\/div><div style=\"clear: both\"><div style=\"display: inline-block; border: 1px solid #D5F5E3; background-color: #EAFAF1; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>The Wolf<\/b>: If I'm curt with you, it's because time is a factor. I think fast, I talk fast, and I need you two guys to act fast if you want to get out of this. So pretty please, with sugar on top, clean the car.<\/p><\/div><\/div><\/div>",
6
+ "HyperTextUrl": "<HOSTNAME>/static/samples/hypertext.html",
7
+ "Image": "<HOSTNAME>/static/samples/sample.jpg",
8
+ "Audio": "<HOSTNAME>/static/samples/game.wav",
9
+ "AudioPlus": "<HOSTNAME>/static/samples/game.wav",
10
+ "Header": "Task header",
11
+ "Paragraphs": [{"author": "Alice", "text": "Hi, Bob."}, {"author": "Bob", "text": "Hello, Alice!"}, {"author": "Alice", "text": "What's up?"}, {"author": "Bob", "text": "Good. Ciao!"}, {"author": "Alice", "text": "Bye, Bob."}],
12
+ "ParagraphsUrl": "<HOSTNAME>/samples/paragraphs.json?",
13
+ "Table": {"Card number": 18799210, "First name": "Max", "Last name": "Nobel"},
14
+ "$videoHack": "<video src='<HOSTNAME>/static/samples/opossum_snow.mp4' width=100% controls>",
15
+ "Video": "<HOSTNAME>/static/samples/opossum_snow.mp4",
16
+ "Labels": [
17
+ { "value": "DynamicLabel1", "background": "#ff0000" },
18
+ { "value": "DynamicLabel2", "background": "#0000ff" }
19
+ ],
20
+ "Choices": [
21
+ { "value": "DynamicChoice1" },
22
+ { "value": "DynamicChoice2" },
23
+ { "value": "DynamicChoice3" }
24
+ ],
25
+ "NestedChoices": [
26
+ {
27
+ "value": "DynamicChoiceHeader1",
28
+ "children": [
29
+ { "value": "DynamicChoice1.1" },
30
+ { "value": "DynamicChoice1.2" }
31
+ ]
32
+ },
33
+ {
34
+ "value": "DynamicChoiceHeader2",
35
+ "children": [
36
+ { "value": "DynamicChoice2.1" },
37
+ { "value": "DynamicChoice2.2" },
38
+ { "value": "DynamicChoice2.3" }
39
+ ]
40
+ }
41
+ ],
42
+ "List": [
43
+ {
44
+ "id": 1,
45
+ "title": "The Amazing World of Opossums",
46
+ "body": "Opossums are fascinating marsupials native to North America. They have prehensile tails, which help them to climb trees and navigate their surroundings with ease. Additionally, they are known for their unique defense mechanism, called 'playing possum,' where they mimic the appearance and smell of a dead animal to deter predators."
47
+ },
48
+ {
49
+ "id": 2,
50
+ "title": "Opossums: Nature's Pest Control",
51
+ "body": "Opossums play a crucial role in controlling insect and rodent populations, as they consume a variety of pests like cockroaches, beetles, and mice. This makes them valuable allies for gardeners and homeowners, as they help to maintain a balanced ecosystem and reduce the need for chemical pest control methods."
52
+ },
53
+ {
54
+ "id": 3,
55
+ "title": "Fun Fact: Opossums Are Immune to Snake Venom",
56
+ "body": "One surprising characteristic of opossums is their natural immunity to snake venom. They have a unique protein in their blood called 'Lethal Toxin-Neutralizing Factor' (LTNF), which neutralizes venom from a variety of snake species, including rattlesnakes and cottonmouths. This allows opossums to prey on snakes without fear of harm, further highlighting their important role in the ecosystem."
57
+ }
58
+ ],
59
+ "$longText": "Opossums are frequently considered to be living fossils, and as a result are often used to approximate the ancestral therian condition in comparative studies. However, this is inaccurate, the oldest opossum fossils are early Miocene in age (roughly 20 million years old) and the last common ancestor of all living opossums approximately dates to the Oligocene-Miocene boundary (roughly 23 million years ago) and is at most no older than Oligocene in age. Many extinct metatherians once considered early opossums, such as Alphadon, Peradectes, Herpetotherium, and Pucadelphys, have since been recognized to have been previously grouped with opossums on the basis of plesiomorphies and are now considered to represent older branches of Metatheria only distantly related to modern opossums.",
60
+ "$corefText": "I voted for Obama because he was most aligned with my values, she said.",
61
+ "$pdf": "<embed src='<HOSTNAME>/static/samples/sample.pdf' width='100%' height='600px'/>",
62
+ "$website": "<iframe src='http://heartex.ai' width='100%' height='600px'/>",
63
+ "$headlessCsv": "<HOSTNAME>/static/samples/sample-task-sin-headless.csv",
64
+ "$humanMachineDialogue": [
65
+ {"author": "Human", "text": "Hi, Robot!"},
66
+ {"author": "Robot", "text": "Nice to meet you, man! Tell me what you want."},
67
+ {"author": "Human", "text": "Order me a pizza from Golden Boy at Green Street "},
68
+ {"author": "Robot", "text": "Done. When do you want to get the order?"},
69
+ {"author": "Human", "text": "At 3am in the morning, please"}],
70
+ "$respone": "Sure, no problem!",
71
+ "$resptwo": "Sorry, it's too early. May be we can change the time?",
72
+ "$respthree": "Don't eat junk food man, it's bad for you...",
73
+ "$ocr": "https://htx-pub.s3.amazonaws.com/demo/ocr/example.jpg",
74
+ "$ner": "A Florida restaurant paid 10,925 pounds ($16,935) for the draft of \\\"Ain't no telling\\\", which Hendrix penned on a piece of London hotel stationery in late 1966.",
75
+ "$captioning": "<HOSTNAME>/static/samples/trees_in_snow.jpg",
76
+ "$pairText1": "Look at this! It's a brand new product",
77
+ "$pairText2": "Look at this! It's an awesome piece of sh*t"
78
+ },
79
+ "upload": {
80
+ "TextRaw": "To have faith is to trust yourself to the water",
81
+ "TextUrl": "https://htx-pub.s3.amazonaws.com/example.txt",
82
+ "HyperText": "<a href='heartex.net'>Heartex</a>",
83
+ "Image": "<HOSTNAME>/static/samples/sample.jpg",
84
+ "Audio": "<HOSTNAME>/static/samples/game.wav",
85
+ "AudioPlus": "<HOSTNAME>/static/samples/game.wav",
86
+ "Header": "Task header",
87
+ "Paragraphs": [{"author": "Alice", "text": "Hi, Bob."}, {"author": "Bob", "text": "Hello, Alice!"}, {"author": "Alice", "text": "What's up?"}, {"author": "Bob", "text": "Good. Ciao!"}, {"author": "Alice", "text": "Bye, Bob."}],
88
+ "Table": {"Card number": 18799210, "First name": "Max", "Last name": "Nobel"},
89
+ "$videoHack": "<video src='static/samples/opossum_snow.mp4' width=100% controls>",
90
+ "Video": "<HOSTNAME>/static/samples/opossum_snow.mp4",
91
+ "$longText": "Opossums are frequently considered to be living fossils, and as a result are often used to approximate the ancestral therian condition in comparative studies. However, this is inaccurate, the oldest opossum fossils are early Miocene in age (roughly 20 million years old) and the last common ancestor of all living opossums approximately dates to the Oligocene-Miocene boundary (roughly 23 million years ago) and is at most no older than Oligocene in age. Many extinct metatherians once considered early opossums, such as Alphadon, Peradectes, Herpetotherium, and Pucadelphys, have since been recognized to have been previously grouped with opossums on the basis of plesiomorphies and are now considered to represent older branches of Metatheria only distantly related to modern opossums.",
92
+ "$pdf": "<embed src='<HOSTNAME>/static/samples/sample.pdf' width='100%' height='600px'/>",
93
+ "$website": "<iframe src='https://heartex.ai' width='100%' height='600px'/>",
94
+ "$headlessCsv": "<HOSTNAME>/static/samples/sample-task-sin-headless.csv"
95
+ }
96
+ }
@@ -16,20 +16,20 @@ from collections import defaultdict
16
16
  from lxml import etree
17
17
  import xmljson
18
18
 
19
- from label_studio_sdk.exceptions import (
19
+ from label_studio_sdk._legacy.exceptions import (
20
20
  LSConfigParseException,
21
21
  LabelStudioXMLSyntaxErrorSentryIgnored,
22
22
  LabelStudioValidationErrorSentryIgnored,
23
23
  )
24
24
 
25
- from label_studio_sdk.label_interface.control_tags import (
25
+ from label_studio_sdk._legacy.label_interface.control_tags import (
26
26
  ControlTag,
27
27
  ChoicesTag,
28
28
  LabelsTag,
29
29
  )
30
- from label_studio_sdk.label_interface.object_tags import ObjectTag
31
- from label_studio_sdk.label_interface.label_tags import LabelTag
32
- from label_studio_sdk.objects import AnnotationValue, TaskValue, PredictionValue
30
+ from label_studio_sdk._legacy.label_interface.object_tags import ObjectTag
31
+ from label_studio_sdk._legacy.label_interface.label_tags import LabelTag
32
+ from label_studio_sdk._legacy.objects import AnnotationValue, TaskValue, PredictionValue
33
33
 
34
34
 
35
35
  dir_path = os.path.dirname(os.path.realpath(__file__))
@@ -429,7 +429,10 @@ class LabelInterface:
429
429
 
430
430
  elif LabelTag.validate_node(tag):
431
431
  lb = LabelTag.parse_node(tag, controls)
432
- labels[lb.parent_name][lb.value] = lb
432
+ # This case is hit when Label tag is missing `value` and `alias`
433
+ # For now we will skip that Label, but in future might want to raise an error
434
+ if lb:
435
+ labels[lb.parent_name][lb.value] = lb
433
436
 
434
437
  return controls, objects, labels, xml_tree
435
438
 
@@ -11,8 +11,8 @@ from pathlib import Path
11
11
  from random import sample, shuffle
12
12
  from typing import Optional, Union, List, Dict, Callable
13
13
 
14
- from label_studio_tools.core.label_config import parse_config
15
- from label_studio_tools.core.utils.io import get_local_path
14
+ from label_studio_sdk._extensions.label_studio_tools.core.label_config import parse_config
15
+ from label_studio_sdk._extensions.label_studio_tools.core.utils.io import get_local_path
16
16
  from requests import Response
17
17
  from requests.exceptions import HTTPError, InvalidSchema, MissingSchema
18
18
 
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
@@ -0,0 +1,150 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+ from json.decoder import JSONDecodeError
5
+
6
+ from ..core.api_error import ApiError
7
+ from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
8
+ from ..core.request_options import RequestOptions
9
+
10
+
11
+ class ActionsClient:
12
+ def __init__(self, *, client_wrapper: SyncClientWrapper):
13
+ self._client_wrapper = client_wrapper
14
+
15
+ def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
16
+ """
17
+ Retrieve all the registered actions with descriptions that data manager can use.
18
+
19
+ Parameters
20
+ ----------
21
+ request_options : typing.Optional[RequestOptions]
22
+ Request-specific configuration.
23
+
24
+ Returns
25
+ -------
26
+ None
27
+
28
+ Examples
29
+ --------
30
+ from label_studio_sdk.client import LabelStudio
31
+
32
+ client = LabelStudio(
33
+ api_key="YOUR_API_KEY",
34
+ )
35
+ client.actions.list()
36
+ """
37
+ _response = self._client_wrapper.httpx_client.request(
38
+ "api/dm/actions/", method="GET", request_options=request_options
39
+ )
40
+ if 200 <= _response.status_code < 300:
41
+ return
42
+ try:
43
+ _response_json = _response.json()
44
+ except JSONDecodeError:
45
+ raise ApiError(status_code=_response.status_code, body=_response.text)
46
+ raise ApiError(status_code=_response.status_code, body=_response_json)
47
+
48
+ def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
49
+ """
50
+ Perform an action with the selected items from a specific view.
51
+
52
+ Parameters
53
+ ----------
54
+ request_options : typing.Optional[RequestOptions]
55
+ Request-specific configuration.
56
+
57
+ Returns
58
+ -------
59
+ None
60
+
61
+ Examples
62
+ --------
63
+ from label_studio_sdk.client import LabelStudio
64
+
65
+ client = LabelStudio(
66
+ api_key="YOUR_API_KEY",
67
+ )
68
+ client.actions.create()
69
+ """
70
+ _response = self._client_wrapper.httpx_client.request(
71
+ "api/dm/actions/", method="POST", request_options=request_options
72
+ )
73
+ if 200 <= _response.status_code < 300:
74
+ return
75
+ try:
76
+ _response_json = _response.json()
77
+ except JSONDecodeError:
78
+ raise ApiError(status_code=_response.status_code, body=_response.text)
79
+ raise ApiError(status_code=_response.status_code, body=_response_json)
80
+
81
+
82
+ class AsyncActionsClient:
83
+ def __init__(self, *, client_wrapper: AsyncClientWrapper):
84
+ self._client_wrapper = client_wrapper
85
+
86
+ async def list(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
87
+ """
88
+ Retrieve all the registered actions with descriptions that data manager can use.
89
+
90
+ Parameters
91
+ ----------
92
+ request_options : typing.Optional[RequestOptions]
93
+ Request-specific configuration.
94
+
95
+ Returns
96
+ -------
97
+ None
98
+
99
+ Examples
100
+ --------
101
+ from label_studio_sdk.client import AsyncLabelStudio
102
+
103
+ client = AsyncLabelStudio(
104
+ api_key="YOUR_API_KEY",
105
+ )
106
+ await client.actions.list()
107
+ """
108
+ _response = await self._client_wrapper.httpx_client.request(
109
+ "api/dm/actions/", method="GET", request_options=request_options
110
+ )
111
+ if 200 <= _response.status_code < 300:
112
+ return
113
+ try:
114
+ _response_json = _response.json()
115
+ except JSONDecodeError:
116
+ raise ApiError(status_code=_response.status_code, body=_response.text)
117
+ raise ApiError(status_code=_response.status_code, body=_response_json)
118
+
119
+ async def create(self, *, request_options: typing.Optional[RequestOptions] = None) -> None:
120
+ """
121
+ Perform an action with the selected items from a specific view.
122
+
123
+ Parameters
124
+ ----------
125
+ request_options : typing.Optional[RequestOptions]
126
+ Request-specific configuration.
127
+
128
+ Returns
129
+ -------
130
+ None
131
+
132
+ Examples
133
+ --------
134
+ from label_studio_sdk.client import AsyncLabelStudio
135
+
136
+ client = AsyncLabelStudio(
137
+ api_key="YOUR_API_KEY",
138
+ )
139
+ await client.actions.create()
140
+ """
141
+ _response = await self._client_wrapper.httpx_client.request(
142
+ "api/dm/actions/", method="POST", request_options=request_options
143
+ )
144
+ if 200 <= _response.status_code < 300:
145
+ return
146
+ try:
147
+ _response_json = _response.json()
148
+ except JSONDecodeError:
149
+ raise ApiError(status_code=_response.status_code, body=_response.text)
150
+ raise ApiError(status_code=_response.status_code, body=_response_json)
@@ -0,0 +1,2 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+