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