crypticorn 2.5.0rc4__py3-none-any.whl → 2.5.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. crypticorn/auth/main.py +2 -0
  2. crypticorn/client.py +60 -69
  3. crypticorn/common/__init__.py +2 -1
  4. crypticorn/common/auth.py +38 -20
  5. crypticorn/common/enums.py +5 -34
  6. crypticorn/common/errors.py +33 -14
  7. crypticorn/common/exceptions.py +42 -25
  8. crypticorn/common/mixins.py +36 -0
  9. crypticorn/common/urls.py +2 -1
  10. crypticorn/common/utils.py +4 -2
  11. crypticorn/hive/main.py +2 -0
  12. crypticorn/klines/client/__init__.py +14 -42
  13. crypticorn/klines/client/api/__init__.py +1 -1
  14. crypticorn/klines/client/api/change_in_timeframe_api.py +8 -22
  15. crypticorn/klines/client/api/funding_rates_api.py +8 -22
  16. crypticorn/klines/client/api/ohlcv_data_api.py +13 -33
  17. crypticorn/klines/client/api/status_api.py +260 -0
  18. crypticorn/klines/client/api/symbols_api.py +14 -29
  19. crypticorn/klines/client/api/udf_api.py +48 -59
  20. crypticorn/klines/client/api_client.py +1 -1
  21. crypticorn/klines/client/configuration.py +1 -1
  22. crypticorn/klines/client/exceptions.py +1 -1
  23. crypticorn/klines/client/models/__init__.py +13 -41
  24. crypticorn/klines/client/models/api_error_identifier.py +108 -0
  25. crypticorn/klines/client/models/api_error_level.py +37 -0
  26. crypticorn/klines/client/models/api_error_type.py +37 -0
  27. crypticorn/klines/client/models/change_in_timeframe.py +86 -0
  28. crypticorn/klines/client/models/exception_detail.py +117 -0
  29. crypticorn/klines/client/models/funding_rate.py +92 -0
  30. crypticorn/klines/client/models/internal_exchange.py +39 -0
  31. crypticorn/klines/client/models/market_type.py +1 -1
  32. crypticorn/klines/client/models/ohlcv_history.py +105 -0
  33. crypticorn/klines/client/models/resolution.py +1 -1
  34. crypticorn/klines/client/models/search_symbol.py +94 -0
  35. crypticorn/klines/client/models/sort_direction.py +1 -1
  36. crypticorn/klines/client/models/symbol_group.py +83 -0
  37. crypticorn/klines/client/models/symbol_info.py +131 -0
  38. crypticorn/klines/client/models/symbol_type.py +1 -1
  39. crypticorn/klines/client/models/timeframe.py +1 -1
  40. crypticorn/klines/client/models/udf_config.py +149 -0
  41. crypticorn/klines/client/rest.py +1 -1
  42. crypticorn/klines/main.py +40 -23
  43. crypticorn/metrics/client/__init__.py +7 -21
  44. crypticorn/metrics/client/api/__init__.py +1 -1
  45. crypticorn/metrics/client/api/exchanges_api.py +36 -78
  46. crypticorn/metrics/client/api/indicators_api.py +12 -37
  47. crypticorn/metrics/client/api/logs_api.py +8 -23
  48. crypticorn/metrics/client/api/marketcap_api.py +22 -73
  49. crypticorn/metrics/client/api/markets_api.py +12 -40
  50. crypticorn/metrics/client/api/status_api.py +260 -0
  51. crypticorn/metrics/client/api/tokens_api.py +7 -21
  52. crypticorn/metrics/client/api_client.py +1 -1
  53. crypticorn/metrics/client/configuration.py +5 -3
  54. crypticorn/metrics/client/exceptions.py +1 -1
  55. crypticorn/metrics/client/models/__init__.py +6 -20
  56. crypticorn/{trade → metrics}/client/models/api_error_identifier.py +6 -2
  57. crypticorn/{trade → metrics}/client/models/api_error_level.py +2 -2
  58. crypticorn/{trade → metrics}/client/models/api_error_type.py +2 -2
  59. crypticorn/metrics/client/models/exception_detail.py +117 -0
  60. crypticorn/metrics/client/models/internal_exchange.py +39 -0
  61. crypticorn/metrics/client/models/market_type.py +1 -1
  62. crypticorn/metrics/client/models/severity.py +1 -1
  63. crypticorn/metrics/client/models/time_interval.py +1 -1
  64. crypticorn/metrics/client/models/trading_status.py +1 -1
  65. crypticorn/metrics/client/rest.py +1 -1
  66. crypticorn/metrics/main.py +51 -43
  67. crypticorn/pay/main.py +2 -0
  68. crypticorn/trade/client/__init__.py +0 -3
  69. crypticorn/trade/client/configuration.py +2 -2
  70. crypticorn/trade/client/models/__init__.py +0 -3
  71. crypticorn/trade/client/models/bot_model.py +3 -7
  72. crypticorn/trade/client/models/execution_ids.py +1 -1
  73. crypticorn/trade/client/models/notification_model.py +3 -12
  74. crypticorn/trade/client/models/order_model.py +3 -7
  75. crypticorn/trade/client/models/spot_trading_action.py +231 -0
  76. crypticorn/trade/main.py +2 -0
  77. {crypticorn-2.5.0rc4.dist-info → crypticorn-2.5.1.dist-info}/METADATA +7 -5
  78. {crypticorn-2.5.0rc4.dist-info → crypticorn-2.5.1.dist-info}/RECORD +82 -65
  79. {crypticorn-2.5.0rc4.dist-info → crypticorn-2.5.1.dist-info}/WHEEL +1 -1
  80. crypticorn/common/sorter.py +0 -40
  81. /crypticorn/common/{pydantic.py → decorators.py} +0 -0
  82. {crypticorn-2.5.0rc4.dist-info → crypticorn-2.5.1.dist-info}/entry_points.txt +0 -0
  83. {crypticorn-2.5.0rc4.dist-info → crypticorn-2.5.1.dist-info}/top_level.txt +0 -0
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Marketcap Service API
5
5
 
6
- API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -17,11 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import Field, StrictInt, StrictStr, field_validator
20
- from typing import Optional
20
+ from typing import Any, Dict, List, Optional
21
21
  from typing_extensions import Annotated
22
- from crypticorn.metrics.client.models.base_response_list_dict import (
23
- BaseResponseListDict,
24
- )
25
22
  from crypticorn.metrics.client.models.market_type import MarketType
26
23
 
27
24
  from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
@@ -59,7 +56,7 @@ class MarketcapApi:
59
56
  _content_type: Optional[StrictStr] = None,
60
57
  _headers: Optional[Dict[StrictStr, Any]] = None,
61
58
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
62
- ) -> BaseResponseListDict:
59
+ ) -> List[Dict[str, object]]:
63
60
  """Get Current Marketcap
64
61
 
65
62
  Retrieve current marketcap data for all symbols.
@@ -97,11 +94,7 @@ class MarketcapApi:
97
94
  )
98
95
 
99
96
  _response_types_map: Dict[str, Optional[str]] = {
100
- "200": "BaseResponseListDict",
101
- "400": "ErrorResponse",
102
- "404": "ErrorResponse",
103
- "500": "ErrorResponse",
104
- "422": "HTTPValidationError",
97
+ "200": "List[Dict[str, object]]",
105
98
  }
106
99
  response_data = await self.api_client.call_api(
107
100
  *_param, _request_timeout=_request_timeout
@@ -130,7 +123,7 @@ class MarketcapApi:
130
123
  _content_type: Optional[StrictStr] = None,
131
124
  _headers: Optional[Dict[StrictStr, Any]] = None,
132
125
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
133
- ) -> ApiResponse[BaseResponseListDict]:
126
+ ) -> ApiResponse[List[Dict[str, object]]]:
134
127
  """Get Current Marketcap
135
128
 
136
129
  Retrieve current marketcap data for all symbols.
@@ -168,11 +161,7 @@ class MarketcapApi:
168
161
  )
169
162
 
170
163
  _response_types_map: Dict[str, Optional[str]] = {
171
- "200": "BaseResponseListDict",
172
- "400": "ErrorResponse",
173
- "404": "ErrorResponse",
174
- "500": "ErrorResponse",
175
- "422": "HTTPValidationError",
164
+ "200": "List[Dict[str, object]]",
176
165
  }
177
166
  response_data = await self.api_client.call_api(
178
167
  *_param, _request_timeout=_request_timeout
@@ -239,11 +228,7 @@ class MarketcapApi:
239
228
  )
240
229
 
241
230
  _response_types_map: Dict[str, Optional[str]] = {
242
- "200": "BaseResponseListDict",
243
- "400": "ErrorResponse",
244
- "404": "ErrorResponse",
245
- "500": "ErrorResponse",
246
- "422": "HTTPValidationError",
231
+ "200": "List[Dict[str, object]]",
247
232
  }
248
233
  response_data = await self.api_client.call_api(
249
234
  *_param, _request_timeout=_request_timeout
@@ -326,7 +311,7 @@ class MarketcapApi:
326
311
  _content_type: Optional[StrictStr] = None,
327
312
  _headers: Optional[Dict[StrictStr, Any]] = None,
328
313
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
329
- ) -> BaseResponseListDict:
314
+ ) -> List[Dict[str, object]]:
330
315
  """Get Marketcap Between Timestamps
331
316
 
332
317
  Retrieve marketcap data between timestamps.
@@ -367,11 +352,7 @@ class MarketcapApi:
367
352
  )
368
353
 
369
354
  _response_types_map: Dict[str, Optional[str]] = {
370
- "200": "BaseResponseListDict",
371
- "400": "ErrorResponse",
372
- "404": "ErrorResponse",
373
- "500": "ErrorResponse",
374
- "422": "HTTPValidationError",
355
+ "200": "List[Dict[str, object]]",
375
356
  }
376
357
  response_data = await self.api_client.call_api(
377
358
  *_param, _request_timeout=_request_timeout
@@ -402,7 +383,7 @@ class MarketcapApi:
402
383
  _content_type: Optional[StrictStr] = None,
403
384
  _headers: Optional[Dict[StrictStr, Any]] = None,
404
385
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
405
- ) -> ApiResponse[BaseResponseListDict]:
386
+ ) -> ApiResponse[List[Dict[str, object]]]:
406
387
  """Get Marketcap Between Timestamps
407
388
 
408
389
  Retrieve marketcap data between timestamps.
@@ -443,11 +424,7 @@ class MarketcapApi:
443
424
  )
444
425
 
445
426
  _response_types_map: Dict[str, Optional[str]] = {
446
- "200": "BaseResponseListDict",
447
- "400": "ErrorResponse",
448
- "404": "ErrorResponse",
449
- "500": "ErrorResponse",
450
- "422": "HTTPValidationError",
427
+ "200": "List[Dict[str, object]]",
451
428
  }
452
429
  response_data = await self.api_client.call_api(
453
430
  *_param, _request_timeout=_request_timeout
@@ -519,11 +496,7 @@ class MarketcapApi:
519
496
  )
520
497
 
521
498
  _response_types_map: Dict[str, Optional[str]] = {
522
- "200": "BaseResponseListDict",
523
- "400": "ErrorResponse",
524
- "404": "ErrorResponse",
525
- "500": "ErrorResponse",
526
- "422": "HTTPValidationError",
499
+ "200": "List[Dict[str, object]]",
527
500
  }
528
501
  response_data = await self.api_client.call_api(
529
502
  *_param, _request_timeout=_request_timeout
@@ -623,7 +596,7 @@ class MarketcapApi:
623
596
  _content_type: Optional[StrictStr] = None,
624
597
  _headers: Optional[Dict[StrictStr, Any]] = None,
625
598
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
626
- ) -> BaseResponseListDict:
599
+ ) -> List[Dict[str, object]]:
627
600
  """Get Symbols Marketcap Between Timestamps
628
601
 
629
602
  Retrieve marketcap data for symbols between timestamps with optional filtering.
@@ -673,11 +646,7 @@ class MarketcapApi:
673
646
  )
674
647
 
675
648
  _response_types_map: Dict[str, Optional[str]] = {
676
- "200": "BaseResponseListDict",
677
- "400": "ErrorResponse",
678
- "404": "ErrorResponse",
679
- "500": "ErrorResponse",
680
- "422": "HTTPValidationError",
649
+ "200": "List[Dict[str, object]]",
681
650
  }
682
651
  response_data = await self.api_client.call_api(
683
652
  *_param, _request_timeout=_request_timeout
@@ -720,7 +689,7 @@ class MarketcapApi:
720
689
  _content_type: Optional[StrictStr] = None,
721
690
  _headers: Optional[Dict[StrictStr, Any]] = None,
722
691
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
723
- ) -> ApiResponse[BaseResponseListDict]:
692
+ ) -> ApiResponse[List[Dict[str, object]]]:
724
693
  """Get Symbols Marketcap Between Timestamps
725
694
 
726
695
  Retrieve marketcap data for symbols between timestamps with optional filtering.
@@ -770,11 +739,7 @@ class MarketcapApi:
770
739
  )
771
740
 
772
741
  _response_types_map: Dict[str, Optional[str]] = {
773
- "200": "BaseResponseListDict",
774
- "400": "ErrorResponse",
775
- "404": "ErrorResponse",
776
- "500": "ErrorResponse",
777
- "422": "HTTPValidationError",
742
+ "200": "List[Dict[str, object]]",
778
743
  }
779
744
  response_data = await self.api_client.call_api(
780
745
  *_param, _request_timeout=_request_timeout
@@ -867,11 +832,7 @@ class MarketcapApi:
867
832
  )
868
833
 
869
834
  _response_types_map: Dict[str, Optional[str]] = {
870
- "200": "BaseResponseListDict",
871
- "400": "ErrorResponse",
872
- "404": "ErrorResponse",
873
- "500": "ErrorResponse",
874
- "422": "HTTPValidationError",
835
+ "200": "List[Dict[str, object]]",
875
836
  }
876
837
  response_data = await self.api_client.call_api(
877
838
  *_param, _request_timeout=_request_timeout
@@ -985,7 +946,7 @@ class MarketcapApi:
985
946
  _content_type: Optional[StrictStr] = None,
986
947
  _headers: Optional[Dict[StrictStr, Any]] = None,
987
948
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
988
- ) -> BaseResponseListDict:
949
+ ) -> List[Dict[str, object]]:
989
950
  """Get Symbols Marketcap With Ohlcv
990
951
 
991
952
  Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
@@ -1035,11 +996,7 @@ class MarketcapApi:
1035
996
  )
1036
997
 
1037
998
  _response_types_map: Dict[str, Optional[str]] = {
1038
- "200": "BaseResponseListDict",
1039
- "400": "ErrorResponse",
1040
- "404": "ErrorResponse",
1041
- "500": "ErrorResponse",
1042
- "422": "HTTPValidationError",
999
+ "200": "List[Dict[str, object]]",
1043
1000
  }
1044
1001
  response_data = await self.api_client.call_api(
1045
1002
  *_param, _request_timeout=_request_timeout
@@ -1081,7 +1038,7 @@ class MarketcapApi:
1081
1038
  _content_type: Optional[StrictStr] = None,
1082
1039
  _headers: Optional[Dict[StrictStr, Any]] = None,
1083
1040
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1084
- ) -> ApiResponse[BaseResponseListDict]:
1041
+ ) -> ApiResponse[List[Dict[str, object]]]:
1085
1042
  """Get Symbols Marketcap With Ohlcv
1086
1043
 
1087
1044
  Retrieve OHLCV data with marketcap for symbols at a specific timestamp.
@@ -1131,11 +1088,7 @@ class MarketcapApi:
1131
1088
  )
1132
1089
 
1133
1090
  _response_types_map: Dict[str, Optional[str]] = {
1134
- "200": "BaseResponseListDict",
1135
- "400": "ErrorResponse",
1136
- "404": "ErrorResponse",
1137
- "500": "ErrorResponse",
1138
- "422": "HTTPValidationError",
1091
+ "200": "List[Dict[str, object]]",
1139
1092
  }
1140
1093
  response_data = await self.api_client.call_api(
1141
1094
  *_param, _request_timeout=_request_timeout
@@ -1227,11 +1180,7 @@ class MarketcapApi:
1227
1180
  )
1228
1181
 
1229
1182
  _response_types_map: Dict[str, Optional[str]] = {
1230
- "200": "BaseResponseListDict",
1231
- "400": "ErrorResponse",
1232
- "404": "ErrorResponse",
1233
- "500": "ErrorResponse",
1234
- "422": "HTTPValidationError",
1183
+ "200": "List[Dict[str, object]]",
1235
1184
  }
1236
1185
  response_data = await self.api_client.call_api(
1237
1186
  *_param, _request_timeout=_request_timeout
@@ -3,7 +3,7 @@
3
3
  """
4
4
  Marketcap Service API
5
5
 
6
- API for retrieving historical marketcap data, available exchanges, and indicators. ## Features - Historical marketcap data - OHLCV data with marketcap - Technical indicators (KER, SMA) - Exchange and symbol mappings - Error logs
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
7
 
8
8
  The version of the OpenAPI document: 1.0.0
9
9
  Generated by OpenAPI Generator (https://openapi-generator.tech)
@@ -17,12 +17,8 @@ from typing import Any, Dict, List, Optional, Tuple, Union
17
17
  from typing_extensions import Annotated
18
18
 
19
19
  from pydantic import Field, StrictStr
20
- from typing import Optional
20
+ from typing import List, Optional
21
21
  from typing_extensions import Annotated
22
- from crypticorn.metrics.client.models.base_response_list_dict import (
23
- BaseResponseListDict,
24
- )
25
- from crypticorn.metrics.client.models.base_response_list_str import BaseResponseListStr
26
22
  from crypticorn.metrics.client.models.market_type import MarketType
27
23
  from crypticorn.metrics.client.models.trading_status import TradingStatus
28
24
 
@@ -69,7 +65,7 @@ class MarketsApi:
69
65
  _content_type: Optional[StrictStr] = None,
70
66
  _headers: Optional[Dict[StrictStr, Any]] = None,
71
67
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
72
- ) -> BaseResponseListDict:
68
+ ) -> List[str]:
73
69
  """Get Markets For Symbol
74
70
 
75
71
  Get markets for a symbol with filtering options.
@@ -116,11 +112,7 @@ class MarketsApi:
116
112
  )
117
113
 
118
114
  _response_types_map: Dict[str, Optional[str]] = {
119
- "200": "BaseResponseListDict",
120
- "400": "ErrorResponse",
121
- "404": "ErrorResponse",
122
- "500": "ErrorResponse",
123
- "422": "HTTPValidationError",
115
+ "200": "List[str]",
124
116
  }
125
117
  response_data = await self.api_client.call_api(
126
118
  *_param, _request_timeout=_request_timeout
@@ -157,7 +149,7 @@ class MarketsApi:
157
149
  _content_type: Optional[StrictStr] = None,
158
150
  _headers: Optional[Dict[StrictStr, Any]] = None,
159
151
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
160
- ) -> ApiResponse[BaseResponseListDict]:
152
+ ) -> ApiResponse[List[str]]:
161
153
  """Get Markets For Symbol
162
154
 
163
155
  Get markets for a symbol with filtering options.
@@ -204,11 +196,7 @@ class MarketsApi:
204
196
  )
205
197
 
206
198
  _response_types_map: Dict[str, Optional[str]] = {
207
- "200": "BaseResponseListDict",
208
- "400": "ErrorResponse",
209
- "404": "ErrorResponse",
210
- "500": "ErrorResponse",
211
- "422": "HTTPValidationError",
199
+ "200": "List[str]",
212
200
  }
213
201
  response_data = await self.api_client.call_api(
214
202
  *_param, _request_timeout=_request_timeout
@@ -292,11 +280,7 @@ class MarketsApi:
292
280
  )
293
281
 
294
282
  _response_types_map: Dict[str, Optional[str]] = {
295
- "200": "BaseResponseListDict",
296
- "400": "ErrorResponse",
297
- "404": "ErrorResponse",
298
- "500": "ErrorResponse",
299
- "422": "HTTPValidationError",
283
+ "200": "List[str]",
300
284
  }
301
285
  response_data = await self.api_client.call_api(
302
286
  *_param, _request_timeout=_request_timeout
@@ -387,7 +371,7 @@ class MarketsApi:
387
371
  _content_type: Optional[StrictStr] = None,
388
372
  _headers: Optional[Dict[StrictStr, Any]] = None,
389
373
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
390
- ) -> BaseResponseListStr:
374
+ ) -> List[str]:
391
375
  """Get Quote Currencies
392
376
 
393
377
  Get available quote currencies for a market.
@@ -425,11 +409,7 @@ class MarketsApi:
425
409
  )
426
410
 
427
411
  _response_types_map: Dict[str, Optional[str]] = {
428
- "200": "BaseResponseListStr",
429
- "400": "ErrorResponse",
430
- "404": "ErrorResponse",
431
- "500": "ErrorResponse",
432
- "422": "HTTPValidationError",
412
+ "200": "List[str]",
433
413
  }
434
414
  response_data = await self.api_client.call_api(
435
415
  *_param, _request_timeout=_request_timeout
@@ -457,7 +437,7 @@ class MarketsApi:
457
437
  _content_type: Optional[StrictStr] = None,
458
438
  _headers: Optional[Dict[StrictStr, Any]] = None,
459
439
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
460
- ) -> ApiResponse[BaseResponseListStr]:
440
+ ) -> ApiResponse[List[str]]:
461
441
  """Get Quote Currencies
462
442
 
463
443
  Get available quote currencies for a market.
@@ -495,11 +475,7 @@ class MarketsApi:
495
475
  )
496
476
 
497
477
  _response_types_map: Dict[str, Optional[str]] = {
498
- "200": "BaseResponseListStr",
499
- "400": "ErrorResponse",
500
- "404": "ErrorResponse",
501
- "500": "ErrorResponse",
502
- "422": "HTTPValidationError",
478
+ "200": "List[str]",
503
479
  }
504
480
  response_data = await self.api_client.call_api(
505
481
  *_param, _request_timeout=_request_timeout
@@ -565,11 +541,7 @@ class MarketsApi:
565
541
  )
566
542
 
567
543
  _response_types_map: Dict[str, Optional[str]] = {
568
- "200": "BaseResponseListStr",
569
- "400": "ErrorResponse",
570
- "404": "ErrorResponse",
571
- "500": "ErrorResponse",
572
- "422": "HTTPValidationError",
544
+ "200": "List[str]",
573
545
  }
574
546
  response_data = await self.api_client.call_api(
575
547
  *_param, _request_timeout=_request_timeout
@@ -0,0 +1,260 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Marketcap Service API
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
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 StrictStr
20
+
21
+ from crypticorn.metrics.client.api_client import ApiClient, RequestSerialized
22
+ from crypticorn.metrics.client.api_response import ApiResponse
23
+ from crypticorn.metrics.client.rest import RESTResponseType
24
+
25
+
26
+ class StatusApi:
27
+ """NOTE: This class is auto generated by OpenAPI Generator
28
+ Ref: https://openapi-generator.tech
29
+
30
+ Do not edit the class manually.
31
+ """
32
+
33
+ def __init__(self, api_client=None) -> None:
34
+ if api_client is None:
35
+ api_client = ApiClient.get_default()
36
+ self.api_client = api_client
37
+
38
+ @validate_call
39
+ async def ping(
40
+ self,
41
+ _request_timeout: Union[
42
+ None,
43
+ Annotated[StrictFloat, Field(gt=0)],
44
+ Tuple[
45
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
46
+ ],
47
+ ] = None,
48
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
49
+ _content_type: Optional[StrictStr] = None,
50
+ _headers: Optional[Dict[StrictStr, Any]] = None,
51
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
52
+ ) -> str:
53
+ """Ping
54
+
55
+
56
+ :param _request_timeout: timeout setting for this request. If one
57
+ number provided, it will be total request
58
+ timeout. It can also be a pair (tuple) of
59
+ (connection, read) timeouts.
60
+ :type _request_timeout: int, tuple(int, int), optional
61
+ :param _request_auth: set to override the auth_settings for an a single
62
+ request; this effectively ignores the
63
+ authentication in the spec for a single request.
64
+ :type _request_auth: dict, optional
65
+ :param _content_type: force content-type for the request.
66
+ :type _content_type: str, Optional
67
+ :param _headers: set to override the headers for a single
68
+ request; this effectively ignores the headers
69
+ in the spec for a single request.
70
+ :type _headers: dict, optional
71
+ :param _host_index: set to override the host_index for a single
72
+ request; this effectively ignores the host_index
73
+ in the spec for a single request.
74
+ :type _host_index: int, optional
75
+ :return: Returns the result object.
76
+ """ # noqa: E501
77
+
78
+ _param = self._ping_serialize(
79
+ _request_auth=_request_auth,
80
+ _content_type=_content_type,
81
+ _headers=_headers,
82
+ _host_index=_host_index,
83
+ )
84
+
85
+ _response_types_map: Dict[str, Optional[str]] = {
86
+ "200": "str",
87
+ }
88
+ response_data = await self.api_client.call_api(
89
+ *_param, _request_timeout=_request_timeout
90
+ )
91
+ await response_data.read()
92
+ return self.api_client.response_deserialize(
93
+ response_data=response_data,
94
+ response_types_map=_response_types_map,
95
+ ).data
96
+
97
+ @validate_call
98
+ async def ping_with_http_info(
99
+ self,
100
+ _request_timeout: Union[
101
+ None,
102
+ Annotated[StrictFloat, Field(gt=0)],
103
+ Tuple[
104
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
105
+ ],
106
+ ] = None,
107
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
108
+ _content_type: Optional[StrictStr] = None,
109
+ _headers: Optional[Dict[StrictStr, Any]] = None,
110
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
111
+ ) -> ApiResponse[str]:
112
+ """Ping
113
+
114
+
115
+ :param _request_timeout: timeout setting for this request. If one
116
+ number provided, it will be total request
117
+ timeout. It can also be a pair (tuple) of
118
+ (connection, read) timeouts.
119
+ :type _request_timeout: int, tuple(int, int), optional
120
+ :param _request_auth: set to override the auth_settings for an a single
121
+ request; this effectively ignores the
122
+ authentication in the spec for a single request.
123
+ :type _request_auth: dict, optional
124
+ :param _content_type: force content-type for the request.
125
+ :type _content_type: str, Optional
126
+ :param _headers: set to override the headers for a single
127
+ request; this effectively ignores the headers
128
+ in the spec for a single request.
129
+ :type _headers: dict, optional
130
+ :param _host_index: set to override the host_index for a single
131
+ request; this effectively ignores the host_index
132
+ in the spec for a single request.
133
+ :type _host_index: int, optional
134
+ :return: Returns the result object.
135
+ """ # noqa: E501
136
+
137
+ _param = self._ping_serialize(
138
+ _request_auth=_request_auth,
139
+ _content_type=_content_type,
140
+ _headers=_headers,
141
+ _host_index=_host_index,
142
+ )
143
+
144
+ _response_types_map: Dict[str, Optional[str]] = {
145
+ "200": "str",
146
+ }
147
+ response_data = await self.api_client.call_api(
148
+ *_param, _request_timeout=_request_timeout
149
+ )
150
+ await response_data.read()
151
+ return self.api_client.response_deserialize(
152
+ response_data=response_data,
153
+ response_types_map=_response_types_map,
154
+ )
155
+
156
+ @validate_call
157
+ async def ping_without_preload_content(
158
+ self,
159
+ _request_timeout: Union[
160
+ None,
161
+ Annotated[StrictFloat, Field(gt=0)],
162
+ Tuple[
163
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
164
+ ],
165
+ ] = None,
166
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
167
+ _content_type: Optional[StrictStr] = None,
168
+ _headers: Optional[Dict[StrictStr, Any]] = None,
169
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
170
+ ) -> RESTResponseType:
171
+ """Ping
172
+
173
+
174
+ :param _request_timeout: timeout setting for this request. If one
175
+ number provided, it will be total request
176
+ timeout. It can also be a pair (tuple) of
177
+ (connection, read) timeouts.
178
+ :type _request_timeout: int, tuple(int, int), optional
179
+ :param _request_auth: set to override the auth_settings for an a single
180
+ request; this effectively ignores the
181
+ authentication in the spec for a single request.
182
+ :type _request_auth: dict, optional
183
+ :param _content_type: force content-type for the request.
184
+ :type _content_type: str, Optional
185
+ :param _headers: set to override the headers for a single
186
+ request; this effectively ignores the headers
187
+ in the spec for a single request.
188
+ :type _headers: dict, optional
189
+ :param _host_index: set to override the host_index for a single
190
+ request; this effectively ignores the host_index
191
+ in the spec for a single request.
192
+ :type _host_index: int, optional
193
+ :return: Returns the result object.
194
+ """ # noqa: E501
195
+
196
+ _param = self._ping_serialize(
197
+ _request_auth=_request_auth,
198
+ _content_type=_content_type,
199
+ _headers=_headers,
200
+ _host_index=_host_index,
201
+ )
202
+
203
+ _response_types_map: Dict[str, Optional[str]] = {
204
+ "200": "str",
205
+ }
206
+ response_data = await self.api_client.call_api(
207
+ *_param, _request_timeout=_request_timeout
208
+ )
209
+ return response_data.response
210
+
211
+ def _ping_serialize(
212
+ self,
213
+ _request_auth,
214
+ _content_type,
215
+ _headers,
216
+ _host_index,
217
+ ) -> RequestSerialized:
218
+
219
+ _host = None
220
+
221
+ _collection_formats: Dict[str, str] = {}
222
+
223
+ _path_params: Dict[str, str] = {}
224
+ _query_params: List[Tuple[str, str]] = []
225
+ _header_params: Dict[str, Optional[str]] = _headers or {}
226
+ _form_params: List[Tuple[str, str]] = []
227
+ _files: Dict[
228
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
229
+ ] = {}
230
+ _body_params: Optional[bytes] = None
231
+
232
+ # process the path parameters
233
+ # process the query parameters
234
+ # process the header parameters
235
+ # process the form parameters
236
+ # process the body parameter
237
+
238
+ # set the HTTP header `Accept`
239
+ if "Accept" not in _header_params:
240
+ _header_params["Accept"] = self.api_client.select_header_accept(
241
+ ["application/json"]
242
+ )
243
+
244
+ # authentication setting
245
+ _auth_settings: List[str] = []
246
+
247
+ return self.api_client.param_serialize(
248
+ method="GET",
249
+ resource_path="/",
250
+ path_params=_path_params,
251
+ query_params=_query_params,
252
+ header_params=_header_params,
253
+ body=_body_params,
254
+ post_params=_form_params,
255
+ files=_files,
256
+ auth_settings=_auth_settings,
257
+ collection_formats=_collection_formats,
258
+ _host=_host,
259
+ _request_auth=_request_auth,
260
+ )