rapidata 0.1.3__py3-none-any.whl → 0.1.6__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 (225) hide show
  1. openapi/openapi-client/openapi_client/__init__.py +215 -0
  2. openapi/openapi-client/openapi_client/api/__init__.py +11 -0
  3. openapi/openapi-client/openapi_client/api/coco_api.py +619 -0
  4. openapi/openapi-client/openapi_client/api/datapoint_api.py +817 -0
  5. openapi/openapi-client/openapi_client/api/dataset_api.py +2290 -0
  6. openapi/openapi-client/openapi_client/api/identity_api.py +3181 -0
  7. openapi/openapi-client/openapi_client/api/newsletter_api.py +571 -0
  8. openapi/openapi-client/openapi_client/api/order_api.py +5390 -0
  9. openapi/openapi-client/openapi_client/api/validation_api.py +1670 -0
  10. openapi/openapi-client/openapi_client/api_client.py +797 -0
  11. openapi/openapi-client/openapi_client/api_response.py +21 -0
  12. openapi/openapi-client/openapi_client/configuration.py +479 -0
  13. openapi/openapi-client/openapi_client/exceptions.py +199 -0
  14. openapi/openapi-client/openapi_client/models/__init__.py +192 -0
  15. openapi/openapi-client/openapi_client/models/add_validation_rapid_model.py +116 -0
  16. openapi/openapi-client/openapi_client/models/add_validation_rapid_model_payload.py +238 -0
  17. openapi/openapi-client/openapi_client/models/add_validation_rapid_model_truth.py +238 -0
  18. openapi/openapi-client/openapi_client/models/admin_order_model.py +103 -0
  19. openapi/openapi-client/openapi_client/models/admin_order_model_paged_result.py +105 -0
  20. openapi/openapi-client/openapi_client/models/age_group.py +40 -0
  21. openapi/openapi-client/openapi_client/models/age_user_filter_model.py +97 -0
  22. openapi/openapi-client/openapi_client/models/aggregator_type.py +46 -0
  23. openapi/openapi-client/openapi_client/models/attach_category_rapid_blueprint.py +98 -0
  24. openapi/openapi-client/openapi_client/models/attach_category_truth.py +96 -0
  25. openapi/openapi-client/openapi_client/models/base_error.py +90 -0
  26. openapi/openapi-client/openapi_client/models/bounding_box_payload.py +96 -0
  27. openapi/openapi-client/openapi_client/models/bounding_box_rapid_blueprint.py +96 -0
  28. openapi/openapi-client/openapi_client/models/bounding_box_truth.py +102 -0
  29. openapi/openapi-client/openapi_client/models/box_shape.py +122 -0
  30. openapi/openapi-client/openapi_client/models/classification_metadata.py +110 -0
  31. openapi/openapi-client/openapi_client/models/classification_metadata_filter_config.py +96 -0
  32. openapi/openapi-client/openapi_client/models/classify_payload.py +98 -0
  33. openapi/openapi-client/openapi_client/models/clone_dataset_model.py +98 -0
  34. openapi/openapi-client/openapi_client/models/clone_order_model.py +89 -0
  35. openapi/openapi-client/openapi_client/models/clone_order_result.py +89 -0
  36. openapi/openapi-client/openapi_client/models/compare_payload.py +96 -0
  37. openapi/openapi-client/openapi_client/models/compare_rapid_blueprint.py +96 -0
  38. openapi/openapi-client/openapi_client/models/compare_truth.py +96 -0
  39. openapi/openapi-client/openapi_client/models/compare_workflow_config.py +143 -0
  40. openapi/openapi-client/openapi_client/models/compare_workflow_config_rapid_selection_configs_inner.py +210 -0
  41. openapi/openapi-client/openapi_client/models/compare_workflow_config_referee.py +154 -0
  42. openapi/openapi-client/openapi_client/models/compare_workflow_model.py +106 -0
  43. openapi/openapi-client/openapi_client/models/conditional_validation_rapid_selection_config.py +113 -0
  44. openapi/openapi-client/openapi_client/models/correlated_rapid_selection_config.py +98 -0
  45. openapi/openapi-client/openapi_client/models/count_classification_metadata_filter_config.py +94 -0
  46. openapi/openapi-client/openapi_client/models/count_metadata.py +110 -0
  47. openapi/openapi-client/openapi_client/models/country_user_filter_model.py +96 -0
  48. openapi/openapi-client/openapi_client/models/create_client_model.py +89 -0
  49. openapi/openapi-client/openapi_client/models/create_complex_order_model.py +95 -0
  50. openapi/openapi-client/openapi_client/models/create_complex_order_model_pipeline.py +126 -0
  51. openapi/openapi-client/openapi_client/models/create_complex_order_result.py +96 -0
  52. openapi/openapi-client/openapi_client/models/create_dataset_artifact_model.py +102 -0
  53. openapi/openapi-client/openapi_client/models/create_dataset_artifact_model_dataset.py +126 -0
  54. openapi/openapi-client/openapi_client/models/create_default_order_model.py +109 -0
  55. openapi/openapi-client/openapi_client/models/create_default_order_model_workflow_config.py +140 -0
  56. openapi/openapi-client/openapi_client/models/create_empty_validation_set_result.py +87 -0
  57. openapi/openapi-client/openapi_client/models/create_legacy_order_result.py +89 -0
  58. openapi/openapi-client/openapi_client/models/create_order_model.py +163 -0
  59. openapi/openapi-client/openapi_client/models/create_order_model_referee.py +126 -0
  60. openapi/openapi-client/openapi_client/models/create_order_model_selections_inner.py +154 -0
  61. openapi/openapi-client/openapi_client/models/create_order_model_user_filters_inner.py +154 -0
  62. openapi/openapi-client/openapi_client/models/create_order_model_workflow.py +140 -0
  63. openapi/openapi-client/openapi_client/models/create_order_result.py +96 -0
  64. openapi/openapi-client/openapi_client/models/create_simple_pipeline_model.py +116 -0
  65. openapi/openapi-client/openapi_client/models/create_simple_pipeline_model_artifacts_inner.py +126 -0
  66. openapi/openapi-client/openapi_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +182 -0
  67. openapi/openapi-client/openapi_client/models/create_unsupported_order_model.py +91 -0
  68. openapi/openapi-client/openapi_client/models/customer_order_model.py +101 -0
  69. openapi/openapi-client/openapi_client/models/customer_order_model_paged_result.py +105 -0
  70. openapi/openapi-client/openapi_client/models/datapoint.py +121 -0
  71. openapi/openapi-client/openapi_client/models/datapoint_asset.py +170 -0
  72. openapi/openapi-client/openapi_client/models/datapoint_get_by_id_get200_response.py +126 -0
  73. openapi/openapi-client/openapi_client/models/datapoint_metadata_model.py +97 -0
  74. openapi/openapi-client/openapi_client/models/datapoint_metadata_model_metadata_inner.py +168 -0
  75. openapi/openapi-client/openapi_client/models/datapoint_model.py +95 -0
  76. openapi/openapi-client/openapi_client/models/datapoint_model_asset.py +170 -0
  77. openapi/openapi-client/openapi_client/models/dataset_evaluation_step_model.py +102 -0
  78. openapi/openapi-client/openapi_client/models/demographic_rapid_selection_config.py +96 -0
  79. openapi/openapi-client/openapi_client/models/demographic_selection.py +96 -0
  80. openapi/openapi-client/openapi_client/models/empty_validation_truth.py +94 -0
  81. openapi/openapi-client/openapi_client/models/error_type.py +40 -0
  82. openapi/openapi-client/openapi_client/models/feature_flag.py +89 -0
  83. openapi/openapi-client/openapi_client/models/feature_flag_model.py +89 -0
  84. openapi/openapi-client/openapi_client/models/feedback_model.py +94 -0
  85. openapi/openapi-client/openapi_client/models/file_asset.py +108 -0
  86. openapi/openapi-client/openapi_client/models/file_asset_metadata_inner.py +224 -0
  87. openapi/openapi-client/openapi_client/models/file_asset_model.py +108 -0
  88. openapi/openapi-client/openapi_client/models/filter.py +134 -0
  89. openapi/openapi-client/openapi_client/models/filter_operator.py +44 -0
  90. openapi/openapi-client/openapi_client/models/free_text_payload.py +96 -0
  91. openapi/openapi-client/openapi_client/models/free_text_rapid_blueprint.py +96 -0
  92. openapi/openapi-client/openapi_client/models/gender.py +38 -0
  93. openapi/openapi-client/openapi_client/models/gender_user_filter_model.py +97 -0
  94. openapi/openapi-client/openapi_client/models/get_available_validation_sets_result.py +95 -0
  95. openapi/openapi-client/openapi_client/models/get_datapoints_by_dataset_id_result.py +95 -0
  96. openapi/openapi-client/openapi_client/models/get_dataset_by_id_result.py +87 -0
  97. openapi/openapi-client/openapi_client/models/get_order_by_id_result.py +98 -0
  98. openapi/openapi-client/openapi_client/models/get_order_results_result.py +91 -0
  99. openapi/openapi-client/openapi_client/models/get_public_orders_result.py +95 -0
  100. openapi/openapi-client/openapi_client/models/get_workflow_config_result.py +91 -0
  101. openapi/openapi-client/openapi_client/models/get_workflow_config_result_workflow_config.py +140 -0
  102. openapi/openapi-client/openapi_client/models/image_dimension_metadata.py +112 -0
  103. openapi/openapi-client/openapi_client/models/import_from_file_result.py +87 -0
  104. openapi/openapi-client/openapi_client/models/import_validation_set_from_file_result.py +87 -0
  105. openapi/openapi-client/openapi_client/models/issue_auth_token_result.py +87 -0
  106. openapi/openapi-client/openapi_client/models/issue_client_auth_token_result.py +87 -0
  107. openapi/openapi-client/openapi_client/models/labeling_selection.py +96 -0
  108. openapi/openapi-client/openapi_client/models/line_payload.py +96 -0
  109. openapi/openapi-client/openapi_client/models/line_rapid_blueprint.py +96 -0
  110. openapi/openapi-client/openapi_client/models/line_truth.py +94 -0
  111. openapi/openapi-client/openapi_client/models/locate_box_truth.py +104 -0
  112. openapi/openapi-client/openapi_client/models/locate_payload.py +96 -0
  113. openapi/openapi-client/openapi_client/models/locate_rapid_blueprint.py +96 -0
  114. openapi/openapi-client/openapi_client/models/location_metadata.py +112 -0
  115. openapi/openapi-client/openapi_client/models/location_metadata_exists_filter_config.py +94 -0
  116. openapi/openapi-client/openapi_client/models/logic_operator.py +37 -0
  117. openapi/openapi-client/openapi_client/models/login_model.py +89 -0
  118. openapi/openapi-client/openapi_client/models/metadata_visibilities.py +40 -0
  119. openapi/openapi-client/openapi_client/models/multi_asset.py +116 -0
  120. openapi/openapi-client/openapi_client/models/multi_asset_model.py +118 -0
  121. openapi/openapi-client/openapi_client/models/naive_referee_config.py +96 -0
  122. openapi/openapi-client/openapi_client/models/naive_referee_model.py +96 -0
  123. openapi/openapi-client/openapi_client/models/named_classification.py +100 -0
  124. openapi/openapi-client/openapi_client/models/named_entity_payload.py +98 -0
  125. openapi/openapi-client/openapi_client/models/named_entity_rapid_blueprint.py +98 -0
  126. openapi/openapi-client/openapi_client/models/named_entity_truth.py +104 -0
  127. openapi/openapi-client/openapi_client/models/never_ending_referee_config.py +94 -0
  128. openapi/openapi-client/openapi_client/models/newsletter_model.py +89 -0
  129. openapi/openapi-client/openapi_client/models/no_validation_workflow_rapid_selection_config.py +101 -0
  130. openapi/openapi-client/openapi_client/models/null_asset.py +104 -0
  131. openapi/openapi-client/openapi_client/models/null_asset_model.py +106 -0
  132. openapi/openapi-client/openapi_client/models/only_validation_workflow_rapid_selection_config.py +96 -0
  133. openapi/openapi-client/openapi_client/models/order_model.py +91 -0
  134. openapi/openapi-client/openapi_client/models/order_query_get200_response.py +137 -0
  135. openapi/openapi-client/openapi_client/models/original_filename_metadata.py +110 -0
  136. openapi/openapi-client/openapi_client/models/page_info.py +94 -0
  137. openapi/openapi-client/openapi_client/models/polygon_payload.py +96 -0
  138. openapi/openapi-client/openapi_client/models/polygon_rapid_blueprint.py +96 -0
  139. openapi/openapi-client/openapi_client/models/polygon_truth.py +94 -0
  140. openapi/openapi-client/openapi_client/models/private_text_metadata_input.py +98 -0
  141. openapi/openapi-client/openapi_client/models/probabilistic_attach_category_referee_config.py +98 -0
  142. openapi/openapi-client/openapi_client/models/prompt_metadata.py +110 -0
  143. openapi/openapi-client/openapi_client/models/prompt_metadata_input.py +98 -0
  144. openapi/openapi-client/openapi_client/models/public_text_metadata_input.py +98 -0
  145. openapi/openapi-client/openapi_client/models/query_orders_model.py +112 -0
  146. openapi/openapi-client/openapi_client/models/query_validation_set_model.py +112 -0
  147. openapi/openapi-client/openapi_client/models/request_password_reset_command.py +98 -0
  148. openapi/openapi-client/openapi_client/models/root_filter.py +107 -0
  149. openapi/openapi-client/openapi_client/models/send_completion_mail_step_model.py +98 -0
  150. openapi/openapi-client/openapi_client/models/signup_customer_model.py +93 -0
  151. openapi/openapi-client/openapi_client/models/signup_shadow_customer_model.py +87 -0
  152. openapi/openapi-client/openapi_client/models/simple_workflow_config.py +137 -0
  153. openapi/openapi-client/openapi_client/models/simple_workflow_config_blueprint.py +238 -0
  154. openapi/openapi-client/openapi_client/models/simple_workflow_model.py +100 -0
  155. openapi/openapi-client/openapi_client/models/simple_workflow_model_blueprint.py +238 -0
  156. openapi/openapi-client/openapi_client/models/sort_criterion.py +96 -0
  157. openapi/openapi-client/openapi_client/models/sort_direction.py +37 -0
  158. openapi/openapi-client/openapi_client/models/static_rapid_selection_config.py +96 -0
  159. openapi/openapi-client/openapi_client/models/submit_coco_model.py +91 -0
  160. openapi/openapi-client/openapi_client/models/submit_coco_result.py +87 -0
  161. openapi/openapi-client/openapi_client/models/submit_password_reset_command.py +102 -0
  162. openapi/openapi-client/openapi_client/models/text_asset.py +106 -0
  163. openapi/openapi-client/openapi_client/models/text_asset_model.py +108 -0
  164. openapi/openapi-client/openapi_client/models/text_metadata.py +107 -0
  165. openapi/openapi-client/openapi_client/models/transcription_metadata.py +107 -0
  166. openapi/openapi-client/openapi_client/models/transcription_metadata_input.py +98 -0
  167. openapi/openapi-client/openapi_client/models/transcription_payload.py +106 -0
  168. openapi/openapi-client/openapi_client/models/transcription_rapid_blueprint.py +96 -0
  169. openapi/openapi-client/openapi_client/models/transcription_truth.py +106 -0
  170. openapi/openapi-client/openapi_client/models/transcription_word.py +89 -0
  171. openapi/openapi-client/openapi_client/models/unlock_order_result.py +87 -0
  172. openapi/openapi-client/openapi_client/models/update_access_model.py +87 -0
  173. openapi/openapi-client/openapi_client/models/update_order_model.py +87 -0
  174. openapi/openapi-client/openapi_client/models/update_workflow_config_model.py +100 -0
  175. openapi/openapi-client/openapi_client/models/update_workflow_config_model_workflow_config.py +140 -0
  176. openapi/openapi-client/openapi_client/models/upload_coco_result.py +91 -0
  177. openapi/openapi-client/openapi_client/models/upload_datapoints_result.py +97 -0
  178. openapi/openapi-client/openapi_client/models/upload_files_from_s3_bucket_model.py +116 -0
  179. openapi/openapi-client/openapi_client/models/upload_text_sources_to_dataset_model.py +89 -0
  180. openapi/openapi-client/openapi_client/models/validation_chance.py +91 -0
  181. openapi/openapi-client/openapi_client/models/validation_import_post_request_blueprint.py +238 -0
  182. openapi/openapi-client/openapi_client/models/validation_rapid_selection_config.py +98 -0
  183. openapi/openapi-client/openapi_client/models/validation_selection.py +98 -0
  184. openapi/openapi-client/openapi_client/models/validation_set.py +105 -0
  185. openapi/openapi-client/openapi_client/models/validation_set_overview_model.py +91 -0
  186. openapi/openapi-client/openapi_client/models/validation_set_paged_result.py +105 -0
  187. openapi/openapi-client/openapi_client/models/workflow_aggregation_step_model.py +112 -0
  188. openapi/openapi-client/openapi_client/models/workflow_labeling_step_model.py +96 -0
  189. openapi/openapi-client/openapi_client/models/workflow_split_model.py +110 -0
  190. openapi/openapi-client/openapi_client/models/workflow_split_model_filter_configs_inner.py +154 -0
  191. openapi/openapi-client/openapi_client/rest.py +257 -0
  192. rapidata/rapidata_client/{workflow/feature_flags → feature_flags}/feature_flags.py +5 -3
  193. rapidata/rapidata_client/metadata/__init__.py +0 -0
  194. rapidata/rapidata_client/metadata/base_metadata.py +12 -0
  195. rapidata/rapidata_client/metadata/transcription_metadata.py +19 -0
  196. rapidata/rapidata_client/order/dataset/rapidata_dataset.py +42 -16
  197. rapidata/rapidata_client/order/dataset/validation_set_builder.py +187 -0
  198. rapidata/rapidata_client/order/rapidata_order.py +49 -23
  199. rapidata/rapidata_client/order/rapidata_order_builder.py +126 -8
  200. rapidata/rapidata_client/rapidata_client.py +17 -5
  201. rapidata/rapidata_client/{workflow/referee → referee}/base_referee.py +8 -2
  202. rapidata/rapidata_client/{workflow/referee → referee}/classify_early_stopping_referee.py +1 -1
  203. rapidata/rapidata_client/{workflow/referee → referee}/naive_referee.py +5 -1
  204. rapidata/rapidata_client/workflow/__init__.py +0 -2
  205. rapidata/rapidata_client/workflow/base_workflow.py +9 -5
  206. rapidata/rapidata_client/workflow/classify_workflow.py +18 -3
  207. rapidata/rapidata_client/workflow/compare_workflow.py +13 -14
  208. rapidata/rapidata_client/workflow/free_text_workflow.py +14 -0
  209. rapidata/rapidata_client/workflow/transcription_workflow.py +22 -0
  210. rapidata/service/__init__.py +0 -1
  211. rapidata/service/openapi_service.py +43 -0
  212. {rapidata-0.1.3.dist-info → rapidata-0.1.6.dist-info}/METADATA +2 -2
  213. rapidata-0.1.6.dist-info/RECORD +227 -0
  214. rapidata/service/rapidata_api_services/base_service.py +0 -76
  215. rapidata/service/rapidata_api_services/dataset_service.py +0 -82
  216. rapidata/service/rapidata_api_services/order_service.py +0 -49
  217. rapidata/service/rapidata_api_services/rapidata_service.py +0 -18
  218. rapidata-0.1.3.dist-info/RECORD +0 -34
  219. /rapidata/service/rapidata_api_services/__init__.py → /openapi/openapi-client/openapi_client/py.typed +0 -0
  220. /rapidata/rapidata_client/{workflow/country_codes → country_codes}/__init__.py +0 -0
  221. /rapidata/rapidata_client/{workflow/country_codes → country_codes}/country_codes.py +0 -0
  222. /rapidata/rapidata_client/{workflow/feature_flags → feature_flags}/__init__.py +0 -0
  223. /rapidata/rapidata_client/{workflow/referee → referee}/__init__.py +0 -0
  224. {rapidata-0.1.3.dist-info → rapidata-0.1.6.dist-info}/LICENSE +0 -0
  225. {rapidata-0.1.3.dist-info → rapidata-0.1.6.dist-info}/WHEEL +0 -0
@@ -0,0 +1,619 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictBytes, StrictStr
20
+ from typing import Optional, Tuple, Union
21
+ from typing_extensions import Annotated
22
+ from openapi_client.models.submit_coco_model import SubmitCocoModel
23
+ from openapi_client.models.submit_coco_result import SubmitCocoResult
24
+ from openapi_client.models.upload_coco_result import UploadCocoResult
25
+
26
+ from openapi_client.api_client import ApiClient, RequestSerialized
27
+ from openapi_client.api_response import ApiResponse
28
+ from openapi_client.rest import RESTResponseType
29
+
30
+
31
+ class CocoApi:
32
+ """NOTE: This class is auto generated by OpenAPI Generator
33
+ Ref: https://openapi-generator.tech
34
+
35
+ Do not edit the class manually.
36
+ """
37
+
38
+ def __init__(self, api_client=None) -> None:
39
+ if api_client is None:
40
+ api_client = ApiClient.get_default()
41
+ self.api_client = api_client
42
+
43
+
44
+ @validate_call
45
+ def coco_submit_post(
46
+ self,
47
+ submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
48
+ _request_timeout: Union[
49
+ None,
50
+ Annotated[StrictFloat, Field(gt=0)],
51
+ Tuple[
52
+ Annotated[StrictFloat, Field(gt=0)],
53
+ Annotated[StrictFloat, Field(gt=0)]
54
+ ]
55
+ ] = None,
56
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
57
+ _content_type: Optional[StrictStr] = None,
58
+ _headers: Optional[Dict[StrictStr, Any]] = None,
59
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
60
+ ) -> SubmitCocoResult:
61
+ """Creates a new validation set based on a previously uploaded CoCo set.
62
+
63
+
64
+ :param submit_coco_model: The model containing the information needed to create the validation set.
65
+ :type submit_coco_model: SubmitCocoModel
66
+ :param _request_timeout: timeout setting for this request. If one
67
+ number provided, it will be total request
68
+ timeout. It can also be a pair (tuple) of
69
+ (connection, read) timeouts.
70
+ :type _request_timeout: int, tuple(int, int), optional
71
+ :param _request_auth: set to override the auth_settings for an a single
72
+ request; this effectively ignores the
73
+ authentication in the spec for a single request.
74
+ :type _request_auth: dict, optional
75
+ :param _content_type: force content-type for the request.
76
+ :type _content_type: str, Optional
77
+ :param _headers: set to override the headers for a single
78
+ request; this effectively ignores the headers
79
+ in the spec for a single request.
80
+ :type _headers: dict, optional
81
+ :param _host_index: set to override the host_index for a single
82
+ request; this effectively ignores the host_index
83
+ in the spec for a single request.
84
+ :type _host_index: int, optional
85
+ :return: Returns the result object.
86
+ """ # noqa: E501
87
+
88
+ _param = self._coco_submit_post_serialize(
89
+ submit_coco_model=submit_coco_model,
90
+ _request_auth=_request_auth,
91
+ _content_type=_content_type,
92
+ _headers=_headers,
93
+ _host_index=_host_index
94
+ )
95
+
96
+ _response_types_map: Dict[str, Optional[str]] = {
97
+ '200': "SubmitCocoResult",
98
+ }
99
+ response_data = self.api_client.call_api(
100
+ *_param,
101
+ _request_timeout=_request_timeout
102
+ )
103
+ response_data.read()
104
+ return self.api_client.response_deserialize(
105
+ response_data=response_data,
106
+ response_types_map=_response_types_map,
107
+ ).data
108
+
109
+
110
+ @validate_call
111
+ def coco_submit_post_with_http_info(
112
+ self,
113
+ submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
114
+ _request_timeout: Union[
115
+ None,
116
+ Annotated[StrictFloat, Field(gt=0)],
117
+ Tuple[
118
+ Annotated[StrictFloat, Field(gt=0)],
119
+ Annotated[StrictFloat, Field(gt=0)]
120
+ ]
121
+ ] = None,
122
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
123
+ _content_type: Optional[StrictStr] = None,
124
+ _headers: Optional[Dict[StrictStr, Any]] = None,
125
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
126
+ ) -> ApiResponse[SubmitCocoResult]:
127
+ """Creates a new validation set based on a previously uploaded CoCo set.
128
+
129
+
130
+ :param submit_coco_model: The model containing the information needed to create the validation set.
131
+ :type submit_coco_model: SubmitCocoModel
132
+ :param _request_timeout: timeout setting for this request. If one
133
+ number provided, it will be total request
134
+ timeout. It can also be a pair (tuple) of
135
+ (connection, read) timeouts.
136
+ :type _request_timeout: int, tuple(int, int), optional
137
+ :param _request_auth: set to override the auth_settings for an a single
138
+ request; this effectively ignores the
139
+ authentication in the spec for a single request.
140
+ :type _request_auth: dict, optional
141
+ :param _content_type: force content-type for the request.
142
+ :type _content_type: str, Optional
143
+ :param _headers: set to override the headers for a single
144
+ request; this effectively ignores the headers
145
+ in the spec for a single request.
146
+ :type _headers: dict, optional
147
+ :param _host_index: set to override the host_index for a single
148
+ request; this effectively ignores the host_index
149
+ in the spec for a single request.
150
+ :type _host_index: int, optional
151
+ :return: Returns the result object.
152
+ """ # noqa: E501
153
+
154
+ _param = self._coco_submit_post_serialize(
155
+ submit_coco_model=submit_coco_model,
156
+ _request_auth=_request_auth,
157
+ _content_type=_content_type,
158
+ _headers=_headers,
159
+ _host_index=_host_index
160
+ )
161
+
162
+ _response_types_map: Dict[str, Optional[str]] = {
163
+ '200': "SubmitCocoResult",
164
+ }
165
+ response_data = self.api_client.call_api(
166
+ *_param,
167
+ _request_timeout=_request_timeout
168
+ )
169
+ response_data.read()
170
+ return self.api_client.response_deserialize(
171
+ response_data=response_data,
172
+ response_types_map=_response_types_map,
173
+ )
174
+
175
+
176
+ @validate_call
177
+ def coco_submit_post_without_preload_content(
178
+ self,
179
+ submit_coco_model: Annotated[Optional[SubmitCocoModel], Field(description="The model containing the information needed to create the validation set.")] = None,
180
+ _request_timeout: Union[
181
+ None,
182
+ Annotated[StrictFloat, Field(gt=0)],
183
+ Tuple[
184
+ Annotated[StrictFloat, Field(gt=0)],
185
+ Annotated[StrictFloat, Field(gt=0)]
186
+ ]
187
+ ] = None,
188
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
189
+ _content_type: Optional[StrictStr] = None,
190
+ _headers: Optional[Dict[StrictStr, Any]] = None,
191
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
192
+ ) -> RESTResponseType:
193
+ """Creates a new validation set based on a previously uploaded CoCo set.
194
+
195
+
196
+ :param submit_coco_model: The model containing the information needed to create the validation set.
197
+ :type submit_coco_model: SubmitCocoModel
198
+ :param _request_timeout: timeout setting for this request. If one
199
+ number provided, it will be total request
200
+ timeout. It can also be a pair (tuple) of
201
+ (connection, read) timeouts.
202
+ :type _request_timeout: int, tuple(int, int), optional
203
+ :param _request_auth: set to override the auth_settings for an a single
204
+ request; this effectively ignores the
205
+ authentication in the spec for a single request.
206
+ :type _request_auth: dict, optional
207
+ :param _content_type: force content-type for the request.
208
+ :type _content_type: str, Optional
209
+ :param _headers: set to override the headers for a single
210
+ request; this effectively ignores the headers
211
+ in the spec for a single request.
212
+ :type _headers: dict, optional
213
+ :param _host_index: set to override the host_index for a single
214
+ request; this effectively ignores the host_index
215
+ in the spec for a single request.
216
+ :type _host_index: int, optional
217
+ :return: Returns the result object.
218
+ """ # noqa: E501
219
+
220
+ _param = self._coco_submit_post_serialize(
221
+ submit_coco_model=submit_coco_model,
222
+ _request_auth=_request_auth,
223
+ _content_type=_content_type,
224
+ _headers=_headers,
225
+ _host_index=_host_index
226
+ )
227
+
228
+ _response_types_map: Dict[str, Optional[str]] = {
229
+ '200': "SubmitCocoResult",
230
+ }
231
+ response_data = self.api_client.call_api(
232
+ *_param,
233
+ _request_timeout=_request_timeout
234
+ )
235
+ return response_data.response
236
+
237
+
238
+ def _coco_submit_post_serialize(
239
+ self,
240
+ submit_coco_model,
241
+ _request_auth,
242
+ _content_type,
243
+ _headers,
244
+ _host_index,
245
+ ) -> RequestSerialized:
246
+
247
+ _host = None
248
+
249
+ _collection_formats: Dict[str, str] = {
250
+ }
251
+
252
+ _path_params: Dict[str, str] = {}
253
+ _query_params: List[Tuple[str, str]] = []
254
+ _header_params: Dict[str, Optional[str]] = _headers or {}
255
+ _form_params: List[Tuple[str, str]] = []
256
+ _files: Dict[
257
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
258
+ ] = {}
259
+ _body_params: Optional[bytes] = None
260
+
261
+ # process the path parameters
262
+ # process the query parameters
263
+ # process the header parameters
264
+ # process the form parameters
265
+ # process the body parameter
266
+ if submit_coco_model is not None:
267
+ _body_params = submit_coco_model
268
+
269
+
270
+ # set the HTTP header `Accept`
271
+ if 'Accept' not in _header_params:
272
+ _header_params['Accept'] = self.api_client.select_header_accept(
273
+ [
274
+ 'text/plain',
275
+ 'application/json',
276
+ 'text/json'
277
+ ]
278
+ )
279
+
280
+ # set the HTTP header `Content-Type`
281
+ if _content_type:
282
+ _header_params['Content-Type'] = _content_type
283
+ else:
284
+ _default_content_type = (
285
+ self.api_client.select_header_content_type(
286
+ [
287
+ 'application/json',
288
+ 'text/json',
289
+ 'application/*+json'
290
+ ]
291
+ )
292
+ )
293
+ if _default_content_type is not None:
294
+ _header_params['Content-Type'] = _default_content_type
295
+
296
+ # authentication setting
297
+ _auth_settings: List[str] = [
298
+ 'bearer'
299
+ ]
300
+
301
+ return self.api_client.param_serialize(
302
+ method='POST',
303
+ resource_path='/Coco/Submit',
304
+ path_params=_path_params,
305
+ query_params=_query_params,
306
+ header_params=_header_params,
307
+ body=_body_params,
308
+ post_params=_form_params,
309
+ files=_files,
310
+ auth_settings=_auth_settings,
311
+ collection_formats=_collection_formats,
312
+ _host=_host,
313
+ _request_auth=_request_auth
314
+ )
315
+
316
+
317
+
318
+
319
+ @validate_call
320
+ def coco_upload_post(
321
+ self,
322
+ name: Annotated[Optional[StrictStr], Field(description="The name to give the newly uploaded CoCo set.")] = None,
323
+ title: Annotated[Optional[StrictStr], Field(description="The title to be used when creating rapids from the CoCo set.")] = None,
324
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file containing the CoCo set.")] = None,
325
+ _request_timeout: Union[
326
+ None,
327
+ Annotated[StrictFloat, Field(gt=0)],
328
+ Tuple[
329
+ Annotated[StrictFloat, Field(gt=0)],
330
+ Annotated[StrictFloat, Field(gt=0)]
331
+ ]
332
+ ] = None,
333
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
334
+ _content_type: Optional[StrictStr] = None,
335
+ _headers: Optional[Dict[StrictStr, Any]] = None,
336
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
337
+ ) -> UploadCocoResult:
338
+ """Uploads a CoCo set to the system.
339
+
340
+
341
+ :param name: The name to give the newly uploaded CoCo set.
342
+ :type name: str
343
+ :param title: The title to be used when creating rapids from the CoCo set.
344
+ :type title: str
345
+ :param file: The file containing the CoCo set.
346
+ :type file: bytearray
347
+ :param _request_timeout: timeout setting for this request. If one
348
+ number provided, it will be total request
349
+ timeout. It can also be a pair (tuple) of
350
+ (connection, read) timeouts.
351
+ :type _request_timeout: int, tuple(int, int), optional
352
+ :param _request_auth: set to override the auth_settings for an a single
353
+ request; this effectively ignores the
354
+ authentication in the spec for a single request.
355
+ :type _request_auth: dict, optional
356
+ :param _content_type: force content-type for the request.
357
+ :type _content_type: str, Optional
358
+ :param _headers: set to override the headers for a single
359
+ request; this effectively ignores the headers
360
+ in the spec for a single request.
361
+ :type _headers: dict, optional
362
+ :param _host_index: set to override the host_index for a single
363
+ request; this effectively ignores the host_index
364
+ in the spec for a single request.
365
+ :type _host_index: int, optional
366
+ :return: Returns the result object.
367
+ """ # noqa: E501
368
+
369
+ _param = self._coco_upload_post_serialize(
370
+ name=name,
371
+ title=title,
372
+ file=file,
373
+ _request_auth=_request_auth,
374
+ _content_type=_content_type,
375
+ _headers=_headers,
376
+ _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ '200': "UploadCocoResult",
381
+ }
382
+ response_data = self.api_client.call_api(
383
+ *_param,
384
+ _request_timeout=_request_timeout
385
+ )
386
+ response_data.read()
387
+ return self.api_client.response_deserialize(
388
+ response_data=response_data,
389
+ response_types_map=_response_types_map,
390
+ ).data
391
+
392
+
393
+ @validate_call
394
+ def coco_upload_post_with_http_info(
395
+ self,
396
+ name: Annotated[Optional[StrictStr], Field(description="The name to give the newly uploaded CoCo set.")] = None,
397
+ title: Annotated[Optional[StrictStr], Field(description="The title to be used when creating rapids from the CoCo set.")] = None,
398
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file containing the CoCo set.")] = None,
399
+ _request_timeout: Union[
400
+ None,
401
+ Annotated[StrictFloat, Field(gt=0)],
402
+ Tuple[
403
+ Annotated[StrictFloat, Field(gt=0)],
404
+ Annotated[StrictFloat, Field(gt=0)]
405
+ ]
406
+ ] = None,
407
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
408
+ _content_type: Optional[StrictStr] = None,
409
+ _headers: Optional[Dict[StrictStr, Any]] = None,
410
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
411
+ ) -> ApiResponse[UploadCocoResult]:
412
+ """Uploads a CoCo set to the system.
413
+
414
+
415
+ :param name: The name to give the newly uploaded CoCo set.
416
+ :type name: str
417
+ :param title: The title to be used when creating rapids from the CoCo set.
418
+ :type title: str
419
+ :param file: The file containing the CoCo set.
420
+ :type file: bytearray
421
+ :param _request_timeout: timeout setting for this request. If one
422
+ number provided, it will be total request
423
+ timeout. It can also be a pair (tuple) of
424
+ (connection, read) timeouts.
425
+ :type _request_timeout: int, tuple(int, int), optional
426
+ :param _request_auth: set to override the auth_settings for an a single
427
+ request; this effectively ignores the
428
+ authentication in the spec for a single request.
429
+ :type _request_auth: dict, optional
430
+ :param _content_type: force content-type for the request.
431
+ :type _content_type: str, Optional
432
+ :param _headers: set to override the headers for a single
433
+ request; this effectively ignores the headers
434
+ in the spec for a single request.
435
+ :type _headers: dict, optional
436
+ :param _host_index: set to override the host_index for a single
437
+ request; this effectively ignores the host_index
438
+ in the spec for a single request.
439
+ :type _host_index: int, optional
440
+ :return: Returns the result object.
441
+ """ # noqa: E501
442
+
443
+ _param = self._coco_upload_post_serialize(
444
+ name=name,
445
+ title=title,
446
+ file=file,
447
+ _request_auth=_request_auth,
448
+ _content_type=_content_type,
449
+ _headers=_headers,
450
+ _host_index=_host_index
451
+ )
452
+
453
+ _response_types_map: Dict[str, Optional[str]] = {
454
+ '200': "UploadCocoResult",
455
+ }
456
+ response_data = self.api_client.call_api(
457
+ *_param,
458
+ _request_timeout=_request_timeout
459
+ )
460
+ response_data.read()
461
+ return self.api_client.response_deserialize(
462
+ response_data=response_data,
463
+ response_types_map=_response_types_map,
464
+ )
465
+
466
+
467
+ @validate_call
468
+ def coco_upload_post_without_preload_content(
469
+ self,
470
+ name: Annotated[Optional[StrictStr], Field(description="The name to give the newly uploaded CoCo set.")] = None,
471
+ title: Annotated[Optional[StrictStr], Field(description="The title to be used when creating rapids from the CoCo set.")] = None,
472
+ file: Annotated[Optional[Union[StrictBytes, StrictStr, Tuple[StrictStr, StrictBytes]]], Field(description="The file containing the CoCo set.")] = None,
473
+ _request_timeout: Union[
474
+ None,
475
+ Annotated[StrictFloat, Field(gt=0)],
476
+ Tuple[
477
+ Annotated[StrictFloat, Field(gt=0)],
478
+ Annotated[StrictFloat, Field(gt=0)]
479
+ ]
480
+ ] = None,
481
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
482
+ _content_type: Optional[StrictStr] = None,
483
+ _headers: Optional[Dict[StrictStr, Any]] = None,
484
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
485
+ ) -> RESTResponseType:
486
+ """Uploads a CoCo set to the system.
487
+
488
+
489
+ :param name: The name to give the newly uploaded CoCo set.
490
+ :type name: str
491
+ :param title: The title to be used when creating rapids from the CoCo set.
492
+ :type title: str
493
+ :param file: The file containing the CoCo set.
494
+ :type file: bytearray
495
+ :param _request_timeout: timeout setting for this request. If one
496
+ number provided, it will be total request
497
+ timeout. It can also be a pair (tuple) of
498
+ (connection, read) timeouts.
499
+ :type _request_timeout: int, tuple(int, int), optional
500
+ :param _request_auth: set to override the auth_settings for an a single
501
+ request; this effectively ignores the
502
+ authentication in the spec for a single request.
503
+ :type _request_auth: dict, optional
504
+ :param _content_type: force content-type for the request.
505
+ :type _content_type: str, Optional
506
+ :param _headers: set to override the headers for a single
507
+ request; this effectively ignores the headers
508
+ in the spec for a single request.
509
+ :type _headers: dict, optional
510
+ :param _host_index: set to override the host_index for a single
511
+ request; this effectively ignores the host_index
512
+ in the spec for a single request.
513
+ :type _host_index: int, optional
514
+ :return: Returns the result object.
515
+ """ # noqa: E501
516
+
517
+ _param = self._coco_upload_post_serialize(
518
+ name=name,
519
+ title=title,
520
+ file=file,
521
+ _request_auth=_request_auth,
522
+ _content_type=_content_type,
523
+ _headers=_headers,
524
+ _host_index=_host_index
525
+ )
526
+
527
+ _response_types_map: Dict[str, Optional[str]] = {
528
+ '200': "UploadCocoResult",
529
+ }
530
+ response_data = self.api_client.call_api(
531
+ *_param,
532
+ _request_timeout=_request_timeout
533
+ )
534
+ return response_data.response
535
+
536
+
537
+ def _coco_upload_post_serialize(
538
+ self,
539
+ name,
540
+ title,
541
+ file,
542
+ _request_auth,
543
+ _content_type,
544
+ _headers,
545
+ _host_index,
546
+ ) -> RequestSerialized:
547
+
548
+ _host = None
549
+
550
+ _collection_formats: Dict[str, str] = {
551
+ }
552
+
553
+ _path_params: Dict[str, str] = {}
554
+ _query_params: List[Tuple[str, str]] = []
555
+ _header_params: Dict[str, Optional[str]] = _headers or {}
556
+ _form_params: List[Tuple[str, str]] = []
557
+ _files: Dict[
558
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
559
+ ] = {}
560
+ _body_params: Optional[bytes] = None
561
+
562
+ # process the path parameters
563
+ # process the query parameters
564
+ # process the header parameters
565
+ # process the form parameters
566
+ if name is not None:
567
+ _form_params.append(('Name', name))
568
+ if title is not None:
569
+ _form_params.append(('Title', title))
570
+ if file is not None:
571
+ _files['File'] = file
572
+ # process the body parameter
573
+
574
+
575
+ # set the HTTP header `Accept`
576
+ if 'Accept' not in _header_params:
577
+ _header_params['Accept'] = self.api_client.select_header_accept(
578
+ [
579
+ 'text/plain',
580
+ 'application/json',
581
+ 'text/json'
582
+ ]
583
+ )
584
+
585
+ # set the HTTP header `Content-Type`
586
+ if _content_type:
587
+ _header_params['Content-Type'] = _content_type
588
+ else:
589
+ _default_content_type = (
590
+ self.api_client.select_header_content_type(
591
+ [
592
+ 'multipart/form-data'
593
+ ]
594
+ )
595
+ )
596
+ if _default_content_type is not None:
597
+ _header_params['Content-Type'] = _default_content_type
598
+
599
+ # authentication setting
600
+ _auth_settings: List[str] = [
601
+ 'bearer'
602
+ ]
603
+
604
+ return self.api_client.param_serialize(
605
+ method='POST',
606
+ resource_path='/Coco/Upload',
607
+ path_params=_path_params,
608
+ query_params=_query_params,
609
+ header_params=_header_params,
610
+ body=_body_params,
611
+ post_params=_form_params,
612
+ files=_files,
613
+ auth_settings=_auth_settings,
614
+ collection_formats=_collection_formats,
615
+ _host=_host,
616
+ _request_auth=_request_auth
617
+ )
618
+
619
+