hotdata 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. hotdata/__init__.py +300 -0
  2. hotdata/api/__init__.py +20 -0
  3. hotdata/api/connection_types_api.py +549 -0
  4. hotdata/api/connections_api.py +2213 -0
  5. hotdata/api/datasets_api.py +1711 -0
  6. hotdata/api/embedding_providers_api.py +1380 -0
  7. hotdata/api/indexes_api.py +977 -0
  8. hotdata/api/information_schema_api.py +390 -0
  9. hotdata/api/jobs_api.py +619 -0
  10. hotdata/api/query_api.py +320 -0
  11. hotdata/api/query_runs_api.py +615 -0
  12. hotdata/api/refresh_api.py +317 -0
  13. hotdata/api/results_api.py +581 -0
  14. hotdata/api/saved_queries_api.py +2003 -0
  15. hotdata/api/secrets_api.py +1380 -0
  16. hotdata/api/uploads_api.py +595 -0
  17. hotdata/api/workspace_context_api.py +828 -0
  18. hotdata/api/workspaces_api.py +602 -0
  19. hotdata/api_client.py +806 -0
  20. hotdata/api_response.py +21 -0
  21. hotdata/configuration.py +620 -0
  22. hotdata/exceptions.py +219 -0
  23. hotdata/models/__init__.py +125 -0
  24. hotdata/models/api_error_detail.py +90 -0
  25. hotdata/models/api_error_response.py +92 -0
  26. hotdata/models/async_query_response.py +99 -0
  27. hotdata/models/boolean_profile_detail.py +91 -0
  28. hotdata/models/categorical_profile_detail.py +96 -0
  29. hotdata/models/category_value_info.py +96 -0
  30. hotdata/models/column_definition.py +140 -0
  31. hotdata/models/column_info.py +92 -0
  32. hotdata/models/column_profile_detail.py +180 -0
  33. hotdata/models/column_profile_detail_one_of.py +105 -0
  34. hotdata/models/column_profile_detail_one_of1.py +102 -0
  35. hotdata/models/column_profile_detail_one_of2.py +101 -0
  36. hotdata/models/column_profile_detail_one_of3.py +99 -0
  37. hotdata/models/column_profile_detail_one_of4.py +100 -0
  38. hotdata/models/column_profile_info.py +108 -0
  39. hotdata/models/column_type_spec.py +117 -0
  40. hotdata/models/connection_health_response.py +100 -0
  41. hotdata/models/connection_info.py +92 -0
  42. hotdata/models/connection_refresh_result.py +117 -0
  43. hotdata/models/connection_schema_error.py +90 -0
  44. hotdata/models/connection_type_detail.py +104 -0
  45. hotdata/models/connection_type_summary.py +90 -0
  46. hotdata/models/create_connection_request.py +108 -0
  47. hotdata/models/create_connection_response.py +105 -0
  48. hotdata/models/create_dataset_request.py +101 -0
  49. hotdata/models/create_dataset_response.py +99 -0
  50. hotdata/models/create_embedding_provider_request.py +111 -0
  51. hotdata/models/create_embedding_provider_response.py +102 -0
  52. hotdata/models/create_index_request.py +130 -0
  53. hotdata/models/create_saved_query_request.py +104 -0
  54. hotdata/models/create_secret_request.py +90 -0
  55. hotdata/models/create_secret_response.py +93 -0
  56. hotdata/models/create_workspace201_response.py +93 -0
  57. hotdata/models/create_workspace_request.py +90 -0
  58. hotdata/models/create_workspace_response.py +94 -0
  59. hotdata/models/dataset_source.py +180 -0
  60. hotdata/models/dataset_source_one_of.py +109 -0
  61. hotdata/models/dataset_source_one_of1.py +91 -0
  62. hotdata/models/dataset_summary.py +108 -0
  63. hotdata/models/dataset_version_summary.py +95 -0
  64. hotdata/models/discovery_status.py +39 -0
  65. hotdata/models/embedding_provider_response.py +108 -0
  66. hotdata/models/error.py +88 -0
  67. hotdata/models/execute_saved_query_request.py +93 -0
  68. hotdata/models/get_connection_response.py +97 -0
  69. hotdata/models/get_dataset_response.py +120 -0
  70. hotdata/models/get_result_response.py +126 -0
  71. hotdata/models/get_secret_response.py +93 -0
  72. hotdata/models/get_workspace_context_response.py +92 -0
  73. hotdata/models/index_info_response.py +107 -0
  74. hotdata/models/index_status.py +38 -0
  75. hotdata/models/information_schema_response.py +110 -0
  76. hotdata/models/inline_data.py +92 -0
  77. hotdata/models/inline_dataset_source.py +92 -0
  78. hotdata/models/job_result.py +152 -0
  79. hotdata/models/job_status.py +41 -0
  80. hotdata/models/job_status_response.py +124 -0
  81. hotdata/models/job_type.py +40 -0
  82. hotdata/models/list_connection_types_response.py +96 -0
  83. hotdata/models/list_connections_response.py +96 -0
  84. hotdata/models/list_dataset_versions_response.py +107 -0
  85. hotdata/models/list_datasets_response.py +105 -0
  86. hotdata/models/list_embedding_providers_response.py +96 -0
  87. hotdata/models/list_indexes_response.py +96 -0
  88. hotdata/models/list_jobs_response.py +96 -0
  89. hotdata/models/list_query_runs_response.py +110 -0
  90. hotdata/models/list_results_response.py +105 -0
  91. hotdata/models/list_saved_queries_response.py +105 -0
  92. hotdata/models/list_saved_query_versions_response.py +107 -0
  93. hotdata/models/list_secrets_response.py +96 -0
  94. hotdata/models/list_uploads_response.py +96 -0
  95. hotdata/models/list_workspace_contexts_response.py +96 -0
  96. hotdata/models/list_workspaces200_response.py +97 -0
  97. hotdata/models/list_workspaces_response.py +98 -0
  98. hotdata/models/numeric_profile_detail.py +92 -0
  99. hotdata/models/query_request.py +98 -0
  100. hotdata/models/query_response.py +113 -0
  101. hotdata/models/query_run_info.py +176 -0
  102. hotdata/models/refresh_dataset_response.py +95 -0
  103. hotdata/models/refresh_request.py +120 -0
  104. hotdata/models/refresh_response.py +180 -0
  105. hotdata/models/refresh_warning.py +102 -0
  106. hotdata/models/result_info.py +100 -0
  107. hotdata/models/saved_query_dataset_source.py +95 -0
  108. hotdata/models/saved_query_detail.py +168 -0
  109. hotdata/models/saved_query_summary.py +101 -0
  110. hotdata/models/saved_query_version_info.py +158 -0
  111. hotdata/models/schema_refresh_result.py +107 -0
  112. hotdata/models/secret_metadata_response.py +93 -0
  113. hotdata/models/sql_query_dataset_source.py +102 -0
  114. hotdata/models/submit_job_response.py +93 -0
  115. hotdata/models/table_info.py +116 -0
  116. hotdata/models/table_profile_response.py +112 -0
  117. hotdata/models/table_refresh_error.py +92 -0
  118. hotdata/models/table_refresh_result.py +107 -0
  119. hotdata/models/temporal_profile_detail.py +90 -0
  120. hotdata/models/text_profile_detail.py +93 -0
  121. hotdata/models/update_dataset_request.py +107 -0
  122. hotdata/models/update_dataset_response.py +104 -0
  123. hotdata/models/update_embedding_provider_request.py +114 -0
  124. hotdata/models/update_embedding_provider_response.py +93 -0
  125. hotdata/models/update_saved_query_request.py +128 -0
  126. hotdata/models/update_secret_request.py +88 -0
  127. hotdata/models/update_secret_response.py +91 -0
  128. hotdata/models/upload_dataset_source.py +97 -0
  129. hotdata/models/upload_info.py +102 -0
  130. hotdata/models/upload_response.py +102 -0
  131. hotdata/models/upsert_workspace_context_request.py +90 -0
  132. hotdata/models/upsert_workspace_context_response.py +92 -0
  133. hotdata/models/url_dataset_source.py +97 -0
  134. hotdata/models/workspace_context_entry.py +93 -0
  135. hotdata/models/workspace_detail.py +94 -0
  136. hotdata/models/workspace_list_item.py +98 -0
  137. hotdata/py.typed +0 -0
  138. hotdata/rest.py +264 -0
  139. hotdata-0.0.1.dist-info/METADATA +93 -0
  140. hotdata-0.0.1.dist-info/RECORD +142 -0
  141. hotdata-0.0.1.dist-info/WHEEL +5 -0
  142. hotdata-0.0.1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,581 @@
1
+ """
2
+ Hotdata API
3
+
4
+ Powerful data platform API for datasets, queries, and analytics.
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: developers@hotdata.dev
8
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
9
+
10
+ Do not edit the class manually.
11
+ """ # noqa: E501
12
+
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, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from hotdata.models.get_result_response import GetResultResponse
23
+ from hotdata.models.list_results_response import ListResultsResponse
24
+
25
+ from hotdata.api_client import ApiClient, RequestSerialized
26
+ from hotdata.api_response import ApiResponse
27
+ from hotdata.rest import RESTResponseType
28
+
29
+
30
+ class ResultsApi:
31
+ """NOTE: This class is auto generated by OpenAPI Generator
32
+ Ref: https://openapi-generator.tech
33
+
34
+ Do not edit the class manually.
35
+ """
36
+
37
+ def __init__(self, api_client=None) -> None:
38
+ if api_client is None:
39
+ api_client = ApiClient.get_default()
40
+ self.api_client = api_client
41
+
42
+
43
+ @validate_call
44
+ def get_result(
45
+ self,
46
+ id: Annotated[StrictStr, Field(description="Result ID")],
47
+ _request_timeout: Union[
48
+ None,
49
+ Annotated[StrictFloat, Field(gt=0)],
50
+ Tuple[
51
+ Annotated[StrictFloat, Field(gt=0)],
52
+ Annotated[StrictFloat, Field(gt=0)]
53
+ ]
54
+ ] = None,
55
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
+ _content_type: Optional[StrictStr] = None,
57
+ _headers: Optional[Dict[StrictStr, Any]] = None,
58
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
+ ) -> GetResultResponse:
60
+ """Get result
61
+
62
+ Retrieve a persisted query result by ID. If the result is still being processed, only the status is returned. Once ready, the full column and row data is included in the response.
63
+
64
+ :param id: Result ID (required)
65
+ :type id: str
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._get_result_serialize(
89
+ id=id,
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': "GetResultResponse",
98
+ '404': "ApiErrorResponse",
99
+ }
100
+ response_data = self.api_client.call_api(
101
+ *_param,
102
+ _request_timeout=_request_timeout
103
+ )
104
+ response_data.read()
105
+ return self.api_client.response_deserialize(
106
+ response_data=response_data,
107
+ response_types_map=_response_types_map,
108
+ ).data
109
+
110
+
111
+ @validate_call
112
+ def get_result_with_http_info(
113
+ self,
114
+ id: Annotated[StrictStr, Field(description="Result ID")],
115
+ _request_timeout: Union[
116
+ None,
117
+ Annotated[StrictFloat, Field(gt=0)],
118
+ Tuple[
119
+ Annotated[StrictFloat, Field(gt=0)],
120
+ Annotated[StrictFloat, Field(gt=0)]
121
+ ]
122
+ ] = None,
123
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
124
+ _content_type: Optional[StrictStr] = None,
125
+ _headers: Optional[Dict[StrictStr, Any]] = None,
126
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
127
+ ) -> ApiResponse[GetResultResponse]:
128
+ """Get result
129
+
130
+ Retrieve a persisted query result by ID. If the result is still being processed, only the status is returned. Once ready, the full column and row data is included in the response.
131
+
132
+ :param id: Result ID (required)
133
+ :type id: str
134
+ :param _request_timeout: timeout setting for this request. If one
135
+ number provided, it will be total request
136
+ timeout. It can also be a pair (tuple) of
137
+ (connection, read) timeouts.
138
+ :type _request_timeout: int, tuple(int, int), optional
139
+ :param _request_auth: set to override the auth_settings for an a single
140
+ request; this effectively ignores the
141
+ authentication in the spec for a single request.
142
+ :type _request_auth: dict, optional
143
+ :param _content_type: force content-type for the request.
144
+ :type _content_type: str, Optional
145
+ :param _headers: set to override the headers for a single
146
+ request; this effectively ignores the headers
147
+ in the spec for a single request.
148
+ :type _headers: dict, optional
149
+ :param _host_index: set to override the host_index for a single
150
+ request; this effectively ignores the host_index
151
+ in the spec for a single request.
152
+ :type _host_index: int, optional
153
+ :return: Returns the result object.
154
+ """ # noqa: E501
155
+
156
+ _param = self._get_result_serialize(
157
+ id=id,
158
+ _request_auth=_request_auth,
159
+ _content_type=_content_type,
160
+ _headers=_headers,
161
+ _host_index=_host_index
162
+ )
163
+
164
+ _response_types_map: Dict[str, Optional[str]] = {
165
+ '200': "GetResultResponse",
166
+ '404': "ApiErrorResponse",
167
+ }
168
+ response_data = self.api_client.call_api(
169
+ *_param,
170
+ _request_timeout=_request_timeout
171
+ )
172
+ response_data.read()
173
+ return self.api_client.response_deserialize(
174
+ response_data=response_data,
175
+ response_types_map=_response_types_map,
176
+ )
177
+
178
+
179
+ @validate_call
180
+ def get_result_without_preload_content(
181
+ self,
182
+ id: Annotated[StrictStr, Field(description="Result ID")],
183
+ _request_timeout: Union[
184
+ None,
185
+ Annotated[StrictFloat, Field(gt=0)],
186
+ Tuple[
187
+ Annotated[StrictFloat, Field(gt=0)],
188
+ Annotated[StrictFloat, Field(gt=0)]
189
+ ]
190
+ ] = None,
191
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
192
+ _content_type: Optional[StrictStr] = None,
193
+ _headers: Optional[Dict[StrictStr, Any]] = None,
194
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
195
+ ) -> RESTResponseType:
196
+ """Get result
197
+
198
+ Retrieve a persisted query result by ID. If the result is still being processed, only the status is returned. Once ready, the full column and row data is included in the response.
199
+
200
+ :param id: Result ID (required)
201
+ :type id: str
202
+ :param _request_timeout: timeout setting for this request. If one
203
+ number provided, it will be total request
204
+ timeout. It can also be a pair (tuple) of
205
+ (connection, read) timeouts.
206
+ :type _request_timeout: int, tuple(int, int), optional
207
+ :param _request_auth: set to override the auth_settings for an a single
208
+ request; this effectively ignores the
209
+ authentication in the spec for a single request.
210
+ :type _request_auth: dict, optional
211
+ :param _content_type: force content-type for the request.
212
+ :type _content_type: str, Optional
213
+ :param _headers: set to override the headers for a single
214
+ request; this effectively ignores the headers
215
+ in the spec for a single request.
216
+ :type _headers: dict, optional
217
+ :param _host_index: set to override the host_index for a single
218
+ request; this effectively ignores the host_index
219
+ in the spec for a single request.
220
+ :type _host_index: int, optional
221
+ :return: Returns the result object.
222
+ """ # noqa: E501
223
+
224
+ _param = self._get_result_serialize(
225
+ id=id,
226
+ _request_auth=_request_auth,
227
+ _content_type=_content_type,
228
+ _headers=_headers,
229
+ _host_index=_host_index
230
+ )
231
+
232
+ _response_types_map: Dict[str, Optional[str]] = {
233
+ '200': "GetResultResponse",
234
+ '404': "ApiErrorResponse",
235
+ }
236
+ response_data = self.api_client.call_api(
237
+ *_param,
238
+ _request_timeout=_request_timeout
239
+ )
240
+ return response_data.response
241
+
242
+
243
+ def _get_result_serialize(
244
+ self,
245
+ id,
246
+ _request_auth,
247
+ _content_type,
248
+ _headers,
249
+ _host_index,
250
+ ) -> RequestSerialized:
251
+
252
+ _host = None
253
+
254
+ _collection_formats: Dict[str, str] = {
255
+ }
256
+
257
+ _path_params: Dict[str, str] = {}
258
+ _query_params: List[Tuple[str, str]] = []
259
+ _header_params: Dict[str, Optional[str]] = _headers or {}
260
+ _form_params: List[Tuple[str, str]] = []
261
+ _files: Dict[
262
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
263
+ ] = {}
264
+ _body_params: Optional[bytes] = None
265
+
266
+ # process the path parameters
267
+ if id is not None:
268
+ _path_params['id'] = id
269
+ # process the query parameters
270
+ # process the header parameters
271
+ # process the form parameters
272
+ # process the body parameter
273
+
274
+
275
+ # set the HTTP header `Accept`
276
+ if 'Accept' not in _header_params:
277
+ _header_params['Accept'] = self.api_client.select_header_accept(
278
+ [
279
+ 'application/json'
280
+ ]
281
+ )
282
+
283
+
284
+ # authentication setting
285
+ _auth_settings: List[str] = [
286
+ 'BearerAuth'
287
+ ]
288
+
289
+ return self.api_client.param_serialize(
290
+ method='GET',
291
+ resource_path='/v1/results/{id}',
292
+ path_params=_path_params,
293
+ query_params=_query_params,
294
+ header_params=_header_params,
295
+ body=_body_params,
296
+ post_params=_form_params,
297
+ files=_files,
298
+ auth_settings=_auth_settings,
299
+ collection_formats=_collection_formats,
300
+ _host=_host,
301
+ _request_auth=_request_auth
302
+ )
303
+
304
+
305
+
306
+
307
+ @validate_call
308
+ def list_results(
309
+ self,
310
+ limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results (default: 100, max: 1000)")] = None,
311
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None,
312
+ _request_timeout: Union[
313
+ None,
314
+ Annotated[StrictFloat, Field(gt=0)],
315
+ Tuple[
316
+ Annotated[StrictFloat, Field(gt=0)],
317
+ Annotated[StrictFloat, Field(gt=0)]
318
+ ]
319
+ ] = None,
320
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
321
+ _content_type: Optional[StrictStr] = None,
322
+ _headers: Optional[Dict[StrictStr, Any]] = None,
323
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
324
+ ) -> ListResultsResponse:
325
+ """List results
326
+
327
+
328
+ :param limit: Maximum number of results (default: 100, max: 1000)
329
+ :type limit: int
330
+ :param offset: Pagination offset (default: 0)
331
+ :type offset: int
332
+ :param _request_timeout: timeout setting for this request. If one
333
+ number provided, it will be total request
334
+ timeout. It can also be a pair (tuple) of
335
+ (connection, read) timeouts.
336
+ :type _request_timeout: int, tuple(int, int), optional
337
+ :param _request_auth: set to override the auth_settings for an a single
338
+ request; this effectively ignores the
339
+ authentication in the spec for a single request.
340
+ :type _request_auth: dict, optional
341
+ :param _content_type: force content-type for the request.
342
+ :type _content_type: str, Optional
343
+ :param _headers: set to override the headers for a single
344
+ request; this effectively ignores the headers
345
+ in the spec for a single request.
346
+ :type _headers: dict, optional
347
+ :param _host_index: set to override the host_index for a single
348
+ request; this effectively ignores the host_index
349
+ in the spec for a single request.
350
+ :type _host_index: int, optional
351
+ :return: Returns the result object.
352
+ """ # noqa: E501
353
+
354
+ _param = self._list_results_serialize(
355
+ limit=limit,
356
+ offset=offset,
357
+ _request_auth=_request_auth,
358
+ _content_type=_content_type,
359
+ _headers=_headers,
360
+ _host_index=_host_index
361
+ )
362
+
363
+ _response_types_map: Dict[str, Optional[str]] = {
364
+ '200': "ListResultsResponse",
365
+ }
366
+ response_data = self.api_client.call_api(
367
+ *_param,
368
+ _request_timeout=_request_timeout
369
+ )
370
+ response_data.read()
371
+ return self.api_client.response_deserialize(
372
+ response_data=response_data,
373
+ response_types_map=_response_types_map,
374
+ ).data
375
+
376
+
377
+ @validate_call
378
+ def list_results_with_http_info(
379
+ self,
380
+ limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results (default: 100, max: 1000)")] = None,
381
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None,
382
+ _request_timeout: Union[
383
+ None,
384
+ Annotated[StrictFloat, Field(gt=0)],
385
+ Tuple[
386
+ Annotated[StrictFloat, Field(gt=0)],
387
+ Annotated[StrictFloat, Field(gt=0)]
388
+ ]
389
+ ] = None,
390
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
391
+ _content_type: Optional[StrictStr] = None,
392
+ _headers: Optional[Dict[StrictStr, Any]] = None,
393
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
394
+ ) -> ApiResponse[ListResultsResponse]:
395
+ """List results
396
+
397
+
398
+ :param limit: Maximum number of results (default: 100, max: 1000)
399
+ :type limit: int
400
+ :param offset: Pagination offset (default: 0)
401
+ :type offset: int
402
+ :param _request_timeout: timeout setting for this request. If one
403
+ number provided, it will be total request
404
+ timeout. It can also be a pair (tuple) of
405
+ (connection, read) timeouts.
406
+ :type _request_timeout: int, tuple(int, int), optional
407
+ :param _request_auth: set to override the auth_settings for an a single
408
+ request; this effectively ignores the
409
+ authentication in the spec for a single request.
410
+ :type _request_auth: dict, optional
411
+ :param _content_type: force content-type for the request.
412
+ :type _content_type: str, Optional
413
+ :param _headers: set to override the headers for a single
414
+ request; this effectively ignores the headers
415
+ in the spec for a single request.
416
+ :type _headers: dict, optional
417
+ :param _host_index: set to override the host_index for a single
418
+ request; this effectively ignores the host_index
419
+ in the spec for a single request.
420
+ :type _host_index: int, optional
421
+ :return: Returns the result object.
422
+ """ # noqa: E501
423
+
424
+ _param = self._list_results_serialize(
425
+ limit=limit,
426
+ offset=offset,
427
+ _request_auth=_request_auth,
428
+ _content_type=_content_type,
429
+ _headers=_headers,
430
+ _host_index=_host_index
431
+ )
432
+
433
+ _response_types_map: Dict[str, Optional[str]] = {
434
+ '200': "ListResultsResponse",
435
+ }
436
+ response_data = self.api_client.call_api(
437
+ *_param,
438
+ _request_timeout=_request_timeout
439
+ )
440
+ response_data.read()
441
+ return self.api_client.response_deserialize(
442
+ response_data=response_data,
443
+ response_types_map=_response_types_map,
444
+ )
445
+
446
+
447
+ @validate_call
448
+ def list_results_without_preload_content(
449
+ self,
450
+ limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of results (default: 100, max: 1000)")] = None,
451
+ offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None,
452
+ _request_timeout: Union[
453
+ None,
454
+ Annotated[StrictFloat, Field(gt=0)],
455
+ Tuple[
456
+ Annotated[StrictFloat, Field(gt=0)],
457
+ Annotated[StrictFloat, Field(gt=0)]
458
+ ]
459
+ ] = None,
460
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
461
+ _content_type: Optional[StrictStr] = None,
462
+ _headers: Optional[Dict[StrictStr, Any]] = None,
463
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
464
+ ) -> RESTResponseType:
465
+ """List results
466
+
467
+
468
+ :param limit: Maximum number of results (default: 100, max: 1000)
469
+ :type limit: int
470
+ :param offset: Pagination offset (default: 0)
471
+ :type offset: int
472
+ :param _request_timeout: timeout setting for this request. If one
473
+ number provided, it will be total request
474
+ timeout. It can also be a pair (tuple) of
475
+ (connection, read) timeouts.
476
+ :type _request_timeout: int, tuple(int, int), optional
477
+ :param _request_auth: set to override the auth_settings for an a single
478
+ request; this effectively ignores the
479
+ authentication in the spec for a single request.
480
+ :type _request_auth: dict, optional
481
+ :param _content_type: force content-type for the request.
482
+ :type _content_type: str, Optional
483
+ :param _headers: set to override the headers for a single
484
+ request; this effectively ignores the headers
485
+ in the spec for a single request.
486
+ :type _headers: dict, optional
487
+ :param _host_index: set to override the host_index for a single
488
+ request; this effectively ignores the host_index
489
+ in the spec for a single request.
490
+ :type _host_index: int, optional
491
+ :return: Returns the result object.
492
+ """ # noqa: E501
493
+
494
+ _param = self._list_results_serialize(
495
+ limit=limit,
496
+ offset=offset,
497
+ _request_auth=_request_auth,
498
+ _content_type=_content_type,
499
+ _headers=_headers,
500
+ _host_index=_host_index
501
+ )
502
+
503
+ _response_types_map: Dict[str, Optional[str]] = {
504
+ '200': "ListResultsResponse",
505
+ }
506
+ response_data = self.api_client.call_api(
507
+ *_param,
508
+ _request_timeout=_request_timeout
509
+ )
510
+ return response_data.response
511
+
512
+
513
+ def _list_results_serialize(
514
+ self,
515
+ limit,
516
+ offset,
517
+ _request_auth,
518
+ _content_type,
519
+ _headers,
520
+ _host_index,
521
+ ) -> RequestSerialized:
522
+
523
+ _host = None
524
+
525
+ _collection_formats: Dict[str, str] = {
526
+ }
527
+
528
+ _path_params: Dict[str, str] = {}
529
+ _query_params: List[Tuple[str, str]] = []
530
+ _header_params: Dict[str, Optional[str]] = _headers or {}
531
+ _form_params: List[Tuple[str, str]] = []
532
+ _files: Dict[
533
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
534
+ ] = {}
535
+ _body_params: Optional[bytes] = None
536
+
537
+ # process the path parameters
538
+ # process the query parameters
539
+ if limit is not None:
540
+
541
+ _query_params.append(('limit', limit))
542
+
543
+ if offset is not None:
544
+
545
+ _query_params.append(('offset', offset))
546
+
547
+ # process the header parameters
548
+ # process the form parameters
549
+ # process the body parameter
550
+
551
+
552
+ # set the HTTP header `Accept`
553
+ if 'Accept' not in _header_params:
554
+ _header_params['Accept'] = self.api_client.select_header_accept(
555
+ [
556
+ 'application/json'
557
+ ]
558
+ )
559
+
560
+
561
+ # authentication setting
562
+ _auth_settings: List[str] = [
563
+ 'BearerAuth'
564
+ ]
565
+
566
+ return self.api_client.param_serialize(
567
+ method='GET',
568
+ resource_path='/v1/results',
569
+ path_params=_path_params,
570
+ query_params=_query_params,
571
+ header_params=_header_params,
572
+ body=_body_params,
573
+ post_params=_form_params,
574
+ files=_files,
575
+ auth_settings=_auth_settings,
576
+ collection_formats=_collection_formats,
577
+ _host=_host,
578
+ _request_auth=_request_auth
579
+ )
580
+
581
+