crypticorn 2.16.0__py3-none-any.whl → 2.17.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 (164) hide show
  1. crypticorn/__init__.py +2 -2
  2. crypticorn/auth/client/api/admin_api.py +397 -13
  3. crypticorn/auth/client/api/auth_api.py +3610 -341
  4. crypticorn/auth/client/api/service_api.py +249 -7
  5. crypticorn/auth/client/api/user_api.py +2295 -179
  6. crypticorn/auth/client/api/wallet_api.py +1468 -81
  7. crypticorn/auth/client/configuration.py +2 -2
  8. crypticorn/auth/client/models/create_api_key_request.py +2 -1
  9. crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
  10. crypticorn/auth/client/rest.py +23 -4
  11. crypticorn/auth/main.py +8 -5
  12. crypticorn/cli/init.py +1 -1
  13. crypticorn/cli/templates/.env.docker.temp +3 -0
  14. crypticorn/cli/templates/.env.example.temp +4 -0
  15. crypticorn/cli/templates/Dockerfile +5 -2
  16. crypticorn/client.py +226 -59
  17. crypticorn/common/__init__.py +1 -0
  18. crypticorn/common/auth.py +45 -14
  19. crypticorn/common/decorators.py +1 -2
  20. crypticorn/common/enums.py +0 -2
  21. crypticorn/common/errors.py +10 -0
  22. crypticorn/common/metrics.py +30 -0
  23. crypticorn/common/middleware.py +94 -1
  24. crypticorn/common/pagination.py +252 -20
  25. crypticorn/common/router/admin_router.py +2 -2
  26. crypticorn/common/router/status_router.py +40 -2
  27. crypticorn/common/scopes.py +2 -2
  28. crypticorn/common/warnings.py +7 -0
  29. crypticorn/dex/__init__.py +6 -0
  30. crypticorn/dex/client/__init__.py +49 -0
  31. crypticorn/dex/client/api/__init__.py +6 -0
  32. crypticorn/dex/client/api/admin_api.py +2986 -0
  33. crypticorn/dex/client/api/signals_api.py +1798 -0
  34. crypticorn/dex/client/api/status_api.py +892 -0
  35. crypticorn/dex/client/api_client.py +758 -0
  36. crypticorn/dex/client/api_response.py +20 -0
  37. crypticorn/dex/client/configuration.py +620 -0
  38. crypticorn/dex/client/exceptions.py +220 -0
  39. crypticorn/dex/client/models/__init__.py +30 -0
  40. crypticorn/dex/client/models/api_error_identifier.py +121 -0
  41. crypticorn/dex/client/models/api_error_level.py +37 -0
  42. crypticorn/dex/client/models/api_error_type.py +37 -0
  43. crypticorn/dex/client/models/exception_detail.py +117 -0
  44. crypticorn/dex/client/models/log_level.py +38 -0
  45. crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
  46. crypticorn/dex/client/models/risk.py +86 -0
  47. crypticorn/dex/client/models/signal_overview_stats.py +158 -0
  48. crypticorn/dex/client/models/signal_volume.py +84 -0
  49. crypticorn/dex/client/models/signal_with_token.py +163 -0
  50. crypticorn/dex/client/models/token_data.py +127 -0
  51. crypticorn/dex/client/models/token_detail.py +116 -0
  52. crypticorn/dex/client/py.typed +0 -0
  53. crypticorn/dex/client/rest.py +217 -0
  54. crypticorn/dex/main.py +1 -0
  55. crypticorn/hive/client/api/admin_api.py +1173 -47
  56. crypticorn/hive/client/api/data_api.py +499 -17
  57. crypticorn/hive/client/api/models_api.py +1595 -87
  58. crypticorn/hive/client/api/status_api.py +397 -16
  59. crypticorn/hive/client/api_client.py +0 -5
  60. crypticorn/hive/client/models/api_error_identifier.py +1 -1
  61. crypticorn/hive/client/models/coin_info.py +1 -1
  62. crypticorn/hive/client/models/exception_detail.py +1 -1
  63. crypticorn/hive/client/models/target_info.py +1 -1
  64. crypticorn/hive/client/rest.py +23 -4
  65. crypticorn/hive/main.py +99 -25
  66. crypticorn/hive/utils.py +2 -2
  67. crypticorn/klines/client/api/admin_api.py +1173 -47
  68. crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
  69. crypticorn/klines/client/api/funding_rates_api.py +315 -11
  70. crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
  71. crypticorn/klines/client/api/status_api.py +397 -16
  72. crypticorn/klines/client/api/symbols_api.py +216 -11
  73. crypticorn/klines/client/api/udf_api.py +1268 -51
  74. crypticorn/klines/client/api_client.py +0 -5
  75. crypticorn/klines/client/models/api_error_identifier.py +3 -1
  76. crypticorn/klines/client/models/exception_detail.py +1 -1
  77. crypticorn/klines/client/models/ohlcv.py +1 -1
  78. crypticorn/klines/client/models/symbol_group.py +1 -1
  79. crypticorn/klines/client/models/udf_config.py +1 -1
  80. crypticorn/klines/client/rest.py +23 -4
  81. crypticorn/klines/main.py +89 -12
  82. crypticorn/metrics/client/api/admin_api.py +1173 -47
  83. crypticorn/metrics/client/api/exchanges_api.py +1370 -145
  84. crypticorn/metrics/client/api/indicators_api.py +622 -17
  85. crypticorn/metrics/client/api/logs_api.py +296 -11
  86. crypticorn/metrics/client/api/marketcap_api.py +1207 -67
  87. crypticorn/metrics/client/api/markets_api.py +343 -11
  88. crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
  89. crypticorn/metrics/client/api/status_api.py +397 -16
  90. crypticorn/metrics/client/api/tokens_api.py +382 -15
  91. crypticorn/metrics/client/api_client.py +0 -5
  92. crypticorn/metrics/client/configuration.py +4 -2
  93. crypticorn/metrics/client/models/exception_detail.py +1 -1
  94. crypticorn/metrics/client/models/exchange_mapping.py +1 -1
  95. crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
  96. crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
  97. crypticorn/metrics/client/models/ohlcv.py +1 -1
  98. crypticorn/metrics/client/rest.py +23 -4
  99. crypticorn/metrics/main.py +113 -19
  100. crypticorn/pay/client/api/admin_api.py +1585 -57
  101. crypticorn/pay/client/api/now_payments_api.py +961 -39
  102. crypticorn/pay/client/api/payments_api.py +562 -17
  103. crypticorn/pay/client/api/products_api.py +880 -30
  104. crypticorn/pay/client/api/status_api.py +397 -16
  105. crypticorn/pay/client/api_client.py +0 -5
  106. crypticorn/pay/client/configuration.py +2 -2
  107. crypticorn/pay/client/models/api_error_identifier.py +7 -7
  108. crypticorn/pay/client/models/exception_detail.py +1 -1
  109. crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
  110. crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
  111. crypticorn/pay/client/models/product.py +1 -1
  112. crypticorn/pay/client/models/product_create.py +1 -1
  113. crypticorn/pay/client/models/product_update.py +1 -1
  114. crypticorn/pay/client/models/scope.py +1 -0
  115. crypticorn/pay/client/rest.py +23 -4
  116. crypticorn/pay/main.py +10 -6
  117. crypticorn/trade/client/__init__.py +11 -1
  118. crypticorn/trade/client/api/__init__.py +0 -1
  119. crypticorn/trade/client/api/admin_api.py +1184 -55
  120. crypticorn/trade/client/api/api_keys_api.py +1678 -162
  121. crypticorn/trade/client/api/bots_api.py +7563 -187
  122. crypticorn/trade/client/api/exchanges_api.py +565 -19
  123. crypticorn/trade/client/api/notifications_api.py +1290 -116
  124. crypticorn/trade/client/api/orders_api.py +393 -55
  125. crypticorn/trade/client/api/status_api.py +397 -13
  126. crypticorn/trade/client/api/strategies_api.py +1133 -77
  127. crypticorn/trade/client/api/trading_actions_api.py +786 -65
  128. crypticorn/trade/client/models/__init__.py +11 -0
  129. crypticorn/trade/client/models/actions_count.py +88 -0
  130. crypticorn/trade/client/models/api_error_identifier.py +1 -0
  131. crypticorn/trade/client/models/bot.py +7 -18
  132. crypticorn/trade/client/models/bot_create.py +17 -1
  133. crypticorn/trade/client/models/bot_update.py +17 -1
  134. crypticorn/trade/client/models/exchange.py +6 -1
  135. crypticorn/trade/client/models/exchange_key.py +1 -1
  136. crypticorn/trade/client/models/exchange_key_balance.py +111 -0
  137. crypticorn/trade/client/models/exchange_key_create.py +17 -1
  138. crypticorn/trade/client/models/exchange_key_update.py +17 -1
  139. crypticorn/trade/client/models/execution_ids.py +1 -1
  140. crypticorn/trade/client/models/futures_balance.py +27 -25
  141. crypticorn/trade/client/models/notification.py +17 -1
  142. crypticorn/trade/client/models/notification_create.py +18 -2
  143. crypticorn/trade/client/models/notification_update.py +17 -1
  144. crypticorn/trade/client/models/orders_count.py +88 -0
  145. crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
  146. crypticorn/trade/client/models/paginated_response_order.py +134 -0
  147. crypticorn/trade/client/models/pn_l.py +95 -0
  148. crypticorn/trade/client/models/post_futures_action.py +1 -1
  149. crypticorn/trade/client/models/spot_balance.py +109 -0
  150. crypticorn/trade/client/models/strategy.py +22 -4
  151. crypticorn/trade/client/models/strategy_create.py +23 -5
  152. crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
  153. crypticorn/trade/client/models/strategy_update.py +19 -3
  154. crypticorn/trade/client/models/tpsl.py +4 -19
  155. crypticorn/trade/client/models/tpsl_create.py +6 -19
  156. crypticorn/trade/client/rest.py +23 -4
  157. crypticorn/trade/main.py +15 -12
  158. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
  159. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +163 -128
  160. crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
  161. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
  162. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
  163. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
  164. {crypticorn-2.16.0.dist-info → crypticorn-2.17.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,892 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ DEX AI API
5
+
6
+ API for DEX AI
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, field_validator
20
+ from typing import Optional
21
+
22
+ from crypticorn.dex.client.api_client import ApiClient, RequestSerialized
23
+ from crypticorn.dex.client.api_response import ApiResponse
24
+ from crypticorn.dex.client.rest import RESTResponseType
25
+
26
+ # Import async_to_sync for sync methods
27
+ try:
28
+ from asgiref.sync import async_to_sync
29
+
30
+ _HAS_ASGIREF = True
31
+ except ImportError:
32
+ _HAS_ASGIREF = False
33
+
34
+ def async_to_sync(async_func):
35
+ """Fallback decorator that raises an error if asgiref is not available."""
36
+
37
+ def wrapper(*args, **kwargs):
38
+ raise ImportError(
39
+ "asgiref is required for sync methods. Install with: pip install asgiref"
40
+ )
41
+
42
+ return wrapper
43
+
44
+
45
+ class StatusApi:
46
+ """NOTE: This class is auto generated by OpenAPI Generator
47
+ Ref: https://openapi-generator.tech
48
+
49
+ Do not edit the class manually.
50
+ """
51
+
52
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
53
+ if api_client is None:
54
+ api_client = ApiClient.get_default()
55
+ self.api_client = api_client
56
+ self.is_sync = is_sync
57
+
58
+ @validate_call
59
+ def get_time(
60
+ self,
61
+ type: Optional[StrictStr] = None,
62
+ _request_timeout: Union[
63
+ None,
64
+ Annotated[StrictFloat, Field(gt=0)],
65
+ Tuple[
66
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
67
+ ],
68
+ ] = None,
69
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
70
+ _content_type: Optional[StrictStr] = None,
71
+ _headers: Optional[Dict[StrictStr, Any]] = None,
72
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
73
+ ) -> str:
74
+ """Time"""
75
+ if self.is_sync:
76
+ return self._get_time_sync(
77
+ type=type,
78
+ _request_timeout=_request_timeout,
79
+ _request_auth=_request_auth,
80
+ _content_type=_content_type,
81
+ _headers=_headers,
82
+ _host_index=_host_index,
83
+ )
84
+
85
+ else:
86
+ return self._get_time_async(
87
+ type=type,
88
+ _request_timeout=_request_timeout,
89
+ _request_auth=_request_auth,
90
+ _content_type=_content_type,
91
+ _headers=_headers,
92
+ _host_index=_host_index,
93
+ )
94
+
95
+ @validate_call
96
+ def get_time_with_http_info(
97
+ self,
98
+ type: Optional[StrictStr] = None,
99
+ _request_timeout: Union[
100
+ None,
101
+ Annotated[StrictFloat, Field(gt=0)],
102
+ Tuple[
103
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
104
+ ],
105
+ ] = None,
106
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
107
+ _content_type: Optional[StrictStr] = None,
108
+ _headers: Optional[Dict[StrictStr, Any]] = None,
109
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
110
+ ) -> ApiResponse[str]:
111
+ """Time with HTTP info"""
112
+ if self.is_sync:
113
+ return self._get_time_sync_with_http_info(
114
+ type=type,
115
+ _request_timeout=_request_timeout,
116
+ _request_auth=_request_auth,
117
+ _content_type=_content_type,
118
+ _headers=_headers,
119
+ _host_index=_host_index,
120
+ )
121
+
122
+ else:
123
+ return self._get_time_async_with_http_info(
124
+ type=type,
125
+ _request_timeout=_request_timeout,
126
+ _request_auth=_request_auth,
127
+ _content_type=_content_type,
128
+ _headers=_headers,
129
+ _host_index=_host_index,
130
+ )
131
+
132
+ @validate_call
133
+ def get_time_without_preload_content(
134
+ self,
135
+ type: Optional[StrictStr] = None,
136
+ _request_timeout: Union[
137
+ None,
138
+ Annotated[StrictFloat, Field(gt=0)],
139
+ Tuple[
140
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
141
+ ],
142
+ ] = None,
143
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
144
+ _content_type: Optional[StrictStr] = None,
145
+ _headers: Optional[Dict[StrictStr, Any]] = None,
146
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
147
+ ) -> RESTResponseType:
148
+ """Time without preloading content"""
149
+ if self.is_sync:
150
+ return self._get_time_sync_without_preload_content(
151
+ type=type,
152
+ _request_timeout=_request_timeout,
153
+ _request_auth=_request_auth,
154
+ _content_type=_content_type,
155
+ _headers=_headers,
156
+ _host_index=_host_index,
157
+ )
158
+
159
+ else:
160
+ return self._get_time_async_without_preload_content(
161
+ type=type,
162
+ _request_timeout=_request_timeout,
163
+ _request_auth=_request_auth,
164
+ _content_type=_content_type,
165
+ _headers=_headers,
166
+ _host_index=_host_index,
167
+ )
168
+
169
+ # Private async implementation methods
170
+ @validate_call
171
+ async def _get_time_async(
172
+ self,
173
+ type: Optional[StrictStr] = None,
174
+ _request_timeout: Union[
175
+ None,
176
+ Annotated[StrictFloat, Field(gt=0)],
177
+ Tuple[
178
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
179
+ ],
180
+ ] = None,
181
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
182
+ _content_type: Optional[StrictStr] = None,
183
+ _headers: Optional[Dict[StrictStr, Any]] = None,
184
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
185
+ ) -> str:
186
+ """Time
187
+
188
+ Returns the current time in either ISO or Unix timestamp (seconds) format.
189
+
190
+ :param type:
191
+ :type type: str
192
+ :param _request_timeout: timeout setting for this request. If one
193
+ number provided, it will be total request
194
+ timeout. It can also be a pair (tuple) of
195
+ (connection, read) timeouts.
196
+ :type _request_timeout: int, tuple(int, int), optional
197
+ :param _request_auth: set to override the auth_settings for an a single
198
+ request; this effectively ignores the
199
+ authentication in the spec for a single request.
200
+ :type _request_auth: dict, optional
201
+ :param _content_type: force content-type for the request.
202
+ :type _content_type: str, Optional
203
+ :param _headers: set to override the headers for a single
204
+ request; this effectively ignores the headers
205
+ in the spec for a single request.
206
+ :type _headers: dict, optional
207
+ :param _host_index: set to override the host_index for a single
208
+ request; this effectively ignores the host_index
209
+ in the spec for a single request.
210
+ :type _host_index: int, optional
211
+ :return: Returns the result object.
212
+ """ # noqa: E501
213
+
214
+ _param = self._get_time_serialize(
215
+ type=type,
216
+ _request_auth=_request_auth,
217
+ _content_type=_content_type,
218
+ _headers=_headers,
219
+ _host_index=_host_index,
220
+ )
221
+
222
+ _response_types_map: Dict[str, Optional[str]] = {
223
+ "200": "str",
224
+ }
225
+ response_data = await self.api_client.call_api(
226
+ *_param, _request_timeout=_request_timeout
227
+ )
228
+ await response_data.read()
229
+ return self.api_client.response_deserialize(
230
+ response_data=response_data,
231
+ response_types_map=_response_types_map,
232
+ ).data
233
+
234
+ @validate_call
235
+ async def _get_time_async_with_http_info(
236
+ self,
237
+ type: Optional[StrictStr] = None,
238
+ _request_timeout: Union[
239
+ None,
240
+ Annotated[StrictFloat, Field(gt=0)],
241
+ Tuple[
242
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
243
+ ],
244
+ ] = None,
245
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
246
+ _content_type: Optional[StrictStr] = None,
247
+ _headers: Optional[Dict[StrictStr, Any]] = None,
248
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
249
+ ) -> ApiResponse[str]:
250
+ """Time
251
+
252
+ Returns the current time in either ISO or Unix timestamp (seconds) format.
253
+
254
+ :param type:
255
+ :type type: str
256
+ :param _request_timeout: timeout setting for this request. If one
257
+ number provided, it will be total request
258
+ timeout. It can also be a pair (tuple) of
259
+ (connection, read) timeouts.
260
+ :type _request_timeout: int, tuple(int, int), optional
261
+ :param _request_auth: set to override the auth_settings for an a single
262
+ request; this effectively ignores the
263
+ authentication in the spec for a single request.
264
+ :type _request_auth: dict, optional
265
+ :param _content_type: force content-type for the request.
266
+ :type _content_type: str, Optional
267
+ :param _headers: set to override the headers for a single
268
+ request; this effectively ignores the headers
269
+ in the spec for a single request.
270
+ :type _headers: dict, optional
271
+ :param _host_index: set to override the host_index for a single
272
+ request; this effectively ignores the host_index
273
+ in the spec for a single request.
274
+ :type _host_index: int, optional
275
+ :return: Returns the result object.
276
+ """ # noqa: E501
277
+
278
+ _param = self._get_time_serialize(
279
+ type=type,
280
+ _request_auth=_request_auth,
281
+ _content_type=_content_type,
282
+ _headers=_headers,
283
+ _host_index=_host_index,
284
+ )
285
+
286
+ _response_types_map: Dict[str, Optional[str]] = {
287
+ "200": "str",
288
+ }
289
+ response_data = await self.api_client.call_api(
290
+ *_param, _request_timeout=_request_timeout
291
+ )
292
+ await response_data.read()
293
+ return self.api_client.response_deserialize(
294
+ response_data=response_data, response_types_map=_response_types_map
295
+ )
296
+
297
+ @validate_call
298
+ async def _get_time_async_without_preload_content(
299
+ self,
300
+ type: Optional[StrictStr] = None,
301
+ _request_timeout: Union[
302
+ None,
303
+ Annotated[StrictFloat, Field(gt=0)],
304
+ Tuple[
305
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
306
+ ],
307
+ ] = None,
308
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
309
+ _content_type: Optional[StrictStr] = None,
310
+ _headers: Optional[Dict[StrictStr, Any]] = None,
311
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
312
+ ) -> RESTResponseType:
313
+ """Time
314
+
315
+ Returns the current time in either ISO or Unix timestamp (seconds) format.
316
+
317
+ :param type:
318
+ :type type: str
319
+ :param _request_timeout: timeout setting for this request. If one
320
+ number provided, it will be total request
321
+ timeout. It can also be a pair (tuple) of
322
+ (connection, read) timeouts.
323
+ :type _request_timeout: int, tuple(int, int), optional
324
+ :param _request_auth: set to override the auth_settings for an a single
325
+ request; this effectively ignores the
326
+ authentication in the spec for a single request.
327
+ :type _request_auth: dict, optional
328
+ :param _content_type: force content-type for the request.
329
+ :type _content_type: str, Optional
330
+ :param _headers: set to override the headers for a single
331
+ request; this effectively ignores the headers
332
+ in the spec for a single request.
333
+ :type _headers: dict, optional
334
+ :param _host_index: set to override the host_index for a single
335
+ request; this effectively ignores the host_index
336
+ in the spec for a single request.
337
+ :type _host_index: int, optional
338
+ :return: Returns the result object.
339
+ """ # noqa: E501
340
+
341
+ _param = self._get_time_serialize(
342
+ type=type,
343
+ _request_auth=_request_auth,
344
+ _content_type=_content_type,
345
+ _headers=_headers,
346
+ _host_index=_host_index,
347
+ )
348
+
349
+ _response_types_map: Dict[str, Optional[str]] = {
350
+ "200": "str",
351
+ }
352
+ response_data = await self.api_client.call_api(
353
+ *_param, _request_timeout=_request_timeout
354
+ )
355
+ return response_data
356
+
357
+ # Private sync implementation methods
358
+ @validate_call
359
+ def _get_time_sync(
360
+ self,
361
+ type: Optional[StrictStr] = None,
362
+ _request_timeout: Union[
363
+ None,
364
+ Annotated[StrictFloat, Field(gt=0)],
365
+ Tuple[
366
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
367
+ ],
368
+ ] = None,
369
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
370
+ _content_type: Optional[StrictStr] = None,
371
+ _headers: Optional[Dict[StrictStr, Any]] = None,
372
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
373
+ ) -> str:
374
+ """Synchronous version of get_time"""
375
+ return async_to_sync(self._get_time_async)(
376
+ type=type,
377
+ _request_timeout=_request_timeout,
378
+ _request_auth=_request_auth,
379
+ _content_type=_content_type,
380
+ _headers=_headers,
381
+ _host_index=_host_index,
382
+ )
383
+
384
+ @validate_call
385
+ def _get_time_sync_with_http_info(
386
+ self,
387
+ type: Optional[StrictStr] = None,
388
+ _request_timeout: Union[
389
+ None,
390
+ Annotated[StrictFloat, Field(gt=0)],
391
+ Tuple[
392
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
393
+ ],
394
+ ] = None,
395
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
396
+ _content_type: Optional[StrictStr] = None,
397
+ _headers: Optional[Dict[StrictStr, Any]] = None,
398
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
399
+ ) -> ApiResponse[str]:
400
+ """Synchronous version of get_time_with_http_info"""
401
+ return async_to_sync(self._get_time_async_with_http_info)(
402
+ type=type,
403
+ _request_timeout=_request_timeout,
404
+ _request_auth=_request_auth,
405
+ _content_type=_content_type,
406
+ _headers=_headers,
407
+ _host_index=_host_index,
408
+ )
409
+
410
+ @validate_call
411
+ def _get_time_sync_without_preload_content(
412
+ self,
413
+ type: Optional[StrictStr] = None,
414
+ _request_timeout: Union[
415
+ None,
416
+ Annotated[StrictFloat, Field(gt=0)],
417
+ Tuple[
418
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
419
+ ],
420
+ ] = None,
421
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
422
+ _content_type: Optional[StrictStr] = None,
423
+ _headers: Optional[Dict[StrictStr, Any]] = None,
424
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
425
+ ) -> RESTResponseType:
426
+ """Synchronous version of get_time_without_preload_content"""
427
+ return async_to_sync(self._get_time_async_without_preload_content)(
428
+ type=type,
429
+ _request_timeout=_request_timeout,
430
+ _request_auth=_request_auth,
431
+ _content_type=_content_type,
432
+ _headers=_headers,
433
+ _host_index=_host_index,
434
+ )
435
+
436
+ def _get_time_serialize(
437
+ self,
438
+ type,
439
+ _request_auth,
440
+ _content_type,
441
+ _headers,
442
+ _host_index,
443
+ ) -> RequestSerialized:
444
+
445
+ _host = None
446
+
447
+ _collection_formats: Dict[str, str] = {}
448
+
449
+ _path_params: Dict[str, str] = {}
450
+ _query_params: List[Tuple[str, str]] = []
451
+ _header_params: Dict[str, Optional[str]] = _headers or {}
452
+ _form_params: List[Tuple[str, str]] = []
453
+ _files: Dict[
454
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
455
+ ] = {}
456
+ _body_params: Optional[bytes] = None
457
+
458
+ # process the path parameters
459
+ # process the query parameters
460
+ if type is not None:
461
+
462
+ _query_params.append(("type", type))
463
+
464
+ # process the header parameters
465
+ # process the form parameters
466
+ # process the body parameter
467
+
468
+ # set the HTTP header `Accept`
469
+ if "Accept" not in _header_params:
470
+ _header_params["Accept"] = self.api_client.select_header_accept(
471
+ ["application/json"]
472
+ )
473
+
474
+ # authentication setting
475
+ _auth_settings: List[str] = []
476
+
477
+ return self.api_client.param_serialize(
478
+ method="GET",
479
+ resource_path="/time",
480
+ path_params=_path_params,
481
+ query_params=_query_params,
482
+ header_params=_header_params,
483
+ body=_body_params,
484
+ post_params=_form_params,
485
+ files=_files,
486
+ auth_settings=_auth_settings,
487
+ collection_formats=_collection_formats,
488
+ _host=_host,
489
+ _request_auth=_request_auth,
490
+ )
491
+
492
+ @validate_call
493
+ def ping(
494
+ self,
495
+ _request_timeout: Union[
496
+ None,
497
+ Annotated[StrictFloat, Field(gt=0)],
498
+ Tuple[
499
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
500
+ ],
501
+ ] = None,
502
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
503
+ _content_type: Optional[StrictStr] = None,
504
+ _headers: Optional[Dict[StrictStr, Any]] = None,
505
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
506
+ ) -> str:
507
+ """Ping"""
508
+ if self.is_sync:
509
+ return self._ping_sync(
510
+ _request_timeout=_request_timeout,
511
+ _request_auth=_request_auth,
512
+ _content_type=_content_type,
513
+ _headers=_headers,
514
+ _host_index=_host_index,
515
+ )
516
+
517
+ else:
518
+ return self._ping_async(
519
+ _request_timeout=_request_timeout,
520
+ _request_auth=_request_auth,
521
+ _content_type=_content_type,
522
+ _headers=_headers,
523
+ _host_index=_host_index,
524
+ )
525
+
526
+ @validate_call
527
+ def ping_with_http_info(
528
+ self,
529
+ _request_timeout: Union[
530
+ None,
531
+ Annotated[StrictFloat, Field(gt=0)],
532
+ Tuple[
533
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
534
+ ],
535
+ ] = None,
536
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
537
+ _content_type: Optional[StrictStr] = None,
538
+ _headers: Optional[Dict[StrictStr, Any]] = None,
539
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
540
+ ) -> ApiResponse[str]:
541
+ """Ping with HTTP info"""
542
+ if self.is_sync:
543
+ return self._ping_sync_with_http_info(
544
+ _request_timeout=_request_timeout,
545
+ _request_auth=_request_auth,
546
+ _content_type=_content_type,
547
+ _headers=_headers,
548
+ _host_index=_host_index,
549
+ )
550
+
551
+ else:
552
+ return self._ping_async_with_http_info(
553
+ _request_timeout=_request_timeout,
554
+ _request_auth=_request_auth,
555
+ _content_type=_content_type,
556
+ _headers=_headers,
557
+ _host_index=_host_index,
558
+ )
559
+
560
+ @validate_call
561
+ def ping_without_preload_content(
562
+ self,
563
+ _request_timeout: Union[
564
+ None,
565
+ Annotated[StrictFloat, Field(gt=0)],
566
+ Tuple[
567
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
568
+ ],
569
+ ] = None,
570
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
571
+ _content_type: Optional[StrictStr] = None,
572
+ _headers: Optional[Dict[StrictStr, Any]] = None,
573
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
574
+ ) -> RESTResponseType:
575
+ """Ping without preloading content"""
576
+ if self.is_sync:
577
+ return self._ping_sync_without_preload_content(
578
+ _request_timeout=_request_timeout,
579
+ _request_auth=_request_auth,
580
+ _content_type=_content_type,
581
+ _headers=_headers,
582
+ _host_index=_host_index,
583
+ )
584
+
585
+ else:
586
+ return self._ping_async_without_preload_content(
587
+ _request_timeout=_request_timeout,
588
+ _request_auth=_request_auth,
589
+ _content_type=_content_type,
590
+ _headers=_headers,
591
+ _host_index=_host_index,
592
+ )
593
+
594
+ # Private async implementation methods
595
+ @validate_call
596
+ async def _ping_async(
597
+ self,
598
+ _request_timeout: Union[
599
+ None,
600
+ Annotated[StrictFloat, Field(gt=0)],
601
+ Tuple[
602
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
603
+ ],
604
+ ] = None,
605
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
606
+ _content_type: Optional[StrictStr] = None,
607
+ _headers: Optional[Dict[StrictStr, Any]] = None,
608
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
609
+ ) -> str:
610
+ """Ping
611
+
612
+ Returns 'OK' if the API is running.
613
+
614
+ :param _request_timeout: timeout setting for this request. If one
615
+ number provided, it will be total request
616
+ timeout. It can also be a pair (tuple) of
617
+ (connection, read) timeouts.
618
+ :type _request_timeout: int, tuple(int, int), optional
619
+ :param _request_auth: set to override the auth_settings for an a single
620
+ request; this effectively ignores the
621
+ authentication in the spec for a single request.
622
+ :type _request_auth: dict, optional
623
+ :param _content_type: force content-type for the request.
624
+ :type _content_type: str, Optional
625
+ :param _headers: set to override the headers for a single
626
+ request; this effectively ignores the headers
627
+ in the spec for a single request.
628
+ :type _headers: dict, optional
629
+ :param _host_index: set to override the host_index for a single
630
+ request; this effectively ignores the host_index
631
+ in the spec for a single request.
632
+ :type _host_index: int, optional
633
+ :return: Returns the result object.
634
+ """ # noqa: E501
635
+
636
+ _param = self._ping_serialize(
637
+ _request_auth=_request_auth,
638
+ _content_type=_content_type,
639
+ _headers=_headers,
640
+ _host_index=_host_index,
641
+ )
642
+
643
+ _response_types_map: Dict[str, Optional[str]] = {
644
+ "200": "str",
645
+ }
646
+ response_data = await self.api_client.call_api(
647
+ *_param, _request_timeout=_request_timeout
648
+ )
649
+ await response_data.read()
650
+ return self.api_client.response_deserialize(
651
+ response_data=response_data,
652
+ response_types_map=_response_types_map,
653
+ ).data
654
+
655
+ @validate_call
656
+ async def _ping_async_with_http_info(
657
+ self,
658
+ _request_timeout: Union[
659
+ None,
660
+ Annotated[StrictFloat, Field(gt=0)],
661
+ Tuple[
662
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
663
+ ],
664
+ ] = None,
665
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
666
+ _content_type: Optional[StrictStr] = None,
667
+ _headers: Optional[Dict[StrictStr, Any]] = None,
668
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
669
+ ) -> ApiResponse[str]:
670
+ """Ping
671
+
672
+ Returns 'OK' if the API is running.
673
+
674
+ :param _request_timeout: timeout setting for this request. If one
675
+ number provided, it will be total request
676
+ timeout. It can also be a pair (tuple) of
677
+ (connection, read) timeouts.
678
+ :type _request_timeout: int, tuple(int, int), optional
679
+ :param _request_auth: set to override the auth_settings for an a single
680
+ request; this effectively ignores the
681
+ authentication in the spec for a single request.
682
+ :type _request_auth: dict, optional
683
+ :param _content_type: force content-type for the request.
684
+ :type _content_type: str, Optional
685
+ :param _headers: set to override the headers for a single
686
+ request; this effectively ignores the headers
687
+ in the spec for a single request.
688
+ :type _headers: dict, optional
689
+ :param _host_index: set to override the host_index for a single
690
+ request; this effectively ignores the host_index
691
+ in the spec for a single request.
692
+ :type _host_index: int, optional
693
+ :return: Returns the result object.
694
+ """ # noqa: E501
695
+
696
+ _param = self._ping_serialize(
697
+ _request_auth=_request_auth,
698
+ _content_type=_content_type,
699
+ _headers=_headers,
700
+ _host_index=_host_index,
701
+ )
702
+
703
+ _response_types_map: Dict[str, Optional[str]] = {
704
+ "200": "str",
705
+ }
706
+ response_data = await self.api_client.call_api(
707
+ *_param, _request_timeout=_request_timeout
708
+ )
709
+ await response_data.read()
710
+ return self.api_client.response_deserialize(
711
+ response_data=response_data, response_types_map=_response_types_map
712
+ )
713
+
714
+ @validate_call
715
+ async def _ping_async_without_preload_content(
716
+ self,
717
+ _request_timeout: Union[
718
+ None,
719
+ Annotated[StrictFloat, Field(gt=0)],
720
+ Tuple[
721
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
722
+ ],
723
+ ] = None,
724
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
725
+ _content_type: Optional[StrictStr] = None,
726
+ _headers: Optional[Dict[StrictStr, Any]] = None,
727
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
728
+ ) -> RESTResponseType:
729
+ """Ping
730
+
731
+ Returns 'OK' if the API is running.
732
+
733
+ :param _request_timeout: timeout setting for this request. If one
734
+ number provided, it will be total request
735
+ timeout. It can also be a pair (tuple) of
736
+ (connection, read) timeouts.
737
+ :type _request_timeout: int, tuple(int, int), optional
738
+ :param _request_auth: set to override the auth_settings for an a single
739
+ request; this effectively ignores the
740
+ authentication in the spec for a single request.
741
+ :type _request_auth: dict, optional
742
+ :param _content_type: force content-type for the request.
743
+ :type _content_type: str, Optional
744
+ :param _headers: set to override the headers for a single
745
+ request; this effectively ignores the headers
746
+ in the spec for a single request.
747
+ :type _headers: dict, optional
748
+ :param _host_index: set to override the host_index for a single
749
+ request; this effectively ignores the host_index
750
+ in the spec for a single request.
751
+ :type _host_index: int, optional
752
+ :return: Returns the result object.
753
+ """ # noqa: E501
754
+
755
+ _param = self._ping_serialize(
756
+ _request_auth=_request_auth,
757
+ _content_type=_content_type,
758
+ _headers=_headers,
759
+ _host_index=_host_index,
760
+ )
761
+
762
+ _response_types_map: Dict[str, Optional[str]] = {
763
+ "200": "str",
764
+ }
765
+ response_data = await self.api_client.call_api(
766
+ *_param, _request_timeout=_request_timeout
767
+ )
768
+ return response_data
769
+
770
+ # Private sync implementation methods
771
+ @validate_call
772
+ def _ping_sync(
773
+ self,
774
+ _request_timeout: Union[
775
+ None,
776
+ Annotated[StrictFloat, Field(gt=0)],
777
+ Tuple[
778
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
779
+ ],
780
+ ] = None,
781
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
782
+ _content_type: Optional[StrictStr] = None,
783
+ _headers: Optional[Dict[StrictStr, Any]] = None,
784
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
785
+ ) -> str:
786
+ """Synchronous version of ping"""
787
+ return async_to_sync(self._ping_async)(
788
+ _request_timeout=_request_timeout,
789
+ _request_auth=_request_auth,
790
+ _content_type=_content_type,
791
+ _headers=_headers,
792
+ _host_index=_host_index,
793
+ )
794
+
795
+ @validate_call
796
+ def _ping_sync_with_http_info(
797
+ self,
798
+ _request_timeout: Union[
799
+ None,
800
+ Annotated[StrictFloat, Field(gt=0)],
801
+ Tuple[
802
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
803
+ ],
804
+ ] = None,
805
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
806
+ _content_type: Optional[StrictStr] = None,
807
+ _headers: Optional[Dict[StrictStr, Any]] = None,
808
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
809
+ ) -> ApiResponse[str]:
810
+ """Synchronous version of ping_with_http_info"""
811
+ return async_to_sync(self._ping_async_with_http_info)(
812
+ _request_timeout=_request_timeout,
813
+ _request_auth=_request_auth,
814
+ _content_type=_content_type,
815
+ _headers=_headers,
816
+ _host_index=_host_index,
817
+ )
818
+
819
+ @validate_call
820
+ def _ping_sync_without_preload_content(
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
+ ) -> RESTResponseType:
834
+ """Synchronous version of ping_without_preload_content"""
835
+ return async_to_sync(self._ping_async_without_preload_content)(
836
+ _request_timeout=_request_timeout,
837
+ _request_auth=_request_auth,
838
+ _content_type=_content_type,
839
+ _headers=_headers,
840
+ _host_index=_host_index,
841
+ )
842
+
843
+ def _ping_serialize(
844
+ self,
845
+ _request_auth,
846
+ _content_type,
847
+ _headers,
848
+ _host_index,
849
+ ) -> RequestSerialized:
850
+
851
+ _host = None
852
+
853
+ _collection_formats: Dict[str, str] = {}
854
+
855
+ _path_params: Dict[str, str] = {}
856
+ _query_params: List[Tuple[str, str]] = []
857
+ _header_params: Dict[str, Optional[str]] = _headers or {}
858
+ _form_params: List[Tuple[str, str]] = []
859
+ _files: Dict[
860
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
861
+ ] = {}
862
+ _body_params: Optional[bytes] = None
863
+
864
+ # process the path parameters
865
+ # process the query parameters
866
+ # process the header parameters
867
+ # process the form parameters
868
+ # process the body parameter
869
+
870
+ # set the HTTP header `Accept`
871
+ if "Accept" not in _header_params:
872
+ _header_params["Accept"] = self.api_client.select_header_accept(
873
+ ["application/json"]
874
+ )
875
+
876
+ # authentication setting
877
+ _auth_settings: List[str] = []
878
+
879
+ return self.api_client.param_serialize(
880
+ method="GET",
881
+ resource_path="/",
882
+ path_params=_path_params,
883
+ query_params=_query_params,
884
+ header_params=_header_params,
885
+ body=_body_params,
886
+ post_params=_form_params,
887
+ files=_files,
888
+ auth_settings=_auth_settings,
889
+ collection_formats=_collection_formats,
890
+ _host=_host,
891
+ _request_auth=_request_auth,
892
+ )