scorable 1.6.4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of scorable might be problematic. Click here for more details.

Files changed (228) hide show
  1. root/__about__.py +4 -0
  2. root/__init__.py +17 -0
  3. root/client.py +207 -0
  4. root/datasets.py +231 -0
  5. root/execution_logs.py +162 -0
  6. root/generated/__init__.py +0 -0
  7. root/generated/openapi_aclient/__init__.py +1 -0
  8. root/generated/openapi_aclient/api/__init__.py +1 -0
  9. root/generated/openapi_aclient/api/datasets_api.py +1274 -0
  10. root/generated/openapi_aclient/api/evaluators_api.py +3641 -0
  11. root/generated/openapi_aclient/api/execution_logs_api.py +751 -0
  12. root/generated/openapi_aclient/api/judges_api.py +3794 -0
  13. root/generated/openapi_aclient/api/models_api.py +1473 -0
  14. root/generated/openapi_aclient/api/objectives_api.py +1767 -0
  15. root/generated/openapi_aclient/api_client.py +662 -0
  16. root/generated/openapi_aclient/api_response.py +22 -0
  17. root/generated/openapi_aclient/configuration.py +470 -0
  18. root/generated/openapi_aclient/exceptions.py +197 -0
  19. root/generated/openapi_aclient/models/__init__.py +122 -0
  20. root/generated/openapi_aclient/models/data_set_create.py +118 -0
  21. root/generated/openapi_aclient/models/data_set_create_request.py +105 -0
  22. root/generated/openapi_aclient/models/data_set_list.py +129 -0
  23. root/generated/openapi_aclient/models/data_set_type.py +36 -0
  24. root/generated/openapi_aclient/models/dataset_range_request.py +93 -0
  25. root/generated/openapi_aclient/models/evaluator.py +273 -0
  26. root/generated/openapi_aclient/models/evaluator_calibration_output.py +101 -0
  27. root/generated/openapi_aclient/models/evaluator_calibration_result.py +134 -0
  28. root/generated/openapi_aclient/models/evaluator_demonstrations.py +107 -0
  29. root/generated/openapi_aclient/models/evaluator_demonstrations_request.py +107 -0
  30. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_property_request.py +86 -0
  31. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_request.py +109 -0
  32. root/generated/openapi_aclient/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  33. root/generated/openapi_aclient/models/evaluator_execution_function_request.py +99 -0
  34. root/generated/openapi_aclient/models/evaluator_execution_functions_request.py +98 -0
  35. root/generated/openapi_aclient/models/evaluator_execution_functions_type_enum.py +35 -0
  36. root/generated/openapi_aclient/models/evaluator_execution_request.py +134 -0
  37. root/generated/openapi_aclient/models/evaluator_execution_result.py +114 -0
  38. root/generated/openapi_aclient/models/evaluator_inputs_value.py +100 -0
  39. root/generated/openapi_aclient/models/evaluator_inputs_value_items.py +89 -0
  40. root/generated/openapi_aclient/models/evaluator_list_output.py +198 -0
  41. root/generated/openapi_aclient/models/evaluator_reference.py +90 -0
  42. root/generated/openapi_aclient/models/evaluator_reference_request.py +90 -0
  43. root/generated/openapi_aclient/models/evaluator_request.py +194 -0
  44. root/generated/openapi_aclient/models/evaluator_result.py +110 -0
  45. root/generated/openapi_aclient/models/execution_log_details.py +291 -0
  46. root/generated/openapi_aclient/models/execution_log_details_evaluation_context.py +83 -0
  47. root/generated/openapi_aclient/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  48. root/generated/openapi_aclient/models/execution_log_list.py +217 -0
  49. root/generated/openapi_aclient/models/execution_log_list_evaluation_context.py +83 -0
  50. root/generated/openapi_aclient/models/generation_model_params_request.py +93 -0
  51. root/generated/openapi_aclient/models/id.py +87 -0
  52. root/generated/openapi_aclient/models/input_variable.py +121 -0
  53. root/generated/openapi_aclient/models/input_variable_request.py +82 -0
  54. root/generated/openapi_aclient/models/judge.py +178 -0
  55. root/generated/openapi_aclient/models/judge_execution_request.py +114 -0
  56. root/generated/openapi_aclient/models/judge_execution_response.py +97 -0
  57. root/generated/openapi_aclient/models/judge_files_inner.py +84 -0
  58. root/generated/openapi_aclient/models/judge_generator_request.py +142 -0
  59. root/generated/openapi_aclient/models/judge_generator_response.py +88 -0
  60. root/generated/openapi_aclient/models/judge_invite_request.py +87 -0
  61. root/generated/openapi_aclient/models/judge_list.py +156 -0
  62. root/generated/openapi_aclient/models/judge_rectifier_request_request.py +114 -0
  63. root/generated/openapi_aclient/models/judge_rectifier_response.py +121 -0
  64. root/generated/openapi_aclient/models/judge_request.py +108 -0
  65. root/generated/openapi_aclient/models/model.py +126 -0
  66. root/generated/openapi_aclient/models/model_list.py +115 -0
  67. root/generated/openapi_aclient/models/model_params.py +89 -0
  68. root/generated/openapi_aclient/models/model_params_request.py +89 -0
  69. root/generated/openapi_aclient/models/model_request.py +118 -0
  70. root/generated/openapi_aclient/models/nested_evaluator.py +110 -0
  71. root/generated/openapi_aclient/models/nested_evaluator_objective.py +87 -0
  72. root/generated/openapi_aclient/models/nested_evaluator_request.py +92 -0
  73. root/generated/openapi_aclient/models/nested_objective_evaluator.py +105 -0
  74. root/generated/openapi_aclient/models/nested_objective_evaluator_request.py +92 -0
  75. root/generated/openapi_aclient/models/nested_objective_list.py +111 -0
  76. root/generated/openapi_aclient/models/nested_user_details.py +88 -0
  77. root/generated/openapi_aclient/models/nested_user_details_request.py +82 -0
  78. root/generated/openapi_aclient/models/nested_vector_objective.py +88 -0
  79. root/generated/openapi_aclient/models/nested_vector_objective_request.py +82 -0
  80. root/generated/openapi_aclient/models/objective.py +157 -0
  81. root/generated/openapi_aclient/models/objective_list.py +128 -0
  82. root/generated/openapi_aclient/models/objective_request.py +113 -0
  83. root/generated/openapi_aclient/models/objective_validator.py +100 -0
  84. root/generated/openapi_aclient/models/objective_validator_request.py +90 -0
  85. root/generated/openapi_aclient/models/paginated_data_set_list_list.py +111 -0
  86. root/generated/openapi_aclient/models/paginated_evaluator_list.py +111 -0
  87. root/generated/openapi_aclient/models/paginated_evaluator_list_output_list.py +111 -0
  88. root/generated/openapi_aclient/models/paginated_execution_log_list_list.py +111 -0
  89. root/generated/openapi_aclient/models/paginated_judge_list_list.py +111 -0
  90. root/generated/openapi_aclient/models/paginated_model_list_list.py +111 -0
  91. root/generated/openapi_aclient/models/paginated_objective_list.py +111 -0
  92. root/generated/openapi_aclient/models/paginated_objective_list_list.py +111 -0
  93. root/generated/openapi_aclient/models/patched_evaluator_request.py +194 -0
  94. root/generated/openapi_aclient/models/patched_judge_request.py +110 -0
  95. root/generated/openapi_aclient/models/patched_model_request.py +118 -0
  96. root/generated/openapi_aclient/models/patched_objective_request.py +113 -0
  97. root/generated/openapi_aclient/models/provider.py +99 -0
  98. root/generated/openapi_aclient/models/reference_variable.py +123 -0
  99. root/generated/openapi_aclient/models/reference_variable_request.py +83 -0
  100. root/generated/openapi_aclient/models/skill_execution_validator_result.py +130 -0
  101. root/generated/openapi_aclient/models/skill_test_data_request.py +107 -0
  102. root/generated/openapi_aclient/models/skill_test_data_request_dataset_range.py +93 -0
  103. root/generated/openapi_aclient/models/skill_test_input_request.py +171 -0
  104. root/generated/openapi_aclient/models/skill_type_enum.py +36 -0
  105. root/generated/openapi_aclient/models/status_change.py +84 -0
  106. root/generated/openapi_aclient/models/status_change_request.py +84 -0
  107. root/generated/openapi_aclient/models/status_change_status_enum.py +36 -0
  108. root/generated/openapi_aclient/models/status_enum.py +38 -0
  109. root/generated/openapi_aclient/models/validation_result_status.py +36 -0
  110. root/generated/openapi_aclient/models/visibility_enum.py +38 -0
  111. root/generated/openapi_aclient/rest.py +166 -0
  112. root/generated/openapi_aclient_README.md +239 -0
  113. root/generated/openapi_client/__init__.py +1 -0
  114. root/generated/openapi_client/api/__init__.py +1 -0
  115. root/generated/openapi_client/api/datasets_api.py +1274 -0
  116. root/generated/openapi_client/api/evaluators_api.py +3641 -0
  117. root/generated/openapi_client/api/execution_logs_api.py +751 -0
  118. root/generated/openapi_client/api/judges_api.py +3794 -0
  119. root/generated/openapi_client/api/models_api.py +1473 -0
  120. root/generated/openapi_client/api/objectives_api.py +1767 -0
  121. root/generated/openapi_client/api_client.py +659 -0
  122. root/generated/openapi_client/api_response.py +22 -0
  123. root/generated/openapi_client/configuration.py +474 -0
  124. root/generated/openapi_client/exceptions.py +197 -0
  125. root/generated/openapi_client/models/__init__.py +120 -0
  126. root/generated/openapi_client/models/data_set_create.py +118 -0
  127. root/generated/openapi_client/models/data_set_create_request.py +105 -0
  128. root/generated/openapi_client/models/data_set_list.py +129 -0
  129. root/generated/openapi_client/models/data_set_type.py +36 -0
  130. root/generated/openapi_client/models/dataset_range_request.py +93 -0
  131. root/generated/openapi_client/models/evaluator.py +273 -0
  132. root/generated/openapi_client/models/evaluator_calibration_output.py +101 -0
  133. root/generated/openapi_client/models/evaluator_calibration_result.py +134 -0
  134. root/generated/openapi_client/models/evaluator_demonstrations.py +107 -0
  135. root/generated/openapi_client/models/evaluator_demonstrations_request.py +107 -0
  136. root/generated/openapi_client/models/evaluator_execution_function_parameter_property_request.py +86 -0
  137. root/generated/openapi_client/models/evaluator_execution_function_parameter_request.py +109 -0
  138. root/generated/openapi_client/models/evaluator_execution_function_parameter_type_enum.py +35 -0
  139. root/generated/openapi_client/models/evaluator_execution_function_request.py +99 -0
  140. root/generated/openapi_client/models/evaluator_execution_functions_request.py +98 -0
  141. root/generated/openapi_client/models/evaluator_execution_functions_type_enum.py +35 -0
  142. root/generated/openapi_client/models/evaluator_execution_request.py +134 -0
  143. root/generated/openapi_client/models/evaluator_execution_result.py +114 -0
  144. root/generated/openapi_client/models/evaluator_inputs_value.py +100 -0
  145. root/generated/openapi_client/models/evaluator_inputs_value_items.py +89 -0
  146. root/generated/openapi_client/models/evaluator_list_output.py +198 -0
  147. root/generated/openapi_client/models/evaluator_reference.py +90 -0
  148. root/generated/openapi_client/models/evaluator_reference_request.py +90 -0
  149. root/generated/openapi_client/models/evaluator_request.py +194 -0
  150. root/generated/openapi_client/models/evaluator_result.py +110 -0
  151. root/generated/openapi_client/models/execution_log_details.py +291 -0
  152. root/generated/openapi_client/models/execution_log_details_evaluation_context.py +83 -0
  153. root/generated/openapi_client/models/execution_log_details_evaluator_latencies_inner.py +83 -0
  154. root/generated/openapi_client/models/execution_log_list.py +215 -0
  155. root/generated/openapi_client/models/execution_log_list_evaluation_context.py +83 -0
  156. root/generated/openapi_client/models/generation_model_params_request.py +93 -0
  157. root/generated/openapi_client/models/id.py +87 -0
  158. root/generated/openapi_client/models/input_variable.py +121 -0
  159. root/generated/openapi_client/models/input_variable_request.py +82 -0
  160. root/generated/openapi_client/models/judge.py +178 -0
  161. root/generated/openapi_client/models/judge_execution_request.py +114 -0
  162. root/generated/openapi_client/models/judge_execution_response.py +97 -0
  163. root/generated/openapi_client/models/judge_files_inner.py +84 -0
  164. root/generated/openapi_client/models/judge_generator_request.py +142 -0
  165. root/generated/openapi_client/models/judge_generator_response.py +88 -0
  166. root/generated/openapi_client/models/judge_invite_request.py +87 -0
  167. root/generated/openapi_client/models/judge_list.py +156 -0
  168. root/generated/openapi_client/models/judge_rectifier_request_request.py +114 -0
  169. root/generated/openapi_client/models/judge_rectifier_response.py +121 -0
  170. root/generated/openapi_client/models/judge_request.py +108 -0
  171. root/generated/openapi_client/models/model.py +126 -0
  172. root/generated/openapi_client/models/model_list.py +115 -0
  173. root/generated/openapi_client/models/model_params.py +89 -0
  174. root/generated/openapi_client/models/model_params_request.py +89 -0
  175. root/generated/openapi_client/models/model_request.py +118 -0
  176. root/generated/openapi_client/models/nested_evaluator.py +110 -0
  177. root/generated/openapi_client/models/nested_evaluator_objective.py +87 -0
  178. root/generated/openapi_client/models/nested_evaluator_request.py +92 -0
  179. root/generated/openapi_client/models/nested_objective_evaluator.py +105 -0
  180. root/generated/openapi_client/models/nested_objective_evaluator_request.py +92 -0
  181. root/generated/openapi_client/models/nested_objective_list.py +111 -0
  182. root/generated/openapi_client/models/nested_user_details.py +88 -0
  183. root/generated/openapi_client/models/nested_user_details_request.py +82 -0
  184. root/generated/openapi_client/models/nested_vector_objective.py +88 -0
  185. root/generated/openapi_client/models/nested_vector_objective_request.py +82 -0
  186. root/generated/openapi_client/models/objective.py +157 -0
  187. root/generated/openapi_client/models/objective_list.py +128 -0
  188. root/generated/openapi_client/models/objective_request.py +113 -0
  189. root/generated/openapi_client/models/objective_validator.py +100 -0
  190. root/generated/openapi_client/models/objective_validator_request.py +90 -0
  191. root/generated/openapi_client/models/paginated_data_set_list_list.py +111 -0
  192. root/generated/openapi_client/models/paginated_evaluator_list.py +111 -0
  193. root/generated/openapi_client/models/paginated_evaluator_list_output_list.py +111 -0
  194. root/generated/openapi_client/models/paginated_execution_log_list_list.py +111 -0
  195. root/generated/openapi_client/models/paginated_judge_list_list.py +111 -0
  196. root/generated/openapi_client/models/paginated_model_list_list.py +111 -0
  197. root/generated/openapi_client/models/paginated_objective_list.py +111 -0
  198. root/generated/openapi_client/models/paginated_objective_list_list.py +111 -0
  199. root/generated/openapi_client/models/patched_evaluator_request.py +194 -0
  200. root/generated/openapi_client/models/patched_judge_request.py +110 -0
  201. root/generated/openapi_client/models/patched_model_request.py +118 -0
  202. root/generated/openapi_client/models/patched_objective_request.py +113 -0
  203. root/generated/openapi_client/models/provider.py +99 -0
  204. root/generated/openapi_client/models/reference_variable.py +123 -0
  205. root/generated/openapi_client/models/reference_variable_request.py +83 -0
  206. root/generated/openapi_client/models/skill_execution_validator_result.py +130 -0
  207. root/generated/openapi_client/models/skill_test_data_request.py +107 -0
  208. root/generated/openapi_client/models/skill_test_data_request_dataset_range.py +93 -0
  209. root/generated/openapi_client/models/skill_test_input_request.py +171 -0
  210. root/generated/openapi_client/models/skill_type_enum.py +36 -0
  211. root/generated/openapi_client/models/status_change.py +84 -0
  212. root/generated/openapi_client/models/status_change_request.py +84 -0
  213. root/generated/openapi_client/models/status_change_status_enum.py +36 -0
  214. root/generated/openapi_client/models/status_enum.py +38 -0
  215. root/generated/openapi_client/models/validation_result_status.py +36 -0
  216. root/generated/openapi_client/models/visibility_enum.py +38 -0
  217. root/generated/openapi_client/rest.py +203 -0
  218. root/generated/openapi_client_README.md +238 -0
  219. root/judges.py +681 -0
  220. root/models.py +197 -0
  221. root/objectives.py +343 -0
  222. root/py.typed +0 -0
  223. root/skills.py +1707 -0
  224. root/utils.py +90 -0
  225. scorable-1.6.4.dist-info/METADATA +395 -0
  226. scorable-1.6.4.dist-info/RECORD +228 -0
  227. scorable-1.6.4.dist-info/WHEEL +4 -0
  228. scorable-1.6.4.dist-info/licenses/LICENSE +202 -0
@@ -0,0 +1,1274 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Root Signals API
5
+
6
+ Root Signals JSON API provides a way to access Root Signals using provisioned API token
7
+
8
+ The version of the OpenAPI document: 1.0.0 (latest)
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 typing import Any, Dict, List, Optional, Tuple, Union
16
+
17
+ from pydantic import Field, StrictBool, StrictFloat, StrictInt, StrictStr, validate_call
18
+ from typing_extensions import Annotated
19
+
20
+ from root.generated.openapi_client.api_client import ApiClient, RequestSerialized
21
+ from root.generated.openapi_client.api_response import ApiResponse
22
+ from root.generated.openapi_client.models.data_set_create import DataSetCreate
23
+ from root.generated.openapi_client.models.data_set_create_request import DataSetCreateRequest
24
+ from root.generated.openapi_client.models.data_set_list import DataSetList
25
+ from root.generated.openapi_client.models.paginated_data_set_list_list import PaginatedDataSetListList
26
+ from root.generated.openapi_client.models.status_change import StatusChange
27
+ from root.generated.openapi_client.models.status_change_request import StatusChangeRequest
28
+ from root.generated.openapi_client.rest import RESTResponseType
29
+
30
+
31
+ class DatasetsApi:
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
+ @validate_call
44
+ def datasets_create(
45
+ self,
46
+ data_set_create_request: Optional[DataSetCreateRequest] = None,
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
51
+ ] = None,
52
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
53
+ _content_type: Optional[StrictStr] = None,
54
+ _headers: Optional[Dict[StrictStr, Any]] = None,
55
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
56
+ ) -> DataSetCreate:
57
+ """datasets_create
58
+
59
+ Create a new dataset.
60
+
61
+ :param data_set_create_request:
62
+ :type data_set_create_request: DataSetCreateRequest
63
+ :param _request_timeout: timeout setting for this request. If one
64
+ number provided, it will be total request
65
+ timeout. It can also be a pair (tuple) of
66
+ (connection, read) timeouts.
67
+ :type _request_timeout: int, tuple(int, int), optional
68
+ :param _request_auth: set to override the auth_settings for an a single
69
+ request; this effectively ignores the
70
+ authentication in the spec for a single request.
71
+ :type _request_auth: dict, optional
72
+ :param _content_type: force content-type for the request.
73
+ :type _content_type: str, Optional
74
+ :param _headers: set to override the headers for a single
75
+ request; this effectively ignores the headers
76
+ in the spec for a single request.
77
+ :type _headers: dict, optional
78
+ :param _host_index: set to override the host_index for a single
79
+ request; this effectively ignores the host_index
80
+ in the spec for a single request.
81
+ :type _host_index: int, optional
82
+ :return: Returns the result object.
83
+ """ # noqa: E501
84
+
85
+ _param = self._datasets_create_serialize(
86
+ data_set_create_request=data_set_create_request,
87
+ _request_auth=_request_auth,
88
+ _content_type=_content_type,
89
+ _headers=_headers,
90
+ _host_index=_host_index,
91
+ )
92
+
93
+ _response_types_map: Dict[str, Optional[str]] = {
94
+ "201": "DataSetCreate",
95
+ }
96
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
97
+ response_data.read()
98
+ return self.api_client.response_deserialize(
99
+ response_data=response_data,
100
+ response_types_map=_response_types_map,
101
+ ).data
102
+
103
+ @validate_call
104
+ def datasets_create_with_http_info(
105
+ self,
106
+ data_set_create_request: Optional[DataSetCreateRequest] = None,
107
+ _request_timeout: Union[
108
+ None,
109
+ Annotated[StrictFloat, Field(gt=0)],
110
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
111
+ ] = None,
112
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
113
+ _content_type: Optional[StrictStr] = None,
114
+ _headers: Optional[Dict[StrictStr, Any]] = None,
115
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
116
+ ) -> ApiResponse[DataSetCreate]:
117
+ """datasets_create
118
+
119
+ Create a new dataset.
120
+
121
+ :param data_set_create_request:
122
+ :type data_set_create_request: DataSetCreateRequest
123
+ :param _request_timeout: timeout setting for this request. If one
124
+ number provided, it will be total request
125
+ timeout. It can also be a pair (tuple) of
126
+ (connection, read) timeouts.
127
+ :type _request_timeout: int, tuple(int, int), optional
128
+ :param _request_auth: set to override the auth_settings for an a single
129
+ request; this effectively ignores the
130
+ authentication in the spec for a single request.
131
+ :type _request_auth: dict, optional
132
+ :param _content_type: force content-type for the request.
133
+ :type _content_type: str, Optional
134
+ :param _headers: set to override the headers for a single
135
+ request; this effectively ignores the headers
136
+ in the spec for a single request.
137
+ :type _headers: dict, optional
138
+ :param _host_index: set to override the host_index for a single
139
+ request; this effectively ignores the host_index
140
+ in the spec for a single request.
141
+ :type _host_index: int, optional
142
+ :return: Returns the result object.
143
+ """ # noqa: E501
144
+
145
+ _param = self._datasets_create_serialize(
146
+ data_set_create_request=data_set_create_request,
147
+ _request_auth=_request_auth,
148
+ _content_type=_content_type,
149
+ _headers=_headers,
150
+ _host_index=_host_index,
151
+ )
152
+
153
+ _response_types_map: Dict[str, Optional[str]] = {
154
+ "201": "DataSetCreate",
155
+ }
156
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
157
+ response_data.read()
158
+ return self.api_client.response_deserialize(
159
+ response_data=response_data,
160
+ response_types_map=_response_types_map,
161
+ )
162
+
163
+ @validate_call
164
+ def datasets_create_without_preload_content(
165
+ self,
166
+ data_set_create_request: Optional[DataSetCreateRequest] = None,
167
+ _request_timeout: Union[
168
+ None,
169
+ Annotated[StrictFloat, Field(gt=0)],
170
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
171
+ ] = None,
172
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
173
+ _content_type: Optional[StrictStr] = None,
174
+ _headers: Optional[Dict[StrictStr, Any]] = None,
175
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
176
+ ) -> RESTResponseType:
177
+ """datasets_create
178
+
179
+ Create a new dataset.
180
+
181
+ :param data_set_create_request:
182
+ :type data_set_create_request: DataSetCreateRequest
183
+ :param _request_timeout: timeout setting for this request. If one
184
+ number provided, it will be total request
185
+ timeout. It can also be a pair (tuple) of
186
+ (connection, read) timeouts.
187
+ :type _request_timeout: int, tuple(int, int), optional
188
+ :param _request_auth: set to override the auth_settings for an a single
189
+ request; this effectively ignores the
190
+ authentication in the spec for a single request.
191
+ :type _request_auth: dict, optional
192
+ :param _content_type: force content-type for the request.
193
+ :type _content_type: str, Optional
194
+ :param _headers: set to override the headers for a single
195
+ request; this effectively ignores the headers
196
+ in the spec for a single request.
197
+ :type _headers: dict, optional
198
+ :param _host_index: set to override the host_index for a single
199
+ request; this effectively ignores the host_index
200
+ in the spec for a single request.
201
+ :type _host_index: int, optional
202
+ :return: Returns the result object.
203
+ """ # noqa: E501
204
+
205
+ _param = self._datasets_create_serialize(
206
+ data_set_create_request=data_set_create_request,
207
+ _request_auth=_request_auth,
208
+ _content_type=_content_type,
209
+ _headers=_headers,
210
+ _host_index=_host_index,
211
+ )
212
+
213
+ _response_types_map: Dict[str, Optional[str]] = {
214
+ "201": "DataSetCreate",
215
+ }
216
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
217
+ return response_data.response
218
+
219
+ def _datasets_create_serialize(
220
+ self,
221
+ data_set_create_request,
222
+ _request_auth,
223
+ _content_type,
224
+ _headers,
225
+ _host_index,
226
+ ) -> RequestSerialized:
227
+ _host = None
228
+
229
+ _collection_formats: Dict[str, str] = {}
230
+
231
+ _path_params: Dict[str, str] = {}
232
+ _query_params: List[Tuple[str, str]] = []
233
+ _header_params: Dict[str, Optional[str]] = _headers or {}
234
+ _form_params: List[Tuple[str, str]] = []
235
+ _files: Dict[str, str] = {}
236
+ _body_params: Optional[bytes] = None
237
+
238
+ # process the path parameters
239
+ # process the query parameters
240
+ # process the header parameters
241
+ # process the form parameters
242
+ # process the body parameter
243
+ if data_set_create_request is not None:
244
+ _body_params = data_set_create_request
245
+
246
+ # set the HTTP header `Accept`
247
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
248
+
249
+ # set the HTTP header `Content-Type`
250
+ if _content_type:
251
+ _header_params["Content-Type"] = _content_type
252
+ else:
253
+ _default_content_type = self.api_client.select_header_content_type(
254
+ ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
255
+ )
256
+ if _default_content_type is not None:
257
+ _header_params["Content-Type"] = _default_content_type
258
+
259
+ # authentication setting
260
+ _auth_settings: List[str] = ["publicApiKey"]
261
+
262
+ return self.api_client.param_serialize(
263
+ method="POST",
264
+ resource_path="/v1/datasets/",
265
+ path_params=_path_params,
266
+ query_params=_query_params,
267
+ header_params=_header_params,
268
+ body=_body_params,
269
+ post_params=_form_params,
270
+ files=_files,
271
+ auth_settings=_auth_settings,
272
+ collection_formats=_collection_formats,
273
+ _host=_host,
274
+ _request_auth=_request_auth,
275
+ )
276
+
277
+ @validate_call
278
+ def datasets_destroy(
279
+ self,
280
+ id: StrictStr,
281
+ _request_timeout: Union[
282
+ None,
283
+ Annotated[StrictFloat, Field(gt=0)],
284
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
285
+ ] = None,
286
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
287
+ _content_type: Optional[StrictStr] = None,
288
+ _headers: Optional[Dict[StrictStr, Any]] = None,
289
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
290
+ ) -> None:
291
+ """datasets_destroy
292
+
293
+ Delete a dataset.
294
+
295
+ :param id: (required)
296
+ :type id: str
297
+ :param _request_timeout: timeout setting for this request. If one
298
+ number provided, it will be total request
299
+ timeout. It can also be a pair (tuple) of
300
+ (connection, read) timeouts.
301
+ :type _request_timeout: int, tuple(int, int), optional
302
+ :param _request_auth: set to override the auth_settings for an a single
303
+ request; this effectively ignores the
304
+ authentication in the spec for a single request.
305
+ :type _request_auth: dict, optional
306
+ :param _content_type: force content-type for the request.
307
+ :type _content_type: str, Optional
308
+ :param _headers: set to override the headers for a single
309
+ request; this effectively ignores the headers
310
+ in the spec for a single request.
311
+ :type _headers: dict, optional
312
+ :param _host_index: set to override the host_index for a single
313
+ request; this effectively ignores the host_index
314
+ in the spec for a single request.
315
+ :type _host_index: int, optional
316
+ :return: Returns the result object.
317
+ """ # noqa: E501
318
+
319
+ _param = self._datasets_destroy_serialize(
320
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
321
+ )
322
+
323
+ _response_types_map: Dict[str, Optional[str]] = {
324
+ "204": None,
325
+ }
326
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
327
+ response_data.read()
328
+ return self.api_client.response_deserialize(
329
+ response_data=response_data,
330
+ response_types_map=_response_types_map,
331
+ ).data
332
+
333
+ @validate_call
334
+ def datasets_destroy_with_http_info(
335
+ self,
336
+ id: StrictStr,
337
+ _request_timeout: Union[
338
+ None,
339
+ Annotated[StrictFloat, Field(gt=0)],
340
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
341
+ ] = None,
342
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
343
+ _content_type: Optional[StrictStr] = None,
344
+ _headers: Optional[Dict[StrictStr, Any]] = None,
345
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
346
+ ) -> ApiResponse[None]:
347
+ """datasets_destroy
348
+
349
+ Delete a dataset.
350
+
351
+ :param id: (required)
352
+ :type id: str
353
+ :param _request_timeout: timeout setting for this request. If one
354
+ number provided, it will be total request
355
+ timeout. It can also be a pair (tuple) of
356
+ (connection, read) timeouts.
357
+ :type _request_timeout: int, tuple(int, int), optional
358
+ :param _request_auth: set to override the auth_settings for an a single
359
+ request; this effectively ignores the
360
+ authentication in the spec for a single request.
361
+ :type _request_auth: dict, optional
362
+ :param _content_type: force content-type for the request.
363
+ :type _content_type: str, Optional
364
+ :param _headers: set to override the headers for a single
365
+ request; this effectively ignores the headers
366
+ in the spec for a single request.
367
+ :type _headers: dict, optional
368
+ :param _host_index: set to override the host_index for a single
369
+ request; this effectively ignores the host_index
370
+ in the spec for a single request.
371
+ :type _host_index: int, optional
372
+ :return: Returns the result object.
373
+ """ # noqa: E501
374
+
375
+ _param = self._datasets_destroy_serialize(
376
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
377
+ )
378
+
379
+ _response_types_map: Dict[str, Optional[str]] = {
380
+ "204": None,
381
+ }
382
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
383
+ response_data.read()
384
+ return self.api_client.response_deserialize(
385
+ response_data=response_data,
386
+ response_types_map=_response_types_map,
387
+ )
388
+
389
+ @validate_call
390
+ def datasets_destroy_without_preload_content(
391
+ self,
392
+ id: StrictStr,
393
+ _request_timeout: Union[
394
+ None,
395
+ Annotated[StrictFloat, Field(gt=0)],
396
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
397
+ ] = None,
398
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
399
+ _content_type: Optional[StrictStr] = None,
400
+ _headers: Optional[Dict[StrictStr, Any]] = None,
401
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
402
+ ) -> RESTResponseType:
403
+ """datasets_destroy
404
+
405
+ Delete a dataset.
406
+
407
+ :param id: (required)
408
+ :type id: str
409
+ :param _request_timeout: timeout setting for this request. If one
410
+ number provided, it will be total request
411
+ timeout. It can also be a pair (tuple) of
412
+ (connection, read) timeouts.
413
+ :type _request_timeout: int, tuple(int, int), optional
414
+ :param _request_auth: set to override the auth_settings for an a single
415
+ request; this effectively ignores the
416
+ authentication in the spec for a single request.
417
+ :type _request_auth: dict, optional
418
+ :param _content_type: force content-type for the request.
419
+ :type _content_type: str, Optional
420
+ :param _headers: set to override the headers for a single
421
+ request; this effectively ignores the headers
422
+ in the spec for a single request.
423
+ :type _headers: dict, optional
424
+ :param _host_index: set to override the host_index for a single
425
+ request; this effectively ignores the host_index
426
+ in the spec for a single request.
427
+ :type _host_index: int, optional
428
+ :return: Returns the result object.
429
+ """ # noqa: E501
430
+
431
+ _param = self._datasets_destroy_serialize(
432
+ id=id, _request_auth=_request_auth, _content_type=_content_type, _headers=_headers, _host_index=_host_index
433
+ )
434
+
435
+ _response_types_map: Dict[str, Optional[str]] = {
436
+ "204": None,
437
+ }
438
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
439
+ return response_data.response
440
+
441
+ def _datasets_destroy_serialize(
442
+ self,
443
+ id,
444
+ _request_auth,
445
+ _content_type,
446
+ _headers,
447
+ _host_index,
448
+ ) -> RequestSerialized:
449
+ _host = None
450
+
451
+ _collection_formats: Dict[str, str] = {}
452
+
453
+ _path_params: Dict[str, str] = {}
454
+ _query_params: List[Tuple[str, str]] = []
455
+ _header_params: Dict[str, Optional[str]] = _headers or {}
456
+ _form_params: List[Tuple[str, str]] = []
457
+ _files: Dict[str, str] = {}
458
+ _body_params: Optional[bytes] = None
459
+
460
+ # process the path parameters
461
+ if id is not None:
462
+ _path_params["id"] = id
463
+ # process the query parameters
464
+ # process the header parameters
465
+ # process the form parameters
466
+ # process the body parameter
467
+
468
+ # authentication setting
469
+ _auth_settings: List[str] = ["publicApiKey"]
470
+
471
+ return self.api_client.param_serialize(
472
+ method="DELETE",
473
+ resource_path="/v1/datasets/{id}/",
474
+ path_params=_path_params,
475
+ query_params=_query_params,
476
+ header_params=_header_params,
477
+ body=_body_params,
478
+ post_params=_form_params,
479
+ files=_files,
480
+ auth_settings=_auth_settings,
481
+ collection_formats=_collection_formats,
482
+ _host=_host,
483
+ _request_auth=_request_auth,
484
+ )
485
+
486
+ @validate_call
487
+ def datasets_list(
488
+ self,
489
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
490
+ ordering: Annotated[
491
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
492
+ ] = None,
493
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
494
+ search: Annotated[Optional[StrictStr], Field(description="Search for dataset by name")] = None,
495
+ type: Annotated[
496
+ Optional[StrictStr], Field(description="Filter by type. Possible values: reference, test")
497
+ ] = None,
498
+ _request_timeout: Union[
499
+ None,
500
+ Annotated[StrictFloat, Field(gt=0)],
501
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
502
+ ] = None,
503
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
504
+ _content_type: Optional[StrictStr] = None,
505
+ _headers: Optional[Dict[StrictStr, Any]] = None,
506
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
507
+ ) -> PaginatedDataSetListList:
508
+ """datasets_list
509
+
510
+ List datasets.
511
+
512
+ :param cursor: The pagination cursor value.
513
+ :type cursor: str
514
+ :param ordering: Which field to use when ordering the results.
515
+ :type ordering: str
516
+ :param page_size: Number of results to return per page.
517
+ :type page_size: int
518
+ :param search: Search for dataset by name
519
+ :type search: str
520
+ :param type: Filter by type. Possible values: reference, test
521
+ :type type: str
522
+ :param _request_timeout: timeout setting for this request. If one
523
+ number provided, it will be total request
524
+ timeout. It can also be a pair (tuple) of
525
+ (connection, read) timeouts.
526
+ :type _request_timeout: int, tuple(int, int), optional
527
+ :param _request_auth: set to override the auth_settings for an a single
528
+ request; this effectively ignores the
529
+ authentication in the spec for a single request.
530
+ :type _request_auth: dict, optional
531
+ :param _content_type: force content-type for the request.
532
+ :type _content_type: str, Optional
533
+ :param _headers: set to override the headers for a single
534
+ request; this effectively ignores the headers
535
+ in the spec for a single request.
536
+ :type _headers: dict, optional
537
+ :param _host_index: set to override the host_index for a single
538
+ request; this effectively ignores the host_index
539
+ in the spec for a single request.
540
+ :type _host_index: int, optional
541
+ :return: Returns the result object.
542
+ """ # noqa: E501
543
+
544
+ _param = self._datasets_list_serialize(
545
+ cursor=cursor,
546
+ ordering=ordering,
547
+ page_size=page_size,
548
+ search=search,
549
+ type=type,
550
+ _request_auth=_request_auth,
551
+ _content_type=_content_type,
552
+ _headers=_headers,
553
+ _host_index=_host_index,
554
+ )
555
+
556
+ _response_types_map: Dict[str, Optional[str]] = {
557
+ "200": "PaginatedDataSetListList",
558
+ }
559
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
560
+ response_data.read()
561
+ return self.api_client.response_deserialize(
562
+ response_data=response_data,
563
+ response_types_map=_response_types_map,
564
+ ).data
565
+
566
+ @validate_call
567
+ def datasets_list_with_http_info(
568
+ self,
569
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
570
+ ordering: Annotated[
571
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
572
+ ] = None,
573
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
574
+ search: Annotated[Optional[StrictStr], Field(description="Search for dataset by name")] = None,
575
+ type: Annotated[
576
+ Optional[StrictStr], Field(description="Filter by type. Possible values: reference, test")
577
+ ] = None,
578
+ _request_timeout: Union[
579
+ None,
580
+ Annotated[StrictFloat, Field(gt=0)],
581
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
582
+ ] = None,
583
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
584
+ _content_type: Optional[StrictStr] = None,
585
+ _headers: Optional[Dict[StrictStr, Any]] = None,
586
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
587
+ ) -> ApiResponse[PaginatedDataSetListList]:
588
+ """datasets_list
589
+
590
+ List datasets.
591
+
592
+ :param cursor: The pagination cursor value.
593
+ :type cursor: str
594
+ :param ordering: Which field to use when ordering the results.
595
+ :type ordering: str
596
+ :param page_size: Number of results to return per page.
597
+ :type page_size: int
598
+ :param search: Search for dataset by name
599
+ :type search: str
600
+ :param type: Filter by type. Possible values: reference, test
601
+ :type type: str
602
+ :param _request_timeout: timeout setting for this request. If one
603
+ number provided, it will be total request
604
+ timeout. It can also be a pair (tuple) of
605
+ (connection, read) timeouts.
606
+ :type _request_timeout: int, tuple(int, int), optional
607
+ :param _request_auth: set to override the auth_settings for an a single
608
+ request; this effectively ignores the
609
+ authentication in the spec for a single request.
610
+ :type _request_auth: dict, optional
611
+ :param _content_type: force content-type for the request.
612
+ :type _content_type: str, Optional
613
+ :param _headers: set to override the headers for a single
614
+ request; this effectively ignores the headers
615
+ in the spec for a single request.
616
+ :type _headers: dict, optional
617
+ :param _host_index: set to override the host_index for a single
618
+ request; this effectively ignores the host_index
619
+ in the spec for a single request.
620
+ :type _host_index: int, optional
621
+ :return: Returns the result object.
622
+ """ # noqa: E501
623
+
624
+ _param = self._datasets_list_serialize(
625
+ cursor=cursor,
626
+ ordering=ordering,
627
+ page_size=page_size,
628
+ search=search,
629
+ type=type,
630
+ _request_auth=_request_auth,
631
+ _content_type=_content_type,
632
+ _headers=_headers,
633
+ _host_index=_host_index,
634
+ )
635
+
636
+ _response_types_map: Dict[str, Optional[str]] = {
637
+ "200": "PaginatedDataSetListList",
638
+ }
639
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
640
+ response_data.read()
641
+ return self.api_client.response_deserialize(
642
+ response_data=response_data,
643
+ response_types_map=_response_types_map,
644
+ )
645
+
646
+ @validate_call
647
+ def datasets_list_without_preload_content(
648
+ self,
649
+ cursor: Annotated[Optional[StrictStr], Field(description="The pagination cursor value.")] = None,
650
+ ordering: Annotated[
651
+ Optional[StrictStr], Field(description="Which field to use when ordering the results.")
652
+ ] = None,
653
+ page_size: Annotated[Optional[StrictInt], Field(description="Number of results to return per page.")] = None,
654
+ search: Annotated[Optional[StrictStr], Field(description="Search for dataset by name")] = None,
655
+ type: Annotated[
656
+ Optional[StrictStr], Field(description="Filter by type. Possible values: reference, test")
657
+ ] = None,
658
+ _request_timeout: Union[
659
+ None,
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
662
+ ] = None,
663
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
664
+ _content_type: Optional[StrictStr] = None,
665
+ _headers: Optional[Dict[StrictStr, Any]] = None,
666
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
667
+ ) -> RESTResponseType:
668
+ """datasets_list
669
+
670
+ List datasets.
671
+
672
+ :param cursor: The pagination cursor value.
673
+ :type cursor: str
674
+ :param ordering: Which field to use when ordering the results.
675
+ :type ordering: str
676
+ :param page_size: Number of results to return per page.
677
+ :type page_size: int
678
+ :param search: Search for dataset by name
679
+ :type search: str
680
+ :param type: Filter by type. Possible values: reference, test
681
+ :type type: str
682
+ :param _request_timeout: timeout setting for this request. If one
683
+ number provided, it will be total request
684
+ timeout. It can also be a pair (tuple) of
685
+ (connection, read) timeouts.
686
+ :type _request_timeout: int, tuple(int, int), optional
687
+ :param _request_auth: set to override the auth_settings for an a single
688
+ request; this effectively ignores the
689
+ authentication in the spec for a single request.
690
+ :type _request_auth: dict, optional
691
+ :param _content_type: force content-type for the request.
692
+ :type _content_type: str, Optional
693
+ :param _headers: set to override the headers for a single
694
+ request; this effectively ignores the headers
695
+ in the spec for a single request.
696
+ :type _headers: dict, optional
697
+ :param _host_index: set to override the host_index for a single
698
+ request; this effectively ignores the host_index
699
+ in the spec for a single request.
700
+ :type _host_index: int, optional
701
+ :return: Returns the result object.
702
+ """ # noqa: E501
703
+
704
+ _param = self._datasets_list_serialize(
705
+ cursor=cursor,
706
+ ordering=ordering,
707
+ page_size=page_size,
708
+ search=search,
709
+ type=type,
710
+ _request_auth=_request_auth,
711
+ _content_type=_content_type,
712
+ _headers=_headers,
713
+ _host_index=_host_index,
714
+ )
715
+
716
+ _response_types_map: Dict[str, Optional[str]] = {
717
+ "200": "PaginatedDataSetListList",
718
+ }
719
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
720
+ return response_data.response
721
+
722
+ def _datasets_list_serialize(
723
+ self,
724
+ cursor,
725
+ ordering,
726
+ page_size,
727
+ search,
728
+ type,
729
+ _request_auth,
730
+ _content_type,
731
+ _headers,
732
+ _host_index,
733
+ ) -> RequestSerialized:
734
+ _host = None
735
+
736
+ _collection_formats: Dict[str, str] = {}
737
+
738
+ _path_params: Dict[str, str] = {}
739
+ _query_params: List[Tuple[str, str]] = []
740
+ _header_params: Dict[str, Optional[str]] = _headers or {}
741
+ _form_params: List[Tuple[str, str]] = []
742
+ _files: Dict[str, str] = {}
743
+ _body_params: Optional[bytes] = None
744
+
745
+ # process the path parameters
746
+ # process the query parameters
747
+ if cursor is not None:
748
+ _query_params.append(("cursor", cursor))
749
+
750
+ if ordering is not None:
751
+ _query_params.append(("ordering", ordering))
752
+
753
+ if page_size is not None:
754
+ _query_params.append(("page_size", page_size))
755
+
756
+ if search is not None:
757
+ _query_params.append(("search", search))
758
+
759
+ if type is not None:
760
+ _query_params.append(("type", type))
761
+
762
+ # process the header parameters
763
+ # process the form parameters
764
+ # process the body parameter
765
+
766
+ # set the HTTP header `Accept`
767
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
768
+
769
+ # authentication setting
770
+ _auth_settings: List[str] = ["publicApiKey"]
771
+
772
+ return self.api_client.param_serialize(
773
+ method="GET",
774
+ resource_path="/v1/datasets/",
775
+ path_params=_path_params,
776
+ query_params=_query_params,
777
+ header_params=_header_params,
778
+ body=_body_params,
779
+ post_params=_form_params,
780
+ files=_files,
781
+ auth_settings=_auth_settings,
782
+ collection_formats=_collection_formats,
783
+ _host=_host,
784
+ _request_auth=_request_auth,
785
+ )
786
+
787
+ @validate_call
788
+ def datasets_retrieve(
789
+ self,
790
+ id: StrictStr,
791
+ download: Annotated[Optional[StrictBool], Field(description="Download the dataset.")] = None,
792
+ _request_timeout: Union[
793
+ None,
794
+ Annotated[StrictFloat, Field(gt=0)],
795
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
796
+ ] = None,
797
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
798
+ _content_type: Optional[StrictStr] = None,
799
+ _headers: Optional[Dict[StrictStr, Any]] = None,
800
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
801
+ ) -> DataSetList:
802
+ """datasets_retrieve
803
+
804
+ Get dataset details or download the dataset file.
805
+
806
+ :param id: (required)
807
+ :type id: str
808
+ :param download: Download the dataset.
809
+ :type download: bool
810
+ :param _request_timeout: timeout setting for this request. If one
811
+ number provided, it will be total request
812
+ timeout. It can also be a pair (tuple) of
813
+ (connection, read) timeouts.
814
+ :type _request_timeout: int, tuple(int, int), optional
815
+ :param _request_auth: set to override the auth_settings for an a single
816
+ request; this effectively ignores the
817
+ authentication in the spec for a single request.
818
+ :type _request_auth: dict, optional
819
+ :param _content_type: force content-type for the request.
820
+ :type _content_type: str, Optional
821
+ :param _headers: set to override the headers for a single
822
+ request; this effectively ignores the headers
823
+ in the spec for a single request.
824
+ :type _headers: dict, optional
825
+ :param _host_index: set to override the host_index for a single
826
+ request; this effectively ignores the host_index
827
+ in the spec for a single request.
828
+ :type _host_index: int, optional
829
+ :return: Returns the result object.
830
+ """ # noqa: E501
831
+
832
+ _param = self._datasets_retrieve_serialize(
833
+ id=id,
834
+ download=download,
835
+ _request_auth=_request_auth,
836
+ _content_type=_content_type,
837
+ _headers=_headers,
838
+ _host_index=_host_index,
839
+ )
840
+
841
+ _response_types_map: Dict[str, Optional[str]] = {
842
+ "200": "DataSetList",
843
+ }
844
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
845
+ response_data.read()
846
+ return self.api_client.response_deserialize(
847
+ response_data=response_data,
848
+ response_types_map=_response_types_map,
849
+ ).data
850
+
851
+ @validate_call
852
+ def datasets_retrieve_with_http_info(
853
+ self,
854
+ id: StrictStr,
855
+ download: Annotated[Optional[StrictBool], Field(description="Download the dataset.")] = None,
856
+ _request_timeout: Union[
857
+ None,
858
+ Annotated[StrictFloat, Field(gt=0)],
859
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
860
+ ] = None,
861
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
862
+ _content_type: Optional[StrictStr] = None,
863
+ _headers: Optional[Dict[StrictStr, Any]] = None,
864
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
865
+ ) -> ApiResponse[DataSetList]:
866
+ """datasets_retrieve
867
+
868
+ Get dataset details or download the dataset file.
869
+
870
+ :param id: (required)
871
+ :type id: str
872
+ :param download: Download the dataset.
873
+ :type download: bool
874
+ :param _request_timeout: timeout setting for this request. If one
875
+ number provided, it will be total request
876
+ timeout. It can also be a pair (tuple) of
877
+ (connection, read) timeouts.
878
+ :type _request_timeout: int, tuple(int, int), optional
879
+ :param _request_auth: set to override the auth_settings for an a single
880
+ request; this effectively ignores the
881
+ authentication in the spec for a single request.
882
+ :type _request_auth: dict, optional
883
+ :param _content_type: force content-type for the request.
884
+ :type _content_type: str, Optional
885
+ :param _headers: set to override the headers for a single
886
+ request; this effectively ignores the headers
887
+ in the spec for a single request.
888
+ :type _headers: dict, optional
889
+ :param _host_index: set to override the host_index for a single
890
+ request; this effectively ignores the host_index
891
+ in the spec for a single request.
892
+ :type _host_index: int, optional
893
+ :return: Returns the result object.
894
+ """ # noqa: E501
895
+
896
+ _param = self._datasets_retrieve_serialize(
897
+ id=id,
898
+ download=download,
899
+ _request_auth=_request_auth,
900
+ _content_type=_content_type,
901
+ _headers=_headers,
902
+ _host_index=_host_index,
903
+ )
904
+
905
+ _response_types_map: Dict[str, Optional[str]] = {
906
+ "200": "DataSetList",
907
+ }
908
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
909
+ response_data.read()
910
+ return self.api_client.response_deserialize(
911
+ response_data=response_data,
912
+ response_types_map=_response_types_map,
913
+ )
914
+
915
+ @validate_call
916
+ def datasets_retrieve_without_preload_content(
917
+ self,
918
+ id: StrictStr,
919
+ download: Annotated[Optional[StrictBool], Field(description="Download the dataset.")] = None,
920
+ _request_timeout: Union[
921
+ None,
922
+ Annotated[StrictFloat, Field(gt=0)],
923
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
924
+ ] = None,
925
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
926
+ _content_type: Optional[StrictStr] = None,
927
+ _headers: Optional[Dict[StrictStr, Any]] = None,
928
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
929
+ ) -> RESTResponseType:
930
+ """datasets_retrieve
931
+
932
+ Get dataset details or download the dataset file.
933
+
934
+ :param id: (required)
935
+ :type id: str
936
+ :param download: Download the dataset.
937
+ :type download: bool
938
+ :param _request_timeout: timeout setting for this request. If one
939
+ number provided, it will be total request
940
+ timeout. It can also be a pair (tuple) of
941
+ (connection, read) timeouts.
942
+ :type _request_timeout: int, tuple(int, int), optional
943
+ :param _request_auth: set to override the auth_settings for an a single
944
+ request; this effectively ignores the
945
+ authentication in the spec for a single request.
946
+ :type _request_auth: dict, optional
947
+ :param _content_type: force content-type for the request.
948
+ :type _content_type: str, Optional
949
+ :param _headers: set to override the headers for a single
950
+ request; this effectively ignores the headers
951
+ in the spec for a single request.
952
+ :type _headers: dict, optional
953
+ :param _host_index: set to override the host_index for a single
954
+ request; this effectively ignores the host_index
955
+ in the spec for a single request.
956
+ :type _host_index: int, optional
957
+ :return: Returns the result object.
958
+ """ # noqa: E501
959
+
960
+ _param = self._datasets_retrieve_serialize(
961
+ id=id,
962
+ download=download,
963
+ _request_auth=_request_auth,
964
+ _content_type=_content_type,
965
+ _headers=_headers,
966
+ _host_index=_host_index,
967
+ )
968
+
969
+ _response_types_map: Dict[str, Optional[str]] = {
970
+ "200": "DataSetList",
971
+ }
972
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
973
+ return response_data.response
974
+
975
+ def _datasets_retrieve_serialize(
976
+ self,
977
+ id,
978
+ download,
979
+ _request_auth,
980
+ _content_type,
981
+ _headers,
982
+ _host_index,
983
+ ) -> RequestSerialized:
984
+ _host = None
985
+
986
+ _collection_formats: Dict[str, str] = {}
987
+
988
+ _path_params: Dict[str, str] = {}
989
+ _query_params: List[Tuple[str, str]] = []
990
+ _header_params: Dict[str, Optional[str]] = _headers or {}
991
+ _form_params: List[Tuple[str, str]] = []
992
+ _files: Dict[str, str] = {}
993
+ _body_params: Optional[bytes] = None
994
+
995
+ # process the path parameters
996
+ if id is not None:
997
+ _path_params["id"] = id
998
+ # process the query parameters
999
+ if download is not None:
1000
+ _query_params.append(("download", download))
1001
+
1002
+ # process the header parameters
1003
+ # process the form parameters
1004
+ # process the body parameter
1005
+
1006
+ # set the HTTP header `Accept`
1007
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1008
+
1009
+ # authentication setting
1010
+ _auth_settings: List[str] = ["publicApiKey"]
1011
+
1012
+ return self.api_client.param_serialize(
1013
+ method="GET",
1014
+ resource_path="/v1/datasets/{id}/",
1015
+ path_params=_path_params,
1016
+ query_params=_query_params,
1017
+ header_params=_header_params,
1018
+ body=_body_params,
1019
+ post_params=_form_params,
1020
+ files=_files,
1021
+ auth_settings=_auth_settings,
1022
+ collection_formats=_collection_formats,
1023
+ _host=_host,
1024
+ _request_auth=_request_auth,
1025
+ )
1026
+
1027
+ @validate_call
1028
+ def datasets_status_update(
1029
+ self,
1030
+ id: StrictStr,
1031
+ status_change_request: StatusChangeRequest,
1032
+ _request_timeout: Union[
1033
+ None,
1034
+ Annotated[StrictFloat, Field(gt=0)],
1035
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1036
+ ] = None,
1037
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1038
+ _content_type: Optional[StrictStr] = None,
1039
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1040
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1041
+ ) -> StatusChange:
1042
+ """datasets_status_update
1043
+
1044
+ Change the status of a dataset
1045
+
1046
+ :param id: (required)
1047
+ :type id: str
1048
+ :param status_change_request: (required)
1049
+ :type status_change_request: StatusChangeRequest
1050
+ :param _request_timeout: timeout setting for this request. If one
1051
+ number provided, it will be total request
1052
+ timeout. It can also be a pair (tuple) of
1053
+ (connection, read) timeouts.
1054
+ :type _request_timeout: int, tuple(int, int), optional
1055
+ :param _request_auth: set to override the auth_settings for an a single
1056
+ request; this effectively ignores the
1057
+ authentication in the spec for a single request.
1058
+ :type _request_auth: dict, optional
1059
+ :param _content_type: force content-type for the request.
1060
+ :type _content_type: str, Optional
1061
+ :param _headers: set to override the headers for a single
1062
+ request; this effectively ignores the headers
1063
+ in the spec for a single request.
1064
+ :type _headers: dict, optional
1065
+ :param _host_index: set to override the host_index for a single
1066
+ request; this effectively ignores the host_index
1067
+ in the spec for a single request.
1068
+ :type _host_index: int, optional
1069
+ :return: Returns the result object.
1070
+ """ # noqa: E501
1071
+
1072
+ _param = self._datasets_status_update_serialize(
1073
+ id=id,
1074
+ status_change_request=status_change_request,
1075
+ _request_auth=_request_auth,
1076
+ _content_type=_content_type,
1077
+ _headers=_headers,
1078
+ _host_index=_host_index,
1079
+ )
1080
+
1081
+ _response_types_map: Dict[str, Optional[str]] = {
1082
+ "200": "StatusChange",
1083
+ }
1084
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1085
+ response_data.read()
1086
+ return self.api_client.response_deserialize(
1087
+ response_data=response_data,
1088
+ response_types_map=_response_types_map,
1089
+ ).data
1090
+
1091
+ @validate_call
1092
+ def datasets_status_update_with_http_info(
1093
+ self,
1094
+ id: StrictStr,
1095
+ status_change_request: StatusChangeRequest,
1096
+ _request_timeout: Union[
1097
+ None,
1098
+ Annotated[StrictFloat, Field(gt=0)],
1099
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1100
+ ] = None,
1101
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1102
+ _content_type: Optional[StrictStr] = None,
1103
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1104
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1105
+ ) -> ApiResponse[StatusChange]:
1106
+ """datasets_status_update
1107
+
1108
+ Change the status of a dataset
1109
+
1110
+ :param id: (required)
1111
+ :type id: str
1112
+ :param status_change_request: (required)
1113
+ :type status_change_request: StatusChangeRequest
1114
+ :param _request_timeout: timeout setting for this request. If one
1115
+ number provided, it will be total request
1116
+ timeout. It can also be a pair (tuple) of
1117
+ (connection, read) timeouts.
1118
+ :type _request_timeout: int, tuple(int, int), optional
1119
+ :param _request_auth: set to override the auth_settings for an a single
1120
+ request; this effectively ignores the
1121
+ authentication in the spec for a single request.
1122
+ :type _request_auth: dict, optional
1123
+ :param _content_type: force content-type for the request.
1124
+ :type _content_type: str, Optional
1125
+ :param _headers: set to override the headers for a single
1126
+ request; this effectively ignores the headers
1127
+ in the spec for a single request.
1128
+ :type _headers: dict, optional
1129
+ :param _host_index: set to override the host_index for a single
1130
+ request; this effectively ignores the host_index
1131
+ in the spec for a single request.
1132
+ :type _host_index: int, optional
1133
+ :return: Returns the result object.
1134
+ """ # noqa: E501
1135
+
1136
+ _param = self._datasets_status_update_serialize(
1137
+ id=id,
1138
+ status_change_request=status_change_request,
1139
+ _request_auth=_request_auth,
1140
+ _content_type=_content_type,
1141
+ _headers=_headers,
1142
+ _host_index=_host_index,
1143
+ )
1144
+
1145
+ _response_types_map: Dict[str, Optional[str]] = {
1146
+ "200": "StatusChange",
1147
+ }
1148
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1149
+ response_data.read()
1150
+ return self.api_client.response_deserialize(
1151
+ response_data=response_data,
1152
+ response_types_map=_response_types_map,
1153
+ )
1154
+
1155
+ @validate_call
1156
+ def datasets_status_update_without_preload_content(
1157
+ self,
1158
+ id: StrictStr,
1159
+ status_change_request: StatusChangeRequest,
1160
+ _request_timeout: Union[
1161
+ None,
1162
+ Annotated[StrictFloat, Field(gt=0)],
1163
+ Tuple[Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]],
1164
+ ] = None,
1165
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1166
+ _content_type: Optional[StrictStr] = None,
1167
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1168
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1169
+ ) -> RESTResponseType:
1170
+ """datasets_status_update
1171
+
1172
+ Change the status of a dataset
1173
+
1174
+ :param id: (required)
1175
+ :type id: str
1176
+ :param status_change_request: (required)
1177
+ :type status_change_request: StatusChangeRequest
1178
+ :param _request_timeout: timeout setting for this request. If one
1179
+ number provided, it will be total request
1180
+ timeout. It can also be a pair (tuple) of
1181
+ (connection, read) timeouts.
1182
+ :type _request_timeout: int, tuple(int, int), optional
1183
+ :param _request_auth: set to override the auth_settings for an a single
1184
+ request; this effectively ignores the
1185
+ authentication in the spec for a single request.
1186
+ :type _request_auth: dict, optional
1187
+ :param _content_type: force content-type for the request.
1188
+ :type _content_type: str, Optional
1189
+ :param _headers: set to override the headers for a single
1190
+ request; this effectively ignores the headers
1191
+ in the spec for a single request.
1192
+ :type _headers: dict, optional
1193
+ :param _host_index: set to override the host_index for a single
1194
+ request; this effectively ignores the host_index
1195
+ in the spec for a single request.
1196
+ :type _host_index: int, optional
1197
+ :return: Returns the result object.
1198
+ """ # noqa: E501
1199
+
1200
+ _param = self._datasets_status_update_serialize(
1201
+ id=id,
1202
+ status_change_request=status_change_request,
1203
+ _request_auth=_request_auth,
1204
+ _content_type=_content_type,
1205
+ _headers=_headers,
1206
+ _host_index=_host_index,
1207
+ )
1208
+
1209
+ _response_types_map: Dict[str, Optional[str]] = {
1210
+ "200": "StatusChange",
1211
+ }
1212
+ response_data = self.api_client.call_api(*_param, _request_timeout=_request_timeout)
1213
+ return response_data.response
1214
+
1215
+ def _datasets_status_update_serialize(
1216
+ self,
1217
+ id,
1218
+ status_change_request,
1219
+ _request_auth,
1220
+ _content_type,
1221
+ _headers,
1222
+ _host_index,
1223
+ ) -> RequestSerialized:
1224
+ _host = None
1225
+
1226
+ _collection_formats: Dict[str, str] = {}
1227
+
1228
+ _path_params: Dict[str, str] = {}
1229
+ _query_params: List[Tuple[str, str]] = []
1230
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1231
+ _form_params: List[Tuple[str, str]] = []
1232
+ _files: Dict[str, str] = {}
1233
+ _body_params: Optional[bytes] = None
1234
+
1235
+ # process the path parameters
1236
+ if id is not None:
1237
+ _path_params["id"] = id
1238
+ # process the query parameters
1239
+ # process the header parameters
1240
+ # process the form parameters
1241
+ # process the body parameter
1242
+ if status_change_request is not None:
1243
+ _body_params = status_change_request
1244
+
1245
+ # set the HTTP header `Accept`
1246
+ _header_params["Accept"] = self.api_client.select_header_accept(["application/json"])
1247
+
1248
+ # set the HTTP header `Content-Type`
1249
+ if _content_type:
1250
+ _header_params["Content-Type"] = _content_type
1251
+ else:
1252
+ _default_content_type = self.api_client.select_header_content_type(
1253
+ ["application/json", "application/x-www-form-urlencoded", "multipart/form-data"]
1254
+ )
1255
+ if _default_content_type is not None:
1256
+ _header_params["Content-Type"] = _default_content_type
1257
+
1258
+ # authentication setting
1259
+ _auth_settings: List[str] = ["publicApiKey"]
1260
+
1261
+ return self.api_client.param_serialize(
1262
+ method="PUT",
1263
+ resource_path="/v1/datasets/status/{id}/",
1264
+ path_params=_path_params,
1265
+ query_params=_query_params,
1266
+ header_params=_header_params,
1267
+ body=_body_params,
1268
+ post_params=_form_params,
1269
+ files=_files,
1270
+ auth_settings=_auth_settings,
1271
+ collection_formats=_collection_formats,
1272
+ _host=_host,
1273
+ _request_auth=_request_auth,
1274
+ )