crypticorn 2.8.0rc9__py3-none-any.whl → 2.9.0rc1__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 (33) hide show
  1. crypticorn/cli/init.py +2 -2
  2. crypticorn/common/router/admin_router.py +7 -9
  3. crypticorn/klines/client/__init__.py +9 -1
  4. crypticorn/klines/client/api/__init__.py +1 -0
  5. crypticorn/klines/client/api/admin_api.py +1455 -0
  6. crypticorn/klines/client/api/change_in_timeframe_api.py +24 -20
  7. crypticorn/klines/client/api/funding_rates_api.py +12 -10
  8. crypticorn/klines/client/api/ohlcv_data_api.py +37 -24
  9. crypticorn/klines/client/api/status_api.py +8 -235
  10. crypticorn/klines/client/api/symbols_api.py +12 -9
  11. crypticorn/klines/client/api/udf_api.py +6 -6
  12. crypticorn/klines/client/models/__init__.py +8 -1
  13. crypticorn/klines/client/models/api_error_identifier.py +115 -0
  14. crypticorn/klines/client/models/api_error_level.py +37 -0
  15. crypticorn/klines/client/models/api_error_type.py +37 -0
  16. crypticorn/klines/client/models/exception_detail.py +6 -3
  17. crypticorn/klines/client/models/funding_rate.py +6 -12
  18. crypticorn/klines/client/models/funding_rate_response.py +103 -0
  19. crypticorn/klines/client/models/internal_exchange.py +39 -0
  20. crypticorn/klines/client/models/log_level.py +38 -0
  21. crypticorn/klines/client/models/market_type.py +35 -0
  22. crypticorn/klines/client/models/{ohlcv_history.py → ohlcv.py} +12 -13
  23. crypticorn/klines/client/models/search_symbol.py +3 -4
  24. crypticorn/klines/client/models/udf_config.py +2 -1
  25. crypticorn/klines/main.py +1 -13
  26. crypticorn/metrics/client/api/admin_api.py +22 -19
  27. crypticorn/metrics/client/api/status_api.py +6 -6
  28. crypticorn/metrics/client/configuration.py +4 -2
  29. {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/METADATA +1 -1
  30. {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/RECORD +33 -25
  31. {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/WHEEL +0 -0
  32. {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/entry_points.txt +0 -0
  33. {crypticorn-2.8.0rc9.dist-info → crypticorn-2.9.0rc1.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1455 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Klines Service API
5
+
6
+ API for retrieving OHLCV data, funding rates, and symbol information from Binance.
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, StrictFloat, StrictInt, StrictStr, field_validator
20
+ from typing import Any, Dict, List, Optional, Union
21
+ from typing_extensions import Annotated
22
+ from crypticorn.klines.client.models.log_level import LogLevel
23
+
24
+ from crypticorn.klines.client.api_client import ApiClient, RequestSerialized
25
+ from crypticorn.klines.client.api_response import ApiResponse
26
+ from crypticorn.klines.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
+ """(Deprecated) Get Logging Level
545
+
546
+ Get the log level of the server logger. Will be removed in a future release.
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
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
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
+ """(Deprecated) Get Logging Level
606
+
607
+ Get the log level of the server logger. Will be removed in a future release.
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
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
631
+
632
+ _param = self._get_log_level_serialize(
633
+ _request_auth=_request_auth,
634
+ _content_type=_content_type,
635
+ _headers=_headers,
636
+ _host_index=_host_index,
637
+ )
638
+
639
+ _response_types_map: Dict[str, Optional[str]] = {
640
+ "200": "LogLevel",
641
+ }
642
+ response_data = await self.api_client.call_api(
643
+ *_param, _request_timeout=_request_timeout
644
+ )
645
+ await response_data.read()
646
+ return self.api_client.response_deserialize(
647
+ response_data=response_data,
648
+ response_types_map=_response_types_map,
649
+ )
650
+
651
+ @validate_call
652
+ async def get_log_level_without_preload_content(
653
+ self,
654
+ _request_timeout: Union[
655
+ None,
656
+ Annotated[StrictFloat, Field(gt=0)],
657
+ Tuple[
658
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
659
+ ],
660
+ ] = None,
661
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
662
+ _content_type: Optional[StrictStr] = None,
663
+ _headers: Optional[Dict[StrictStr, Any]] = None,
664
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
665
+ ) -> RESTResponseType:
666
+ """(Deprecated) Get Logging Level
667
+
668
+ Get the log level of the server logger. Will be removed in a future release.
669
+
670
+ :param _request_timeout: timeout setting for this request. If one
671
+ number provided, it will be total request
672
+ timeout. It can also be a pair (tuple) of
673
+ (connection, read) timeouts.
674
+ :type _request_timeout: int, tuple(int, int), optional
675
+ :param _request_auth: set to override the auth_settings for an a single
676
+ request; this effectively ignores the
677
+ authentication in the spec for a single request.
678
+ :type _request_auth: dict, optional
679
+ :param _content_type: force content-type for the request.
680
+ :type _content_type: str, Optional
681
+ :param _headers: set to override the headers for a single
682
+ request; this effectively ignores the headers
683
+ in the spec for a single request.
684
+ :type _headers: dict, optional
685
+ :param _host_index: set to override the host_index for a single
686
+ request; this effectively ignores the host_index
687
+ in the spec for a single request.
688
+ :type _host_index: int, optional
689
+ :return: Returns the result object.
690
+ """ # noqa: E501
691
+ warnings.warn("GET /admin/log-level is deprecated.", DeprecationWarning)
692
+
693
+ _param = self._get_log_level_serialize(
694
+ _request_auth=_request_auth,
695
+ _content_type=_content_type,
696
+ _headers=_headers,
697
+ _host_index=_host_index,
698
+ )
699
+
700
+ _response_types_map: Dict[str, Optional[str]] = {
701
+ "200": "LogLevel",
702
+ }
703
+ response_data = await self.api_client.call_api(
704
+ *_param, _request_timeout=_request_timeout
705
+ )
706
+ return response_data.response
707
+
708
+ def _get_log_level_serialize(
709
+ self,
710
+ _request_auth,
711
+ _content_type,
712
+ _headers,
713
+ _host_index,
714
+ ) -> RequestSerialized:
715
+
716
+ _host = None
717
+
718
+ _collection_formats: Dict[str, str] = {}
719
+
720
+ _path_params: Dict[str, str] = {}
721
+ _query_params: List[Tuple[str, str]] = []
722
+ _header_params: Dict[str, Optional[str]] = _headers or {}
723
+ _form_params: List[Tuple[str, str]] = []
724
+ _files: Dict[
725
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
726
+ ] = {}
727
+ _body_params: Optional[bytes] = None
728
+
729
+ # process the path parameters
730
+ # process the query parameters
731
+ # process the header parameters
732
+ # process the form parameters
733
+ # process the body parameter
734
+
735
+ # set the HTTP header `Accept`
736
+ if "Accept" not in _header_params:
737
+ _header_params["Accept"] = self.api_client.select_header_accept(
738
+ ["application/json"]
739
+ )
740
+
741
+ # authentication setting
742
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
743
+
744
+ return self.api_client.param_serialize(
745
+ method="GET",
746
+ resource_path="/admin/log-level",
747
+ path_params=_path_params,
748
+ query_params=_query_params,
749
+ header_params=_header_params,
750
+ body=_body_params,
751
+ post_params=_form_params,
752
+ files=_files,
753
+ auth_settings=_auth_settings,
754
+ collection_formats=_collection_formats,
755
+ _host=_host,
756
+ _request_auth=_request_auth,
757
+ )
758
+
759
+ @validate_call
760
+ async def get_memory_usage(
761
+ self,
762
+ _request_timeout: Union[
763
+ None,
764
+ Annotated[StrictFloat, Field(gt=0)],
765
+ Tuple[
766
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
767
+ ],
768
+ ] = None,
769
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
770
+ _content_type: Optional[StrictStr] = None,
771
+ _headers: Optional[Dict[StrictStr, Any]] = None,
772
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
773
+ ) -> float:
774
+ """Get Memory Usage
775
+
776
+ 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.
777
+
778
+ :param _request_timeout: timeout setting for this request. If one
779
+ number provided, it will be total request
780
+ timeout. It can also be a pair (tuple) of
781
+ (connection, read) timeouts.
782
+ :type _request_timeout: int, tuple(int, int), optional
783
+ :param _request_auth: set to override the auth_settings for an a single
784
+ request; this effectively ignores the
785
+ authentication in the spec for a single request.
786
+ :type _request_auth: dict, optional
787
+ :param _content_type: force content-type for the request.
788
+ :type _content_type: str, Optional
789
+ :param _headers: set to override the headers for a single
790
+ request; this effectively ignores the headers
791
+ in the spec for a single request.
792
+ :type _headers: dict, optional
793
+ :param _host_index: set to override the host_index for a single
794
+ request; this effectively ignores the host_index
795
+ in the spec for a single request.
796
+ :type _host_index: int, optional
797
+ :return: Returns the result object.
798
+ """ # noqa: E501
799
+
800
+ _param = self._get_memory_usage_serialize(
801
+ _request_auth=_request_auth,
802
+ _content_type=_content_type,
803
+ _headers=_headers,
804
+ _host_index=_host_index,
805
+ )
806
+
807
+ _response_types_map: Dict[str, Optional[str]] = {
808
+ "200": "float",
809
+ }
810
+ response_data = await self.api_client.call_api(
811
+ *_param, _request_timeout=_request_timeout
812
+ )
813
+ await response_data.read()
814
+ return self.api_client.response_deserialize(
815
+ response_data=response_data,
816
+ response_types_map=_response_types_map,
817
+ ).data
818
+
819
+ @validate_call
820
+ async def get_memory_usage_with_http_info(
821
+ self,
822
+ _request_timeout: Union[
823
+ None,
824
+ Annotated[StrictFloat, Field(gt=0)],
825
+ Tuple[
826
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
827
+ ],
828
+ ] = None,
829
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
830
+ _content_type: Optional[StrictStr] = None,
831
+ _headers: Optional[Dict[StrictStr, Any]] = None,
832
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
833
+ ) -> ApiResponse[float]:
834
+ """Get Memory Usage
835
+
836
+ 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.
837
+
838
+ :param _request_timeout: timeout setting for this request. If one
839
+ number provided, it will be total request
840
+ timeout. It can also be a pair (tuple) of
841
+ (connection, read) timeouts.
842
+ :type _request_timeout: int, tuple(int, int), optional
843
+ :param _request_auth: set to override the auth_settings for an a single
844
+ request; this effectively ignores the
845
+ authentication in the spec for a single request.
846
+ :type _request_auth: dict, optional
847
+ :param _content_type: force content-type for the request.
848
+ :type _content_type: str, Optional
849
+ :param _headers: set to override the headers for a single
850
+ request; this effectively ignores the headers
851
+ in the spec for a single request.
852
+ :type _headers: dict, optional
853
+ :param _host_index: set to override the host_index for a single
854
+ request; this effectively ignores the host_index
855
+ in the spec for a single request.
856
+ :type _host_index: int, optional
857
+ :return: Returns the result object.
858
+ """ # noqa: E501
859
+
860
+ _param = self._get_memory_usage_serialize(
861
+ _request_auth=_request_auth,
862
+ _content_type=_content_type,
863
+ _headers=_headers,
864
+ _host_index=_host_index,
865
+ )
866
+
867
+ _response_types_map: Dict[str, Optional[str]] = {
868
+ "200": "float",
869
+ }
870
+ response_data = await self.api_client.call_api(
871
+ *_param, _request_timeout=_request_timeout
872
+ )
873
+ await response_data.read()
874
+ return self.api_client.response_deserialize(
875
+ response_data=response_data,
876
+ response_types_map=_response_types_map,
877
+ )
878
+
879
+ @validate_call
880
+ async def get_memory_usage_without_preload_content(
881
+ self,
882
+ _request_timeout: Union[
883
+ None,
884
+ Annotated[StrictFloat, Field(gt=0)],
885
+ Tuple[
886
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
887
+ ],
888
+ ] = None,
889
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
890
+ _content_type: Optional[StrictStr] = None,
891
+ _headers: Optional[Dict[StrictStr, Any]] = None,
892
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
893
+ ) -> RESTResponseType:
894
+ """Get Memory Usage
895
+
896
+ 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.
897
+
898
+ :param _request_timeout: timeout setting for this request. If one
899
+ number provided, it will be total request
900
+ timeout. It can also be a pair (tuple) of
901
+ (connection, read) timeouts.
902
+ :type _request_timeout: int, tuple(int, int), optional
903
+ :param _request_auth: set to override the auth_settings for an a single
904
+ request; this effectively ignores the
905
+ authentication in the spec for a single request.
906
+ :type _request_auth: dict, optional
907
+ :param _content_type: force content-type for the request.
908
+ :type _content_type: str, Optional
909
+ :param _headers: set to override the headers for a single
910
+ request; this effectively ignores the headers
911
+ in the spec for a single request.
912
+ :type _headers: dict, optional
913
+ :param _host_index: set to override the host_index for a single
914
+ request; this effectively ignores the host_index
915
+ in the spec for a single request.
916
+ :type _host_index: int, optional
917
+ :return: Returns the result object.
918
+ """ # noqa: E501
919
+
920
+ _param = self._get_memory_usage_serialize(
921
+ _request_auth=_request_auth,
922
+ _content_type=_content_type,
923
+ _headers=_headers,
924
+ _host_index=_host_index,
925
+ )
926
+
927
+ _response_types_map: Dict[str, Optional[str]] = {
928
+ "200": "float",
929
+ }
930
+ response_data = await self.api_client.call_api(
931
+ *_param, _request_timeout=_request_timeout
932
+ )
933
+ return response_data.response
934
+
935
+ def _get_memory_usage_serialize(
936
+ self,
937
+ _request_auth,
938
+ _content_type,
939
+ _headers,
940
+ _host_index,
941
+ ) -> RequestSerialized:
942
+
943
+ _host = None
944
+
945
+ _collection_formats: Dict[str, str] = {}
946
+
947
+ _path_params: Dict[str, str] = {}
948
+ _query_params: List[Tuple[str, str]] = []
949
+ _header_params: Dict[str, Optional[str]] = _headers or {}
950
+ _form_params: List[Tuple[str, str]] = []
951
+ _files: Dict[
952
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
953
+ ] = {}
954
+ _body_params: Optional[bytes] = None
955
+
956
+ # process the path parameters
957
+ # process the query parameters
958
+ # process the header parameters
959
+ # process the form parameters
960
+ # process the body parameter
961
+
962
+ # set the HTTP header `Accept`
963
+ if "Accept" not in _header_params:
964
+ _header_params["Accept"] = self.api_client.select_header_accept(
965
+ ["application/json"]
966
+ )
967
+
968
+ # authentication setting
969
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
970
+
971
+ return self.api_client.param_serialize(
972
+ method="GET",
973
+ resource_path="/admin/memory",
974
+ path_params=_path_params,
975
+ query_params=_query_params,
976
+ header_params=_header_params,
977
+ body=_body_params,
978
+ post_params=_form_params,
979
+ files=_files,
980
+ auth_settings=_auth_settings,
981
+ collection_formats=_collection_formats,
982
+ _host=_host,
983
+ _request_auth=_request_auth,
984
+ )
985
+
986
+ @validate_call
987
+ async def get_threads(
988
+ self,
989
+ _request_timeout: Union[
990
+ None,
991
+ Annotated[StrictFloat, Field(gt=0)],
992
+ Tuple[
993
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
994
+ ],
995
+ ] = None,
996
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
997
+ _content_type: Optional[StrictStr] = None,
998
+ _headers: Optional[Dict[StrictStr, Any]] = None,
999
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1000
+ ) -> Dict[str, object]:
1001
+ """Get Threads
1002
+
1003
+ Return count and names of active threads.
1004
+
1005
+ :param _request_timeout: timeout setting for this request. If one
1006
+ number provided, it will be total request
1007
+ timeout. It can also be a pair (tuple) of
1008
+ (connection, read) timeouts.
1009
+ :type _request_timeout: int, tuple(int, int), optional
1010
+ :param _request_auth: set to override the auth_settings for an a single
1011
+ request; this effectively ignores the
1012
+ authentication in the spec for a single request.
1013
+ :type _request_auth: dict, optional
1014
+ :param _content_type: force content-type for the request.
1015
+ :type _content_type: str, Optional
1016
+ :param _headers: set to override the headers for a single
1017
+ request; this effectively ignores the headers
1018
+ in the spec for a single request.
1019
+ :type _headers: dict, optional
1020
+ :param _host_index: set to override the host_index for a single
1021
+ request; this effectively ignores the host_index
1022
+ in the spec for a single request.
1023
+ :type _host_index: int, optional
1024
+ :return: Returns the result object.
1025
+ """ # noqa: E501
1026
+
1027
+ _param = self._get_threads_serialize(
1028
+ _request_auth=_request_auth,
1029
+ _content_type=_content_type,
1030
+ _headers=_headers,
1031
+ _host_index=_host_index,
1032
+ )
1033
+
1034
+ _response_types_map: Dict[str, Optional[str]] = {
1035
+ "200": "Dict[str, object]",
1036
+ }
1037
+ response_data = await self.api_client.call_api(
1038
+ *_param, _request_timeout=_request_timeout
1039
+ )
1040
+ await response_data.read()
1041
+ return self.api_client.response_deserialize(
1042
+ response_data=response_data,
1043
+ response_types_map=_response_types_map,
1044
+ ).data
1045
+
1046
+ @validate_call
1047
+ async def get_threads_with_http_info(
1048
+ self,
1049
+ _request_timeout: Union[
1050
+ None,
1051
+ Annotated[StrictFloat, Field(gt=0)],
1052
+ Tuple[
1053
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1054
+ ],
1055
+ ] = None,
1056
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1057
+ _content_type: Optional[StrictStr] = None,
1058
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1059
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1060
+ ) -> ApiResponse[Dict[str, object]]:
1061
+ """Get Threads
1062
+
1063
+ Return count and names of active threads.
1064
+
1065
+ :param _request_timeout: timeout setting for this request. If one
1066
+ number provided, it will be total request
1067
+ timeout. It can also be a pair (tuple) of
1068
+ (connection, read) timeouts.
1069
+ :type _request_timeout: int, tuple(int, int), optional
1070
+ :param _request_auth: set to override the auth_settings for an a single
1071
+ request; this effectively ignores the
1072
+ authentication in the spec for a single request.
1073
+ :type _request_auth: dict, optional
1074
+ :param _content_type: force content-type for the request.
1075
+ :type _content_type: str, Optional
1076
+ :param _headers: set to override the headers for a single
1077
+ request; this effectively ignores the headers
1078
+ in the spec for a single request.
1079
+ :type _headers: dict, optional
1080
+ :param _host_index: set to override the host_index for a single
1081
+ request; this effectively ignores the host_index
1082
+ in the spec for a single request.
1083
+ :type _host_index: int, optional
1084
+ :return: Returns the result object.
1085
+ """ # noqa: E501
1086
+
1087
+ _param = self._get_threads_serialize(
1088
+ _request_auth=_request_auth,
1089
+ _content_type=_content_type,
1090
+ _headers=_headers,
1091
+ _host_index=_host_index,
1092
+ )
1093
+
1094
+ _response_types_map: Dict[str, Optional[str]] = {
1095
+ "200": "Dict[str, object]",
1096
+ }
1097
+ response_data = await self.api_client.call_api(
1098
+ *_param, _request_timeout=_request_timeout
1099
+ )
1100
+ await response_data.read()
1101
+ return self.api_client.response_deserialize(
1102
+ response_data=response_data,
1103
+ response_types_map=_response_types_map,
1104
+ )
1105
+
1106
+ @validate_call
1107
+ async def get_threads_without_preload_content(
1108
+ self,
1109
+ _request_timeout: Union[
1110
+ None,
1111
+ Annotated[StrictFloat, Field(gt=0)],
1112
+ Tuple[
1113
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1114
+ ],
1115
+ ] = None,
1116
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1117
+ _content_type: Optional[StrictStr] = None,
1118
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1119
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1120
+ ) -> RESTResponseType:
1121
+ """Get Threads
1122
+
1123
+ Return count and names of active threads.
1124
+
1125
+ :param _request_timeout: timeout setting for this request. If one
1126
+ number provided, it will be total request
1127
+ timeout. It can also be a pair (tuple) of
1128
+ (connection, read) timeouts.
1129
+ :type _request_timeout: int, tuple(int, int), optional
1130
+ :param _request_auth: set to override the auth_settings for an a single
1131
+ request; this effectively ignores the
1132
+ authentication in the spec for a single request.
1133
+ :type _request_auth: dict, optional
1134
+ :param _content_type: force content-type for the request.
1135
+ :type _content_type: str, Optional
1136
+ :param _headers: set to override the headers for a single
1137
+ request; this effectively ignores the headers
1138
+ in the spec for a single request.
1139
+ :type _headers: dict, optional
1140
+ :param _host_index: set to override the host_index for a single
1141
+ request; this effectively ignores the host_index
1142
+ in the spec for a single request.
1143
+ :type _host_index: int, optional
1144
+ :return: Returns the result object.
1145
+ """ # noqa: E501
1146
+
1147
+ _param = self._get_threads_serialize(
1148
+ _request_auth=_request_auth,
1149
+ _content_type=_content_type,
1150
+ _headers=_headers,
1151
+ _host_index=_host_index,
1152
+ )
1153
+
1154
+ _response_types_map: Dict[str, Optional[str]] = {
1155
+ "200": "Dict[str, object]",
1156
+ }
1157
+ response_data = await self.api_client.call_api(
1158
+ *_param, _request_timeout=_request_timeout
1159
+ )
1160
+ return response_data.response
1161
+
1162
+ def _get_threads_serialize(
1163
+ self,
1164
+ _request_auth,
1165
+ _content_type,
1166
+ _headers,
1167
+ _host_index,
1168
+ ) -> RequestSerialized:
1169
+
1170
+ _host = None
1171
+
1172
+ _collection_formats: Dict[str, str] = {}
1173
+
1174
+ _path_params: Dict[str, str] = {}
1175
+ _query_params: List[Tuple[str, str]] = []
1176
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1177
+ _form_params: List[Tuple[str, str]] = []
1178
+ _files: Dict[
1179
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1180
+ ] = {}
1181
+ _body_params: Optional[bytes] = None
1182
+
1183
+ # process the path parameters
1184
+ # process the query parameters
1185
+ # process the header parameters
1186
+ # process the form parameters
1187
+ # process the body parameter
1188
+
1189
+ # set the HTTP header `Accept`
1190
+ if "Accept" not in _header_params:
1191
+ _header_params["Accept"] = self.api_client.select_header_accept(
1192
+ ["application/json"]
1193
+ )
1194
+
1195
+ # authentication setting
1196
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1197
+
1198
+ return self.api_client.param_serialize(
1199
+ method="GET",
1200
+ resource_path="/admin/threads",
1201
+ path_params=_path_params,
1202
+ query_params=_query_params,
1203
+ header_params=_header_params,
1204
+ body=_body_params,
1205
+ post_params=_form_params,
1206
+ files=_files,
1207
+ auth_settings=_auth_settings,
1208
+ collection_formats=_collection_formats,
1209
+ _host=_host,
1210
+ _request_auth=_request_auth,
1211
+ )
1212
+
1213
+ @validate_call
1214
+ async def get_uptime(
1215
+ self,
1216
+ type: Optional[StrictStr] = None,
1217
+ _request_timeout: Union[
1218
+ None,
1219
+ Annotated[StrictFloat, Field(gt=0)],
1220
+ Tuple[
1221
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1222
+ ],
1223
+ ] = None,
1224
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1225
+ _content_type: Optional[StrictStr] = None,
1226
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1227
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1228
+ ) -> str:
1229
+ """Get Uptime
1230
+
1231
+ Return the server uptime in seconds or human-readable form.
1232
+
1233
+ :param type:
1234
+ :type type: str
1235
+ :param _request_timeout: timeout setting for this request. If one
1236
+ number provided, it will be total request
1237
+ timeout. It can also be a pair (tuple) of
1238
+ (connection, read) timeouts.
1239
+ :type _request_timeout: int, tuple(int, int), optional
1240
+ :param _request_auth: set to override the auth_settings for an a single
1241
+ request; this effectively ignores the
1242
+ authentication in the spec for a single request.
1243
+ :type _request_auth: dict, optional
1244
+ :param _content_type: force content-type for the request.
1245
+ :type _content_type: str, Optional
1246
+ :param _headers: set to override the headers for a single
1247
+ request; this effectively ignores the headers
1248
+ in the spec for a single request.
1249
+ :type _headers: dict, optional
1250
+ :param _host_index: set to override the host_index for a single
1251
+ request; this effectively ignores the host_index
1252
+ in the spec for a single request.
1253
+ :type _host_index: int, optional
1254
+ :return: Returns the result object.
1255
+ """ # noqa: E501
1256
+
1257
+ _param = self._get_uptime_serialize(
1258
+ type=type,
1259
+ _request_auth=_request_auth,
1260
+ _content_type=_content_type,
1261
+ _headers=_headers,
1262
+ _host_index=_host_index,
1263
+ )
1264
+
1265
+ _response_types_map: Dict[str, Optional[str]] = {
1266
+ "200": "str",
1267
+ }
1268
+ response_data = await self.api_client.call_api(
1269
+ *_param, _request_timeout=_request_timeout
1270
+ )
1271
+ await response_data.read()
1272
+ return self.api_client.response_deserialize(
1273
+ response_data=response_data,
1274
+ response_types_map=_response_types_map,
1275
+ ).data
1276
+
1277
+ @validate_call
1278
+ async def get_uptime_with_http_info(
1279
+ self,
1280
+ type: Optional[StrictStr] = None,
1281
+ _request_timeout: Union[
1282
+ None,
1283
+ Annotated[StrictFloat, Field(gt=0)],
1284
+ Tuple[
1285
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1286
+ ],
1287
+ ] = None,
1288
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1289
+ _content_type: Optional[StrictStr] = None,
1290
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1291
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1292
+ ) -> ApiResponse[str]:
1293
+ """Get Uptime
1294
+
1295
+ Return the server uptime in seconds or human-readable form.
1296
+
1297
+ :param type:
1298
+ :type type: str
1299
+ :param _request_timeout: timeout setting for this request. If one
1300
+ number provided, it will be total request
1301
+ timeout. It can also be a pair (tuple) of
1302
+ (connection, read) timeouts.
1303
+ :type _request_timeout: int, tuple(int, int), optional
1304
+ :param _request_auth: set to override the auth_settings for an a single
1305
+ request; this effectively ignores the
1306
+ authentication in the spec for a single request.
1307
+ :type _request_auth: dict, optional
1308
+ :param _content_type: force content-type for the request.
1309
+ :type _content_type: str, Optional
1310
+ :param _headers: set to override the headers for a single
1311
+ request; this effectively ignores the headers
1312
+ in the spec for a single request.
1313
+ :type _headers: dict, optional
1314
+ :param _host_index: set to override the host_index for a single
1315
+ request; this effectively ignores the host_index
1316
+ in the spec for a single request.
1317
+ :type _host_index: int, optional
1318
+ :return: Returns the result object.
1319
+ """ # noqa: E501
1320
+
1321
+ _param = self._get_uptime_serialize(
1322
+ type=type,
1323
+ _request_auth=_request_auth,
1324
+ _content_type=_content_type,
1325
+ _headers=_headers,
1326
+ _host_index=_host_index,
1327
+ )
1328
+
1329
+ _response_types_map: Dict[str, Optional[str]] = {
1330
+ "200": "str",
1331
+ }
1332
+ response_data = await self.api_client.call_api(
1333
+ *_param, _request_timeout=_request_timeout
1334
+ )
1335
+ await response_data.read()
1336
+ return self.api_client.response_deserialize(
1337
+ response_data=response_data,
1338
+ response_types_map=_response_types_map,
1339
+ )
1340
+
1341
+ @validate_call
1342
+ async def get_uptime_without_preload_content(
1343
+ self,
1344
+ type: Optional[StrictStr] = None,
1345
+ _request_timeout: Union[
1346
+ None,
1347
+ Annotated[StrictFloat, Field(gt=0)],
1348
+ Tuple[
1349
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1350
+ ],
1351
+ ] = None,
1352
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1353
+ _content_type: Optional[StrictStr] = None,
1354
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1355
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1356
+ ) -> RESTResponseType:
1357
+ """Get Uptime
1358
+
1359
+ Return the server uptime in seconds or human-readable form.
1360
+
1361
+ :param type:
1362
+ :type type: str
1363
+ :param _request_timeout: timeout setting for this request. If one
1364
+ number provided, it will be total request
1365
+ timeout. It can also be a pair (tuple) of
1366
+ (connection, read) timeouts.
1367
+ :type _request_timeout: int, tuple(int, int), optional
1368
+ :param _request_auth: set to override the auth_settings for an a single
1369
+ request; this effectively ignores the
1370
+ authentication in the spec for a single request.
1371
+ :type _request_auth: dict, optional
1372
+ :param _content_type: force content-type for the request.
1373
+ :type _content_type: str, Optional
1374
+ :param _headers: set to override the headers for a single
1375
+ request; this effectively ignores the headers
1376
+ in the spec for a single request.
1377
+ :type _headers: dict, optional
1378
+ :param _host_index: set to override the host_index for a single
1379
+ request; this effectively ignores the host_index
1380
+ in the spec for a single request.
1381
+ :type _host_index: int, optional
1382
+ :return: Returns the result object.
1383
+ """ # noqa: E501
1384
+
1385
+ _param = self._get_uptime_serialize(
1386
+ type=type,
1387
+ _request_auth=_request_auth,
1388
+ _content_type=_content_type,
1389
+ _headers=_headers,
1390
+ _host_index=_host_index,
1391
+ )
1392
+
1393
+ _response_types_map: Dict[str, Optional[str]] = {
1394
+ "200": "str",
1395
+ }
1396
+ response_data = await self.api_client.call_api(
1397
+ *_param, _request_timeout=_request_timeout
1398
+ )
1399
+ return response_data.response
1400
+
1401
+ def _get_uptime_serialize(
1402
+ self,
1403
+ type,
1404
+ _request_auth,
1405
+ _content_type,
1406
+ _headers,
1407
+ _host_index,
1408
+ ) -> RequestSerialized:
1409
+
1410
+ _host = None
1411
+
1412
+ _collection_formats: Dict[str, str] = {}
1413
+
1414
+ _path_params: Dict[str, str] = {}
1415
+ _query_params: List[Tuple[str, str]] = []
1416
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1417
+ _form_params: List[Tuple[str, str]] = []
1418
+ _files: Dict[
1419
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1420
+ ] = {}
1421
+ _body_params: Optional[bytes] = None
1422
+
1423
+ # process the path parameters
1424
+ # process the query parameters
1425
+ if type is not None:
1426
+
1427
+ _query_params.append(("type", type))
1428
+
1429
+ # process the header parameters
1430
+ # process the form parameters
1431
+ # process the body parameter
1432
+
1433
+ # set the HTTP header `Accept`
1434
+ if "Accept" not in _header_params:
1435
+ _header_params["Accept"] = self.api_client.select_header_accept(
1436
+ ["application/json"]
1437
+ )
1438
+
1439
+ # authentication setting
1440
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
1441
+
1442
+ return self.api_client.param_serialize(
1443
+ method="GET",
1444
+ resource_path="/admin/uptime",
1445
+ path_params=_path_params,
1446
+ query_params=_query_params,
1447
+ header_params=_header_params,
1448
+ body=_body_params,
1449
+ post_params=_form_params,
1450
+ files=_files,
1451
+ auth_settings=_auth_settings,
1452
+ collection_formats=_collection_formats,
1453
+ _host=_host,
1454
+ _request_auth=_request_auth,
1455
+ )