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