crypticorn 2.7.4__py3-none-any.whl → 2.8.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. crypticorn/__init__.py +8 -1
  2. crypticorn/auth/client/models/create_api_key_request.py +3 -1
  3. crypticorn/auth/client/models/get_api_keys200_response_inner.py +3 -1
  4. crypticorn/client.py +34 -16
  5. crypticorn/common/__init__.py +5 -1
  6. crypticorn/common/ansi_colors.py +37 -0
  7. crypticorn/common/auth.py +3 -1
  8. crypticorn/common/exceptions.py +29 -11
  9. crypticorn/common/logging.py +126 -0
  10. crypticorn/common/middleware.py +27 -0
  11. crypticorn/common/mixins.py +2 -1
  12. crypticorn/common/router/admin_router.py +100 -0
  13. crypticorn/common/router/status_router.py +24 -0
  14. crypticorn/common/scopes.py +5 -0
  15. crypticorn/hive/client/__init__.py +6 -3
  16. crypticorn/hive/client/api/__init__.py +1 -0
  17. crypticorn/hive/client/api/admin_api.py +1452 -0
  18. crypticorn/hive/client/api/models_api.py +7 -7
  19. crypticorn/hive/client/api/status_api.py +4 -231
  20. crypticorn/hive/client/models/__init__.py +5 -3
  21. crypticorn/hive/client/models/api_error_identifier.py +115 -0
  22. crypticorn/hive/client/models/api_error_level.py +37 -0
  23. crypticorn/hive/client/models/api_error_type.py +37 -0
  24. crypticorn/hive/client/models/data_info.py +27 -5
  25. crypticorn/hive/client/models/data_options.py +92 -0
  26. crypticorn/hive/client/models/exception_detail.py +6 -3
  27. crypticorn/hive/client/models/log_level.py +38 -0
  28. crypticorn/hive/client/models/model.py +3 -3
  29. crypticorn/hive/main.py +22 -3
  30. crypticorn/hive/utils.py +1 -2
  31. crypticorn/metrics/client/__init__.py +11 -0
  32. crypticorn/metrics/client/api/__init__.py +2 -0
  33. crypticorn/metrics/client/api/admin_api.py +1452 -0
  34. crypticorn/metrics/client/api/exchanges_api.py +51 -40
  35. crypticorn/metrics/client/api/indicators_api.py +49 -32
  36. crypticorn/metrics/client/api/logs_api.py +7 -7
  37. crypticorn/metrics/client/api/marketcap_api.py +28 -25
  38. crypticorn/metrics/client/api/markets_api.py +50 -278
  39. crypticorn/metrics/client/api/quote_currencies_api.py +289 -0
  40. crypticorn/metrics/client/api/status_api.py +4 -231
  41. crypticorn/metrics/client/api/tokens_api.py +241 -37
  42. crypticorn/metrics/client/models/__init__.py +9 -0
  43. crypticorn/metrics/client/models/api_error_identifier.py +115 -0
  44. crypticorn/metrics/client/models/api_error_level.py +37 -0
  45. crypticorn/metrics/client/models/api_error_type.py +37 -0
  46. crypticorn/metrics/client/models/exception_detail.py +6 -3
  47. crypticorn/metrics/client/models/exchange_mapping.py +121 -0
  48. crypticorn/metrics/client/models/internal_exchange.py +39 -0
  49. crypticorn/metrics/client/models/log_level.py +38 -0
  50. crypticorn/metrics/client/models/market_type.py +35 -0
  51. crypticorn/metrics/client/models/marketcap_ranking.py +87 -0
  52. crypticorn/metrics/client/models/ohlcv.py +113 -0
  53. crypticorn/metrics/main.py +14 -2
  54. crypticorn/pay/client/__init__.py +3 -0
  55. crypticorn/pay/client/api/__init__.py +1 -0
  56. crypticorn/pay/client/api/admin_api.py +1453 -0
  57. crypticorn/pay/client/api/status_api.py +4 -231
  58. crypticorn/pay/client/models/__init__.py +2 -0
  59. crypticorn/pay/client/models/log_level.py +38 -0
  60. crypticorn/{hive/client/models/data_value_value_value_inner.py → pay/client/models/response_getuptime.py} +36 -31
  61. crypticorn/pay/client/models/scope.py +2 -0
  62. crypticorn/pay/main.py +2 -0
  63. {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/METADATA +46 -21
  64. {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/RECORD +67 -44
  65. {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/WHEEL +1 -1
  66. crypticorn/common/status_router.py +0 -44
  67. {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/entry_points.txt +0 -0
  68. {crypticorn-2.7.4.dist-info → crypticorn-2.8.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1452 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hive AI API
5
+
6
+ API for Hive AI model training and evaluation
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr, field_validator
20
+ from typing import Any, Dict, List, Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.hive.client.models.log_level import LogLevel
23
+
24
+ from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
25
+ from crypticorn.hive.client.api_response import ApiResponse
26
+ from crypticorn.hive.client.rest import RESTResponseType
27
+
28
+
29
+ class AdminApi:
30
+ """NOTE: This class is auto generated by OpenAPI Generator
31
+ Ref: https://openapi-generator.tech
32
+
33
+ Do not edit the class manually.
34
+ """
35
+
36
+ def __init__(self, api_client=None) -> None:
37
+ if api_client is None:
38
+ api_client = ApiClient.get_default()
39
+ self.api_client = api_client
40
+
41
+ @validate_call
42
+ async def get_container_limits(
43
+ self,
44
+ _request_timeout: Union[
45
+ None,
46
+ Annotated[StrictFloat, Field(gt=0)],
47
+ Tuple[
48
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
49
+ ],
50
+ ] = None,
51
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
52
+ _content_type: Optional[StrictStr] = None,
53
+ _headers: Optional[Dict[StrictStr, Any]] = None,
54
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
55
+ ) -> Dict[str, object]:
56
+ """Get Container Limits
57
+
58
+ Return container resource limits from cgroup.
59
+
60
+ :param _request_timeout: timeout setting for this request. If one
61
+ number provided, it will be total request
62
+ timeout. It can also be a pair (tuple) of
63
+ (connection, read) timeouts.
64
+ :type _request_timeout: int, tuple(int, int), optional
65
+ :param _request_auth: set to override the auth_settings for an a single
66
+ request; this effectively ignores the
67
+ authentication in the spec for a single request.
68
+ :type _request_auth: dict, optional
69
+ :param _content_type: force content-type for the request.
70
+ :type _content_type: str, Optional
71
+ :param _headers: set to override the headers for a single
72
+ request; this effectively ignores the headers
73
+ in the spec for a single request.
74
+ :type _headers: dict, optional
75
+ :param _host_index: set to override the host_index for a single
76
+ request; this effectively ignores the host_index
77
+ in the spec for a single request.
78
+ :type _host_index: int, optional
79
+ :return: Returns the result object.
80
+ """ # noqa: E501
81
+
82
+ _param = self._get_container_limits_serialize(
83
+ _request_auth=_request_auth,
84
+ _content_type=_content_type,
85
+ _headers=_headers,
86
+ _host_index=_host_index,
87
+ )
88
+
89
+ _response_types_map: Dict[str, Optional[str]] = {
90
+ "200": "Dict[str, object]",
91
+ }
92
+ response_data = await self.api_client.call_api(
93
+ *_param, _request_timeout=_request_timeout
94
+ )
95
+ await response_data.read()
96
+ return self.api_client.response_deserialize(
97
+ response_data=response_data,
98
+ response_types_map=_response_types_map,
99
+ ).data
100
+
101
+ @validate_call
102
+ async def get_container_limits_with_http_info(
103
+ self,
104
+ _request_timeout: Union[
105
+ None,
106
+ Annotated[StrictFloat, Field(gt=0)],
107
+ Tuple[
108
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
109
+ ],
110
+ ] = None,
111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
112
+ _content_type: Optional[StrictStr] = None,
113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
115
+ ) -> ApiResponse[Dict[str, object]]:
116
+ """Get Container Limits
117
+
118
+ Return container resource limits from cgroup.
119
+
120
+ :param _request_timeout: timeout setting for this request. If one
121
+ number provided, it will be total request
122
+ timeout. It can also be a pair (tuple) of
123
+ (connection, read) timeouts.
124
+ :type _request_timeout: int, tuple(int, int), optional
125
+ :param _request_auth: set to override the auth_settings for an a single
126
+ request; this effectively ignores the
127
+ authentication in the spec for a single request.
128
+ :type _request_auth: dict, optional
129
+ :param _content_type: force content-type for the request.
130
+ :type _content_type: str, Optional
131
+ :param _headers: set to override the headers for a single
132
+ request; this effectively ignores the headers
133
+ in the spec for a single request.
134
+ :type _headers: dict, optional
135
+ :param _host_index: set to override the host_index for a single
136
+ request; this effectively ignores the host_index
137
+ in the spec for a single request.
138
+ :type _host_index: int, optional
139
+ :return: Returns the result object.
140
+ """ # noqa: E501
141
+
142
+ _param = self._get_container_limits_serialize(
143
+ _request_auth=_request_auth,
144
+ _content_type=_content_type,
145
+ _headers=_headers,
146
+ _host_index=_host_index,
147
+ )
148
+
149
+ _response_types_map: Dict[str, Optional[str]] = {
150
+ "200": "Dict[str, object]",
151
+ }
152
+ response_data = await self.api_client.call_api(
153
+ *_param, _request_timeout=_request_timeout
154
+ )
155
+ await response_data.read()
156
+ return self.api_client.response_deserialize(
157
+ response_data=response_data,
158
+ response_types_map=_response_types_map,
159
+ )
160
+
161
+ @validate_call
162
+ async def get_container_limits_without_preload_content(
163
+ self,
164
+ _request_timeout: Union[
165
+ None,
166
+ Annotated[StrictFloat, Field(gt=0)],
167
+ Tuple[
168
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
169
+ ],
170
+ ] = None,
171
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
172
+ _content_type: Optional[StrictStr] = None,
173
+ _headers: Optional[Dict[StrictStr, Any]] = None,
174
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
175
+ ) -> RESTResponseType:
176
+ """Get Container Limits
177
+
178
+ Return container resource limits from cgroup.
179
+
180
+ :param _request_timeout: timeout setting for this request. If one
181
+ number provided, it will be total request
182
+ timeout. It can also be a pair (tuple) of
183
+ (connection, read) timeouts.
184
+ :type _request_timeout: int, tuple(int, int), optional
185
+ :param _request_auth: set to override the auth_settings for an a single
186
+ request; this effectively ignores the
187
+ authentication in the spec for a single request.
188
+ :type _request_auth: dict, optional
189
+ :param _content_type: force content-type for the request.
190
+ :type _content_type: str, Optional
191
+ :param _headers: set to override the headers for a single
192
+ request; this effectively ignores the headers
193
+ in the spec for a single request.
194
+ :type _headers: dict, optional
195
+ :param _host_index: set to override the host_index for a single
196
+ request; this effectively ignores the host_index
197
+ in the spec for a single request.
198
+ :type _host_index: int, optional
199
+ :return: Returns the result object.
200
+ """ # noqa: E501
201
+
202
+ _param = self._get_container_limits_serialize(
203
+ _request_auth=_request_auth,
204
+ _content_type=_content_type,
205
+ _headers=_headers,
206
+ _host_index=_host_index,
207
+ )
208
+
209
+ _response_types_map: Dict[str, Optional[str]] = {
210
+ "200": "Dict[str, object]",
211
+ }
212
+ response_data = await self.api_client.call_api(
213
+ *_param, _request_timeout=_request_timeout
214
+ )
215
+ return response_data.response
216
+
217
+ def _get_container_limits_serialize(
218
+ self,
219
+ _request_auth,
220
+ _content_type,
221
+ _headers,
222
+ _host_index,
223
+ ) -> RequestSerialized:
224
+
225
+ _host = None
226
+
227
+ _collection_formats: Dict[str, str] = {}
228
+
229
+ _path_params: Dict[str, str] = {}
230
+ _query_params: List[Tuple[str, str]] = []
231
+ _header_params: Dict[str, Optional[str]] = _headers or {}
232
+ _form_params: List[Tuple[str, str]] = []
233
+ _files: Dict[
234
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
235
+ ] = {}
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
+
244
+ # set the HTTP header `Accept`
245
+ if "Accept" not in _header_params:
246
+ _header_params["Accept"] = self.api_client.select_header_accept(
247
+ ["application/json"]
248
+ )
249
+
250
+ # authentication setting
251
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
252
+
253
+ return self.api_client.param_serialize(
254
+ method="GET",
255
+ resource_path="/admin/limits",
256
+ path_params=_path_params,
257
+ query_params=_query_params,
258
+ header_params=_header_params,
259
+ body=_body_params,
260
+ post_params=_form_params,
261
+ files=_files,
262
+ auth_settings=_auth_settings,
263
+ collection_formats=_collection_formats,
264
+ _host=_host,
265
+ _request_auth=_request_auth,
266
+ )
267
+
268
+ @validate_call
269
+ async def get_dependencies(
270
+ self,
271
+ include: Annotated[
272
+ Optional[List[StrictStr]],
273
+ Field(
274
+ description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
275
+ ),
276
+ ] = None,
277
+ _request_timeout: Union[
278
+ None,
279
+ Annotated[StrictFloat, Field(gt=0)],
280
+ Tuple[
281
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
282
+ ],
283
+ ] = None,
284
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
285
+ _content_type: Optional[StrictStr] = None,
286
+ _headers: Optional[Dict[StrictStr, Any]] = None,
287
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
288
+ ) -> List[object]:
289
+ """List Installed Packages
290
+
291
+ Return a list of installed packages and versions.
292
+
293
+ :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
294
+ :type include: List[str]
295
+ :param _request_timeout: timeout setting for this request. If one
296
+ number provided, it will be total request
297
+ timeout. It can also be a pair (tuple) of
298
+ (connection, read) timeouts.
299
+ :type _request_timeout: int, tuple(int, int), optional
300
+ :param _request_auth: set to override the auth_settings for an a single
301
+ request; this effectively ignores the
302
+ authentication in the spec for a single request.
303
+ :type _request_auth: dict, optional
304
+ :param _content_type: force content-type for the request.
305
+ :type _content_type: str, Optional
306
+ :param _headers: set to override the headers for a single
307
+ request; this effectively ignores the headers
308
+ in the spec for a single request.
309
+ :type _headers: dict, optional
310
+ :param _host_index: set to override the host_index for a single
311
+ request; this effectively ignores the host_index
312
+ in the spec for a single request.
313
+ :type _host_index: int, optional
314
+ :return: Returns the result object.
315
+ """ # noqa: E501
316
+
317
+ _param = self._get_dependencies_serialize(
318
+ include=include,
319
+ _request_auth=_request_auth,
320
+ _content_type=_content_type,
321
+ _headers=_headers,
322
+ _host_index=_host_index,
323
+ )
324
+
325
+ _response_types_map: Dict[str, Optional[str]] = {
326
+ "200": "List[object]",
327
+ }
328
+ response_data = await self.api_client.call_api(
329
+ *_param, _request_timeout=_request_timeout
330
+ )
331
+ await response_data.read()
332
+ return self.api_client.response_deserialize(
333
+ response_data=response_data,
334
+ response_types_map=_response_types_map,
335
+ ).data
336
+
337
+ @validate_call
338
+ async def get_dependencies_with_http_info(
339
+ self,
340
+ include: Annotated[
341
+ Optional[List[StrictStr]],
342
+ Field(
343
+ description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
344
+ ),
345
+ ] = None,
346
+ _request_timeout: Union[
347
+ None,
348
+ Annotated[StrictFloat, Field(gt=0)],
349
+ Tuple[
350
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
351
+ ],
352
+ ] = None,
353
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
354
+ _content_type: Optional[StrictStr] = None,
355
+ _headers: Optional[Dict[StrictStr, Any]] = None,
356
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
357
+ ) -> ApiResponse[List[object]]:
358
+ """List Installed Packages
359
+
360
+ Return a list of installed packages and versions.
361
+
362
+ :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
363
+ :type include: List[str]
364
+ :param _request_timeout: timeout setting for this request. If one
365
+ number provided, it will be total request
366
+ timeout. It can also be a pair (tuple) of
367
+ (connection, read) timeouts.
368
+ :type _request_timeout: int, tuple(int, int), optional
369
+ :param _request_auth: set to override the auth_settings for an a single
370
+ request; this effectively ignores the
371
+ authentication in the spec for a single request.
372
+ :type _request_auth: dict, optional
373
+ :param _content_type: force content-type for the request.
374
+ :type _content_type: str, Optional
375
+ :param _headers: set to override the headers for a single
376
+ request; this effectively ignores the headers
377
+ in the spec for a single request.
378
+ :type _headers: dict, optional
379
+ :param _host_index: set to override the host_index for a single
380
+ request; this effectively ignores the host_index
381
+ in the spec for a single request.
382
+ :type _host_index: int, optional
383
+ :return: Returns the result object.
384
+ """ # noqa: E501
385
+
386
+ _param = self._get_dependencies_serialize(
387
+ include=include,
388
+ _request_auth=_request_auth,
389
+ _content_type=_content_type,
390
+ _headers=_headers,
391
+ _host_index=_host_index,
392
+ )
393
+
394
+ _response_types_map: Dict[str, Optional[str]] = {
395
+ "200": "List[object]",
396
+ }
397
+ response_data = await self.api_client.call_api(
398
+ *_param, _request_timeout=_request_timeout
399
+ )
400
+ await response_data.read()
401
+ return self.api_client.response_deserialize(
402
+ response_data=response_data,
403
+ response_types_map=_response_types_map,
404
+ )
405
+
406
+ @validate_call
407
+ async def get_dependencies_without_preload_content(
408
+ self,
409
+ include: Annotated[
410
+ Optional[List[StrictStr]],
411
+ Field(
412
+ description="List of dependencies to include in the response. If not provided, all installed packages will be returned."
413
+ ),
414
+ ] = None,
415
+ _request_timeout: Union[
416
+ None,
417
+ Annotated[StrictFloat, Field(gt=0)],
418
+ Tuple[
419
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
420
+ ],
421
+ ] = None,
422
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
423
+ _content_type: Optional[StrictStr] = None,
424
+ _headers: Optional[Dict[StrictStr, Any]] = None,
425
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
426
+ ) -> RESTResponseType:
427
+ """List Installed Packages
428
+
429
+ Return a list of installed packages and versions.
430
+
431
+ :param include: List of dependencies to include in the response. If not provided, all installed packages will be returned.
432
+ :type include: List[str]
433
+ :param _request_timeout: timeout setting for this request. If one
434
+ number provided, it will be total request
435
+ timeout. It can also be a pair (tuple) of
436
+ (connection, read) timeouts.
437
+ :type _request_timeout: int, tuple(int, int), optional
438
+ :param _request_auth: set to override the auth_settings for an a single
439
+ request; this effectively ignores the
440
+ authentication in the spec for a single request.
441
+ :type _request_auth: dict, optional
442
+ :param _content_type: force content-type for the request.
443
+ :type _content_type: str, Optional
444
+ :param _headers: set to override the headers for a single
445
+ request; this effectively ignores the headers
446
+ in the spec for a single request.
447
+ :type _headers: dict, optional
448
+ :param _host_index: set to override the host_index for a single
449
+ request; this effectively ignores the host_index
450
+ in the spec for a single request.
451
+ :type _host_index: int, optional
452
+ :return: Returns the result object.
453
+ """ # noqa: E501
454
+
455
+ _param = self._get_dependencies_serialize(
456
+ include=include,
457
+ _request_auth=_request_auth,
458
+ _content_type=_content_type,
459
+ _headers=_headers,
460
+ _host_index=_host_index,
461
+ )
462
+
463
+ _response_types_map: Dict[str, Optional[str]] = {
464
+ "200": "List[object]",
465
+ }
466
+ response_data = await self.api_client.call_api(
467
+ *_param, _request_timeout=_request_timeout
468
+ )
469
+ return response_data.response
470
+
471
+ def _get_dependencies_serialize(
472
+ self,
473
+ include,
474
+ _request_auth,
475
+ _content_type,
476
+ _headers,
477
+ _host_index,
478
+ ) -> RequestSerialized:
479
+
480
+ _host = None
481
+
482
+ _collection_formats: Dict[str, str] = {
483
+ "include": "multi",
484
+ }
485
+
486
+ _path_params: Dict[str, str] = {}
487
+ _query_params: List[Tuple[str, str]] = []
488
+ _header_params: Dict[str, Optional[str]] = _headers or {}
489
+ _form_params: List[Tuple[str, str]] = []
490
+ _files: Dict[
491
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
492
+ ] = {}
493
+ _body_params: Optional[bytes] = None
494
+
495
+ # process the path parameters
496
+ # process the query parameters
497
+ if include is not None:
498
+
499
+ _query_params.append(("include", include))
500
+
501
+ # process the header parameters
502
+ # process the form parameters
503
+ # process the body parameter
504
+
505
+ # set the HTTP header `Accept`
506
+ if "Accept" not in _header_params:
507
+ _header_params["Accept"] = self.api_client.select_header_accept(
508
+ ["application/json"]
509
+ )
510
+
511
+ # authentication setting
512
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
513
+
514
+ return self.api_client.param_serialize(
515
+ method="GET",
516
+ resource_path="/admin/dependencies",
517
+ path_params=_path_params,
518
+ query_params=_query_params,
519
+ header_params=_header_params,
520
+ body=_body_params,
521
+ post_params=_form_params,
522
+ files=_files,
523
+ auth_settings=_auth_settings,
524
+ collection_formats=_collection_formats,
525
+ _host=_host,
526
+ _request_auth=_request_auth,
527
+ )
528
+
529
+ @validate_call
530
+ async def get_log_level(
531
+ self,
532
+ _request_timeout: Union[
533
+ None,
534
+ Annotated[StrictFloat, Field(gt=0)],
535
+ Tuple[
536
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
537
+ ],
538
+ ] = None,
539
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
540
+ _content_type: Optional[StrictStr] = None,
541
+ _headers: Optional[Dict[StrictStr, Any]] = None,
542
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
543
+ ) -> LogLevel:
544
+ """Get Logging Level
545
+
546
+ Get the log level of the server logger.
547
+
548
+ :param _request_timeout: timeout setting for this request. If one
549
+ number provided, it will be total request
550
+ timeout. It can also be a pair (tuple) of
551
+ (connection, read) timeouts.
552
+ :type _request_timeout: int, tuple(int, int), optional
553
+ :param _request_auth: set to override the auth_settings for an a single
554
+ request; this effectively ignores the
555
+ authentication in the spec for a single request.
556
+ :type _request_auth: dict, optional
557
+ :param _content_type: force content-type for the request.
558
+ :type _content_type: str, Optional
559
+ :param _headers: set to override the headers for a single
560
+ request; this effectively ignores the headers
561
+ in the spec for a single request.
562
+ :type _headers: dict, optional
563
+ :param _host_index: set to override the host_index for a single
564
+ request; this effectively ignores the host_index
565
+ in the spec for a single request.
566
+ :type _host_index: int, optional
567
+ :return: Returns the result object.
568
+ """ # noqa: E501
569
+
570
+ _param = self._get_log_level_serialize(
571
+ _request_auth=_request_auth,
572
+ _content_type=_content_type,
573
+ _headers=_headers,
574
+ _host_index=_host_index,
575
+ )
576
+
577
+ _response_types_map: Dict[str, Optional[str]] = {
578
+ "200": "LogLevel",
579
+ }
580
+ response_data = await self.api_client.call_api(
581
+ *_param, _request_timeout=_request_timeout
582
+ )
583
+ await response_data.read()
584
+ return self.api_client.response_deserialize(
585
+ response_data=response_data,
586
+ response_types_map=_response_types_map,
587
+ ).data
588
+
589
+ @validate_call
590
+ async def get_log_level_with_http_info(
591
+ self,
592
+ _request_timeout: Union[
593
+ None,
594
+ Annotated[StrictFloat, Field(gt=0)],
595
+ Tuple[
596
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
597
+ ],
598
+ ] = None,
599
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
600
+ _content_type: Optional[StrictStr] = None,
601
+ _headers: Optional[Dict[StrictStr, Any]] = None,
602
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
603
+ ) -> ApiResponse[LogLevel]:
604
+ """Get Logging Level
605
+
606
+ Get the log level of the server logger.
607
+
608
+ :param _request_timeout: timeout setting for this request. If one
609
+ number provided, it will be total request
610
+ timeout. It can also be a pair (tuple) of
611
+ (connection, read) timeouts.
612
+ :type _request_timeout: int, tuple(int, int), optional
613
+ :param _request_auth: set to override the auth_settings for an a single
614
+ request; this effectively ignores the
615
+ authentication in the spec for a single request.
616
+ :type _request_auth: dict, optional
617
+ :param _content_type: force content-type for the request.
618
+ :type _content_type: str, Optional
619
+ :param _headers: set to override the headers for a single
620
+ request; this effectively ignores the headers
621
+ in the spec for a single request.
622
+ :type _headers: dict, optional
623
+ :param _host_index: set to override the host_index for a single
624
+ request; this effectively ignores the host_index
625
+ in the spec for a single request.
626
+ :type _host_index: int, optional
627
+ :return: Returns the result object.
628
+ """ # noqa: E501
629
+
630
+ _param = self._get_log_level_serialize(
631
+ _request_auth=_request_auth,
632
+ _content_type=_content_type,
633
+ _headers=_headers,
634
+ _host_index=_host_index,
635
+ )
636
+
637
+ _response_types_map: Dict[str, Optional[str]] = {
638
+ "200": "LogLevel",
639
+ }
640
+ response_data = await self.api_client.call_api(
641
+ *_param, _request_timeout=_request_timeout
642
+ )
643
+ await response_data.read()
644
+ return self.api_client.response_deserialize(
645
+ response_data=response_data,
646
+ response_types_map=_response_types_map,
647
+ )
648
+
649
+ @validate_call
650
+ async def get_log_level_without_preload_content(
651
+ self,
652
+ _request_timeout: Union[
653
+ None,
654
+ Annotated[StrictFloat, Field(gt=0)],
655
+ Tuple[
656
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
657
+ ],
658
+ ] = None,
659
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
660
+ _content_type: Optional[StrictStr] = None,
661
+ _headers: Optional[Dict[StrictStr, Any]] = None,
662
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
663
+ ) -> RESTResponseType:
664
+ """Get Logging Level
665
+
666
+ Get the log level of the server logger.
667
+
668
+ :param _request_timeout: timeout setting for this request. If one
669
+ number provided, it will be total request
670
+ timeout. It can also be a pair (tuple) of
671
+ (connection, read) timeouts.
672
+ :type _request_timeout: int, tuple(int, int), optional
673
+ :param _request_auth: set to override the auth_settings for an a single
674
+ request; this effectively ignores the
675
+ authentication in the spec for a single request.
676
+ :type _request_auth: dict, optional
677
+ :param _content_type: force content-type for the request.
678
+ :type _content_type: str, Optional
679
+ :param _headers: set to override the headers for a single
680
+ request; this effectively ignores the headers
681
+ in the spec for a single request.
682
+ :type _headers: dict, optional
683
+ :param _host_index: set to override the host_index for a single
684
+ request; this effectively ignores the host_index
685
+ in the spec for a single request.
686
+ :type _host_index: int, optional
687
+ :return: Returns the result object.
688
+ """ # noqa: E501
689
+
690
+ _param = self._get_log_level_serialize(
691
+ _request_auth=_request_auth,
692
+ _content_type=_content_type,
693
+ _headers=_headers,
694
+ _host_index=_host_index,
695
+ )
696
+
697
+ _response_types_map: Dict[str, Optional[str]] = {
698
+ "200": "LogLevel",
699
+ }
700
+ response_data = await self.api_client.call_api(
701
+ *_param, _request_timeout=_request_timeout
702
+ )
703
+ return response_data.response
704
+
705
+ def _get_log_level_serialize(
706
+ self,
707
+ _request_auth,
708
+ _content_type,
709
+ _headers,
710
+ _host_index,
711
+ ) -> RequestSerialized:
712
+
713
+ _host = None
714
+
715
+ _collection_formats: Dict[str, str] = {}
716
+
717
+ _path_params: Dict[str, str] = {}
718
+ _query_params: List[Tuple[str, str]] = []
719
+ _header_params: Dict[str, Optional[str]] = _headers or {}
720
+ _form_params: List[Tuple[str, str]] = []
721
+ _files: Dict[
722
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
723
+ ] = {}
724
+ _body_params: Optional[bytes] = None
725
+
726
+ # process the path parameters
727
+ # process the query parameters
728
+ # process the header parameters
729
+ # process the form parameters
730
+ # process the body parameter
731
+
732
+ # set the HTTP header `Accept`
733
+ if "Accept" not in _header_params:
734
+ _header_params["Accept"] = self.api_client.select_header_accept(
735
+ ["application/json"]
736
+ )
737
+
738
+ # authentication setting
739
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
740
+
741
+ return self.api_client.param_serialize(
742
+ method="GET",
743
+ resource_path="/admin/log-level",
744
+ path_params=_path_params,
745
+ query_params=_query_params,
746
+ header_params=_header_params,
747
+ body=_body_params,
748
+ post_params=_form_params,
749
+ files=_files,
750
+ auth_settings=_auth_settings,
751
+ collection_formats=_collection_formats,
752
+ _host=_host,
753
+ _request_auth=_request_auth,
754
+ )
755
+
756
+ @validate_call
757
+ async def get_memory_usage(
758
+ self,
759
+ _request_timeout: Union[
760
+ None,
761
+ Annotated[StrictFloat, Field(gt=0)],
762
+ Tuple[
763
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
764
+ ],
765
+ ] = None,
766
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
767
+ _content_type: Optional[StrictStr] = None,
768
+ _headers: Optional[Dict[StrictStr, Any]] = None,
769
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
770
+ ) -> int:
771
+ """Get Memory Usage
772
+
773
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
774
+
775
+ :param _request_timeout: timeout setting for this request. If one
776
+ number provided, it will be total request
777
+ timeout. It can also be a pair (tuple) of
778
+ (connection, read) timeouts.
779
+ :type _request_timeout: int, tuple(int, int), optional
780
+ :param _request_auth: set to override the auth_settings for an a single
781
+ request; this effectively ignores the
782
+ authentication in the spec for a single request.
783
+ :type _request_auth: dict, optional
784
+ :param _content_type: force content-type for the request.
785
+ :type _content_type: str, Optional
786
+ :param _headers: set to override the headers for a single
787
+ request; this effectively ignores the headers
788
+ in the spec for a single request.
789
+ :type _headers: dict, optional
790
+ :param _host_index: set to override the host_index for a single
791
+ request; this effectively ignores the host_index
792
+ in the spec for a single request.
793
+ :type _host_index: int, optional
794
+ :return: Returns the result object.
795
+ """ # noqa: E501
796
+
797
+ _param = self._get_memory_usage_serialize(
798
+ _request_auth=_request_auth,
799
+ _content_type=_content_type,
800
+ _headers=_headers,
801
+ _host_index=_host_index,
802
+ )
803
+
804
+ _response_types_map: Dict[str, Optional[str]] = {
805
+ "200": "int",
806
+ }
807
+ response_data = await self.api_client.call_api(
808
+ *_param, _request_timeout=_request_timeout
809
+ )
810
+ await response_data.read()
811
+ return self.api_client.response_deserialize(
812
+ response_data=response_data,
813
+ response_types_map=_response_types_map,
814
+ ).data
815
+
816
+ @validate_call
817
+ async def get_memory_usage_with_http_info(
818
+ self,
819
+ _request_timeout: Union[
820
+ None,
821
+ Annotated[StrictFloat, Field(gt=0)],
822
+ Tuple[
823
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
824
+ ],
825
+ ] = None,
826
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
827
+ _content_type: Optional[StrictStr] = None,
828
+ _headers: Optional[Dict[StrictStr, Any]] = None,
829
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
830
+ ) -> ApiResponse[int]:
831
+ """Get Memory Usage
832
+
833
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
834
+
835
+ :param _request_timeout: timeout setting for this request. If one
836
+ number provided, it will be total request
837
+ timeout. It can also be a pair (tuple) of
838
+ (connection, read) timeouts.
839
+ :type _request_timeout: int, tuple(int, int), optional
840
+ :param _request_auth: set to override the auth_settings for an a single
841
+ request; this effectively ignores the
842
+ authentication in the spec for a single request.
843
+ :type _request_auth: dict, optional
844
+ :param _content_type: force content-type for the request.
845
+ :type _content_type: str, Optional
846
+ :param _headers: set to override the headers for a single
847
+ request; this effectively ignores the headers
848
+ in the spec for a single request.
849
+ :type _headers: dict, optional
850
+ :param _host_index: set to override the host_index for a single
851
+ request; this effectively ignores the host_index
852
+ in the spec for a single request.
853
+ :type _host_index: int, optional
854
+ :return: Returns the result object.
855
+ """ # noqa: E501
856
+
857
+ _param = self._get_memory_usage_serialize(
858
+ _request_auth=_request_auth,
859
+ _content_type=_content_type,
860
+ _headers=_headers,
861
+ _host_index=_host_index,
862
+ )
863
+
864
+ _response_types_map: Dict[str, Optional[str]] = {
865
+ "200": "int",
866
+ }
867
+ response_data = await self.api_client.call_api(
868
+ *_param, _request_timeout=_request_timeout
869
+ )
870
+ await response_data.read()
871
+ return self.api_client.response_deserialize(
872
+ response_data=response_data,
873
+ response_types_map=_response_types_map,
874
+ )
875
+
876
+ @validate_call
877
+ async def get_memory_usage_without_preload_content(
878
+ self,
879
+ _request_timeout: Union[
880
+ None,
881
+ Annotated[StrictFloat, Field(gt=0)],
882
+ Tuple[
883
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
884
+ ],
885
+ ] = None,
886
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
887
+ _content_type: Optional[StrictStr] = None,
888
+ _headers: Optional[Dict[StrictStr, Any]] = None,
889
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
890
+ ) -> RESTResponseType:
891
+ """Get Memory Usage
892
+
893
+ Resident Set Size (RSS) in MB — the actual memory used by the process in RAM. Represents the physical memory footprint. Important for monitoring real usage.
894
+
895
+ :param _request_timeout: timeout setting for this request. If one
896
+ number provided, it will be total request
897
+ timeout. It can also be a pair (tuple) of
898
+ (connection, read) timeouts.
899
+ :type _request_timeout: int, tuple(int, int), optional
900
+ :param _request_auth: set to override the auth_settings for an a single
901
+ request; this effectively ignores the
902
+ authentication in the spec for a single request.
903
+ :type _request_auth: dict, optional
904
+ :param _content_type: force content-type for the request.
905
+ :type _content_type: str, Optional
906
+ :param _headers: set to override the headers for a single
907
+ request; this effectively ignores the headers
908
+ in the spec for a single request.
909
+ :type _headers: dict, optional
910
+ :param _host_index: set to override the host_index for a single
911
+ request; this effectively ignores the host_index
912
+ in the spec for a single request.
913
+ :type _host_index: int, optional
914
+ :return: Returns the result object.
915
+ """ # noqa: E501
916
+
917
+ _param = self._get_memory_usage_serialize(
918
+ _request_auth=_request_auth,
919
+ _content_type=_content_type,
920
+ _headers=_headers,
921
+ _host_index=_host_index,
922
+ )
923
+
924
+ _response_types_map: Dict[str, Optional[str]] = {
925
+ "200": "int",
926
+ }
927
+ response_data = await self.api_client.call_api(
928
+ *_param, _request_timeout=_request_timeout
929
+ )
930
+ return response_data.response
931
+
932
+ def _get_memory_usage_serialize(
933
+ self,
934
+ _request_auth,
935
+ _content_type,
936
+ _headers,
937
+ _host_index,
938
+ ) -> RequestSerialized:
939
+
940
+ _host = None
941
+
942
+ _collection_formats: Dict[str, str] = {}
943
+
944
+ _path_params: Dict[str, str] = {}
945
+ _query_params: List[Tuple[str, str]] = []
946
+ _header_params: Dict[str, Optional[str]] = _headers or {}
947
+ _form_params: List[Tuple[str, str]] = []
948
+ _files: Dict[
949
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
950
+ ] = {}
951
+ _body_params: Optional[bytes] = None
952
+
953
+ # process the path parameters
954
+ # process the query parameters
955
+ # process the header parameters
956
+ # process the form parameters
957
+ # process the body parameter
958
+
959
+ # set the HTTP header `Accept`
960
+ if "Accept" not in _header_params:
961
+ _header_params["Accept"] = self.api_client.select_header_accept(
962
+ ["application/json"]
963
+ )
964
+
965
+ # authentication setting
966
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
967
+
968
+ return self.api_client.param_serialize(
969
+ method="GET",
970
+ resource_path="/admin/memory",
971
+ path_params=_path_params,
972
+ query_params=_query_params,
973
+ header_params=_header_params,
974
+ body=_body_params,
975
+ post_params=_form_params,
976
+ files=_files,
977
+ auth_settings=_auth_settings,
978
+ collection_formats=_collection_formats,
979
+ _host=_host,
980
+ _request_auth=_request_auth,
981
+ )
982
+
983
+ @validate_call
984
+ async def get_threads(
985
+ self,
986
+ _request_timeout: Union[
987
+ None,
988
+ Annotated[StrictFloat, Field(gt=0)],
989
+ Tuple[
990
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
991
+ ],
992
+ ] = None,
993
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
994
+ _content_type: Optional[StrictStr] = None,
995
+ _headers: Optional[Dict[StrictStr, Any]] = None,
996
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
997
+ ) -> Dict[str, object]:
998
+ """Get Threads
999
+
1000
+ Return count and names of active threads.
1001
+
1002
+ :param _request_timeout: timeout setting for this request. If one
1003
+ number provided, it will be total request
1004
+ timeout. It can also be a pair (tuple) of
1005
+ (connection, read) timeouts.
1006
+ :type _request_timeout: int, tuple(int, int), optional
1007
+ :param _request_auth: set to override the auth_settings for an a single
1008
+ request; this effectively ignores the
1009
+ authentication in the spec for a single request.
1010
+ :type _request_auth: dict, optional
1011
+ :param _content_type: force content-type for the request.
1012
+ :type _content_type: str, Optional
1013
+ :param _headers: set to override the headers for a single
1014
+ request; this effectively ignores the headers
1015
+ in the spec for a single request.
1016
+ :type _headers: dict, optional
1017
+ :param _host_index: set to override the host_index for a single
1018
+ request; this effectively ignores the host_index
1019
+ in the spec for a single request.
1020
+ :type _host_index: int, optional
1021
+ :return: Returns the result object.
1022
+ """ # noqa: E501
1023
+
1024
+ _param = self._get_threads_serialize(
1025
+ _request_auth=_request_auth,
1026
+ _content_type=_content_type,
1027
+ _headers=_headers,
1028
+ _host_index=_host_index,
1029
+ )
1030
+
1031
+ _response_types_map: Dict[str, Optional[str]] = {
1032
+ "200": "Dict[str, object]",
1033
+ }
1034
+ response_data = await self.api_client.call_api(
1035
+ *_param, _request_timeout=_request_timeout
1036
+ )
1037
+ await response_data.read()
1038
+ return self.api_client.response_deserialize(
1039
+ response_data=response_data,
1040
+ response_types_map=_response_types_map,
1041
+ ).data
1042
+
1043
+ @validate_call
1044
+ async def get_threads_with_http_info(
1045
+ self,
1046
+ _request_timeout: Union[
1047
+ None,
1048
+ Annotated[StrictFloat, Field(gt=0)],
1049
+ Tuple[
1050
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1051
+ ],
1052
+ ] = None,
1053
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1054
+ _content_type: Optional[StrictStr] = None,
1055
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1056
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1057
+ ) -> ApiResponse[Dict[str, object]]:
1058
+ """Get Threads
1059
+
1060
+ Return count and names of active threads.
1061
+
1062
+ :param _request_timeout: timeout setting for this request. If one
1063
+ number provided, it will be total request
1064
+ timeout. It can also be a pair (tuple) of
1065
+ (connection, read) timeouts.
1066
+ :type _request_timeout: int, tuple(int, int), optional
1067
+ :param _request_auth: set to override the auth_settings for an a single
1068
+ request; this effectively ignores the
1069
+ authentication in the spec for a single request.
1070
+ :type _request_auth: dict, optional
1071
+ :param _content_type: force content-type for the request.
1072
+ :type _content_type: str, Optional
1073
+ :param _headers: set to override the headers for a single
1074
+ request; this effectively ignores the headers
1075
+ in the spec for a single request.
1076
+ :type _headers: dict, optional
1077
+ :param _host_index: set to override the host_index for a single
1078
+ request; this effectively ignores the host_index
1079
+ in the spec for a single request.
1080
+ :type _host_index: int, optional
1081
+ :return: Returns the result object.
1082
+ """ # noqa: E501
1083
+
1084
+ _param = self._get_threads_serialize(
1085
+ _request_auth=_request_auth,
1086
+ _content_type=_content_type,
1087
+ _headers=_headers,
1088
+ _host_index=_host_index,
1089
+ )
1090
+
1091
+ _response_types_map: Dict[str, Optional[str]] = {
1092
+ "200": "Dict[str, object]",
1093
+ }
1094
+ response_data = await self.api_client.call_api(
1095
+ *_param, _request_timeout=_request_timeout
1096
+ )
1097
+ await response_data.read()
1098
+ return self.api_client.response_deserialize(
1099
+ response_data=response_data,
1100
+ response_types_map=_response_types_map,
1101
+ )
1102
+
1103
+ @validate_call
1104
+ async def get_threads_without_preload_content(
1105
+ self,
1106
+ _request_timeout: Union[
1107
+ None,
1108
+ Annotated[StrictFloat, Field(gt=0)],
1109
+ Tuple[
1110
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1111
+ ],
1112
+ ] = None,
1113
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1114
+ _content_type: Optional[StrictStr] = None,
1115
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1116
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1117
+ ) -> RESTResponseType:
1118
+ """Get Threads
1119
+
1120
+ Return count and names of active threads.
1121
+
1122
+ :param _request_timeout: timeout setting for this request. If one
1123
+ number provided, it will be total request
1124
+ timeout. It can also be a pair (tuple) of
1125
+ (connection, read) timeouts.
1126
+ :type _request_timeout: int, tuple(int, int), optional
1127
+ :param _request_auth: set to override the auth_settings for an a single
1128
+ request; this effectively ignores the
1129
+ authentication in the spec for a single request.
1130
+ :type _request_auth: dict, optional
1131
+ :param _content_type: force content-type for the request.
1132
+ :type _content_type: str, Optional
1133
+ :param _headers: set to override the headers for a single
1134
+ request; this effectively ignores the headers
1135
+ in the spec for a single request.
1136
+ :type _headers: dict, optional
1137
+ :param _host_index: set to override the host_index for a single
1138
+ request; this effectively ignores the host_index
1139
+ in the spec for a single request.
1140
+ :type _host_index: int, optional
1141
+ :return: Returns the result object.
1142
+ """ # noqa: E501
1143
+
1144
+ _param = self._get_threads_serialize(
1145
+ _request_auth=_request_auth,
1146
+ _content_type=_content_type,
1147
+ _headers=_headers,
1148
+ _host_index=_host_index,
1149
+ )
1150
+
1151
+ _response_types_map: Dict[str, Optional[str]] = {
1152
+ "200": "Dict[str, object]",
1153
+ }
1154
+ response_data = await self.api_client.call_api(
1155
+ *_param, _request_timeout=_request_timeout
1156
+ )
1157
+ return response_data.response
1158
+
1159
+ def _get_threads_serialize(
1160
+ self,
1161
+ _request_auth,
1162
+ _content_type,
1163
+ _headers,
1164
+ _host_index,
1165
+ ) -> RequestSerialized:
1166
+
1167
+ _host = None
1168
+
1169
+ _collection_formats: Dict[str, str] = {}
1170
+
1171
+ _path_params: Dict[str, str] = {}
1172
+ _query_params: List[Tuple[str, str]] = []
1173
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1174
+ _form_params: List[Tuple[str, str]] = []
1175
+ _files: Dict[
1176
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1177
+ ] = {}
1178
+ _body_params: Optional[bytes] = None
1179
+
1180
+ # process the path parameters
1181
+ # process the query parameters
1182
+ # process the header parameters
1183
+ # process the form parameters
1184
+ # process the body parameter
1185
+
1186
+ # set the HTTP header `Accept`
1187
+ if "Accept" not in _header_params:
1188
+ _header_params["Accept"] = self.api_client.select_header_accept(
1189
+ ["application/json"]
1190
+ )
1191
+
1192
+ # authentication setting
1193
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1194
+
1195
+ return self.api_client.param_serialize(
1196
+ method="GET",
1197
+ resource_path="/admin/threads",
1198
+ path_params=_path_params,
1199
+ query_params=_query_params,
1200
+ header_params=_header_params,
1201
+ body=_body_params,
1202
+ post_params=_form_params,
1203
+ files=_files,
1204
+ auth_settings=_auth_settings,
1205
+ collection_formats=_collection_formats,
1206
+ _host=_host,
1207
+ _request_auth=_request_auth,
1208
+ )
1209
+
1210
+ @validate_call
1211
+ async def get_uptime(
1212
+ self,
1213
+ type: Optional[StrictStr] = None,
1214
+ _request_timeout: Union[
1215
+ None,
1216
+ Annotated[StrictFloat, Field(gt=0)],
1217
+ Tuple[
1218
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1219
+ ],
1220
+ ] = None,
1221
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1222
+ _content_type: Optional[StrictStr] = None,
1223
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1224
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1225
+ ) -> str:
1226
+ """Get Uptime
1227
+
1228
+ Return the server uptime in seconds or human-readable form.
1229
+
1230
+ :param type:
1231
+ :type type: str
1232
+ :param _request_timeout: timeout setting for this request. If one
1233
+ number provided, it will be total request
1234
+ timeout. It can also be a pair (tuple) of
1235
+ (connection, read) timeouts.
1236
+ :type _request_timeout: int, tuple(int, int), optional
1237
+ :param _request_auth: set to override the auth_settings for an a single
1238
+ request; this effectively ignores the
1239
+ authentication in the spec for a single request.
1240
+ :type _request_auth: dict, optional
1241
+ :param _content_type: force content-type for the request.
1242
+ :type _content_type: str, Optional
1243
+ :param _headers: set to override the headers for a single
1244
+ request; this effectively ignores the headers
1245
+ in the spec for a single request.
1246
+ :type _headers: dict, optional
1247
+ :param _host_index: set to override the host_index for a single
1248
+ request; this effectively ignores the host_index
1249
+ in the spec for a single request.
1250
+ :type _host_index: int, optional
1251
+ :return: Returns the result object.
1252
+ """ # noqa: E501
1253
+
1254
+ _param = self._get_uptime_serialize(
1255
+ type=type,
1256
+ _request_auth=_request_auth,
1257
+ _content_type=_content_type,
1258
+ _headers=_headers,
1259
+ _host_index=_host_index,
1260
+ )
1261
+
1262
+ _response_types_map: Dict[str, Optional[str]] = {
1263
+ "200": "str",
1264
+ }
1265
+ response_data = await self.api_client.call_api(
1266
+ *_param, _request_timeout=_request_timeout
1267
+ )
1268
+ await response_data.read()
1269
+ return self.api_client.response_deserialize(
1270
+ response_data=response_data,
1271
+ response_types_map=_response_types_map,
1272
+ ).data
1273
+
1274
+ @validate_call
1275
+ async def get_uptime_with_http_info(
1276
+ self,
1277
+ type: Optional[StrictStr] = None,
1278
+ _request_timeout: Union[
1279
+ None,
1280
+ Annotated[StrictFloat, Field(gt=0)],
1281
+ Tuple[
1282
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1283
+ ],
1284
+ ] = None,
1285
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1286
+ _content_type: Optional[StrictStr] = None,
1287
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1288
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1289
+ ) -> ApiResponse[str]:
1290
+ """Get Uptime
1291
+
1292
+ Return the server uptime in seconds or human-readable form.
1293
+
1294
+ :param type:
1295
+ :type type: str
1296
+ :param _request_timeout: timeout setting for this request. If one
1297
+ number provided, it will be total request
1298
+ timeout. It can also be a pair (tuple) of
1299
+ (connection, read) timeouts.
1300
+ :type _request_timeout: int, tuple(int, int), optional
1301
+ :param _request_auth: set to override the auth_settings for an a single
1302
+ request; this effectively ignores the
1303
+ authentication in the spec for a single request.
1304
+ :type _request_auth: dict, optional
1305
+ :param _content_type: force content-type for the request.
1306
+ :type _content_type: str, Optional
1307
+ :param _headers: set to override the headers for a single
1308
+ request; this effectively ignores the headers
1309
+ in the spec for a single request.
1310
+ :type _headers: dict, optional
1311
+ :param _host_index: set to override the host_index for a single
1312
+ request; this effectively ignores the host_index
1313
+ in the spec for a single request.
1314
+ :type _host_index: int, optional
1315
+ :return: Returns the result object.
1316
+ """ # noqa: E501
1317
+
1318
+ _param = self._get_uptime_serialize(
1319
+ type=type,
1320
+ _request_auth=_request_auth,
1321
+ _content_type=_content_type,
1322
+ _headers=_headers,
1323
+ _host_index=_host_index,
1324
+ )
1325
+
1326
+ _response_types_map: Dict[str, Optional[str]] = {
1327
+ "200": "str",
1328
+ }
1329
+ response_data = await self.api_client.call_api(
1330
+ *_param, _request_timeout=_request_timeout
1331
+ )
1332
+ await response_data.read()
1333
+ return self.api_client.response_deserialize(
1334
+ response_data=response_data,
1335
+ response_types_map=_response_types_map,
1336
+ )
1337
+
1338
+ @validate_call
1339
+ async def get_uptime_without_preload_content(
1340
+ self,
1341
+ type: Optional[StrictStr] = None,
1342
+ _request_timeout: Union[
1343
+ None,
1344
+ Annotated[StrictFloat, Field(gt=0)],
1345
+ Tuple[
1346
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1347
+ ],
1348
+ ] = None,
1349
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1350
+ _content_type: Optional[StrictStr] = None,
1351
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1352
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1353
+ ) -> RESTResponseType:
1354
+ """Get Uptime
1355
+
1356
+ Return the server uptime in seconds or human-readable form.
1357
+
1358
+ :param type:
1359
+ :type type: str
1360
+ :param _request_timeout: timeout setting for this request. If one
1361
+ number provided, it will be total request
1362
+ timeout. It can also be a pair (tuple) of
1363
+ (connection, read) timeouts.
1364
+ :type _request_timeout: int, tuple(int, int), optional
1365
+ :param _request_auth: set to override the auth_settings for an a single
1366
+ request; this effectively ignores the
1367
+ authentication in the spec for a single request.
1368
+ :type _request_auth: dict, optional
1369
+ :param _content_type: force content-type for the request.
1370
+ :type _content_type: str, Optional
1371
+ :param _headers: set to override the headers for a single
1372
+ request; this effectively ignores the headers
1373
+ in the spec for a single request.
1374
+ :type _headers: dict, optional
1375
+ :param _host_index: set to override the host_index for a single
1376
+ request; this effectively ignores the host_index
1377
+ in the spec for a single request.
1378
+ :type _host_index: int, optional
1379
+ :return: Returns the result object.
1380
+ """ # noqa: E501
1381
+
1382
+ _param = self._get_uptime_serialize(
1383
+ type=type,
1384
+ _request_auth=_request_auth,
1385
+ _content_type=_content_type,
1386
+ _headers=_headers,
1387
+ _host_index=_host_index,
1388
+ )
1389
+
1390
+ _response_types_map: Dict[str, Optional[str]] = {
1391
+ "200": "str",
1392
+ }
1393
+ response_data = await self.api_client.call_api(
1394
+ *_param, _request_timeout=_request_timeout
1395
+ )
1396
+ return response_data.response
1397
+
1398
+ def _get_uptime_serialize(
1399
+ self,
1400
+ type,
1401
+ _request_auth,
1402
+ _content_type,
1403
+ _headers,
1404
+ _host_index,
1405
+ ) -> RequestSerialized:
1406
+
1407
+ _host = None
1408
+
1409
+ _collection_formats: Dict[str, str] = {}
1410
+
1411
+ _path_params: Dict[str, str] = {}
1412
+ _query_params: List[Tuple[str, str]] = []
1413
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1414
+ _form_params: List[Tuple[str, str]] = []
1415
+ _files: Dict[
1416
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1417
+ ] = {}
1418
+ _body_params: Optional[bytes] = None
1419
+
1420
+ # process the path parameters
1421
+ # process the query parameters
1422
+ if type is not None:
1423
+
1424
+ _query_params.append(("type", type))
1425
+
1426
+ # process the header parameters
1427
+ # process the form parameters
1428
+ # process the body parameter
1429
+
1430
+ # set the HTTP header `Accept`
1431
+ if "Accept" not in _header_params:
1432
+ _header_params["Accept"] = self.api_client.select_header_accept(
1433
+ ["application/json"]
1434
+ )
1435
+
1436
+ # authentication setting
1437
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1438
+
1439
+ return self.api_client.param_serialize(
1440
+ method="GET",
1441
+ resource_path="/admin/uptime",
1442
+ path_params=_path_params,
1443
+ query_params=_query_params,
1444
+ header_params=_header_params,
1445
+ body=_body_params,
1446
+ post_params=_form_params,
1447
+ files=_files,
1448
+ auth_settings=_auth_settings,
1449
+ collection_formats=_collection_formats,
1450
+ _host=_host,
1451
+ _request_auth=_request_auth,
1452
+ )