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
@@ -11,14 +11,10 @@ Generated by OpenAPI Generator (https://openapi-generator.tech)
11
11
  Do not edit the class manually.
12
12
  """ # noqa: E501
13
13
 
14
- import warnings
15
14
  from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
15
  from typing import Any, Dict, List, Optional, Tuple, Union
17
16
  from typing_extensions import Annotated
18
17
 
19
- from pydantic import Field, StrictInt
20
- from typing import Optional
21
- from typing_extensions import Annotated
22
18
  from crypticorn.hive.client.models.data_download_response import DataDownloadResponse
23
19
  from crypticorn.hive.client.models.data_info import DataInfo
24
20
  from crypticorn.hive.client.models.data_version import DataVersion
@@ -28,6 +24,24 @@ from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
28
24
  from crypticorn.hive.client.api_response import ApiResponse
29
25
  from crypticorn.hive.client.rest import RESTResponseType
30
26
 
27
+ # Import async_to_sync for sync methods
28
+ try:
29
+ from asgiref.sync import async_to_sync
30
+
31
+ _HAS_ASGIREF = True
32
+ except ImportError:
33
+ _HAS_ASGIREF = False
34
+
35
+ def async_to_sync(async_func):
36
+ """Fallback decorator that raises an error if asgiref is not available."""
37
+
38
+ def wrapper(*args, **kwargs):
39
+ raise ImportError(
40
+ "asgiref is required for sync methods. Install with: pip install asgiref"
41
+ )
42
+
43
+ return wrapper
44
+
31
45
 
32
46
  class DataApi:
33
47
  """NOTE: This class is auto generated by OpenAPI Generator
@@ -36,13 +50,180 @@ class DataApi:
36
50
  Do not edit the class manually.
37
51
  """
38
52
 
39
- def __init__(self, api_client=None) -> None:
53
+ def __init__(self, api_client=None, is_sync: bool = False) -> None:
40
54
  if api_client is None:
41
55
  api_client = ApiClient.get_default()
42
56
  self.api_client = api_client
57
+ self.is_sync = is_sync
43
58
 
44
59
  @validate_call
45
- async def download_data(
60
+ def download_data(
61
+ self,
62
+ model_id: Annotated[
63
+ StrictInt, Field(description="The ID of the model to download data for.")
64
+ ],
65
+ version: Annotated[
66
+ Optional[DataVersion],
67
+ Field(
68
+ description="The version of the data to download. Default is the latest public version."
69
+ ),
70
+ ] = None,
71
+ feature_size: Annotated[
72
+ Optional[FeatureSize],
73
+ Field(
74
+ description="The number of features in the data. Default is `LARGE`."
75
+ ),
76
+ ] = None,
77
+ _request_timeout: Union[
78
+ None,
79
+ Annotated[StrictFloat, Field(gt=0)],
80
+ Tuple[
81
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
82
+ ],
83
+ ] = None,
84
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
85
+ _content_type: Optional[StrictStr] = None,
86
+ _headers: Optional[Dict[StrictStr, Any]] = None,
87
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
88
+ ) -> DataDownloadResponse:
89
+ """Download Data"""
90
+ if self.is_sync:
91
+ return self._download_data_sync(
92
+ model_id=model_id,
93
+ version=version,
94
+ feature_size=feature_size,
95
+ _request_timeout=_request_timeout,
96
+ _request_auth=_request_auth,
97
+ _content_type=_content_type,
98
+ _headers=_headers,
99
+ _host_index=_host_index,
100
+ )
101
+
102
+ else:
103
+ return self._download_data_async(
104
+ model_id=model_id,
105
+ version=version,
106
+ feature_size=feature_size,
107
+ _request_timeout=_request_timeout,
108
+ _request_auth=_request_auth,
109
+ _content_type=_content_type,
110
+ _headers=_headers,
111
+ _host_index=_host_index,
112
+ )
113
+
114
+ @validate_call
115
+ def download_data_with_http_info(
116
+ self,
117
+ model_id: Annotated[
118
+ StrictInt, Field(description="The ID of the model to download data for.")
119
+ ],
120
+ version: Annotated[
121
+ Optional[DataVersion],
122
+ Field(
123
+ description="The version of the data to download. Default is the latest public version."
124
+ ),
125
+ ] = None,
126
+ feature_size: Annotated[
127
+ Optional[FeatureSize],
128
+ Field(
129
+ description="The number of features in the data. Default is `LARGE`."
130
+ ),
131
+ ] = None,
132
+ _request_timeout: Union[
133
+ None,
134
+ Annotated[StrictFloat, Field(gt=0)],
135
+ Tuple[
136
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
137
+ ],
138
+ ] = None,
139
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
140
+ _content_type: Optional[StrictStr] = None,
141
+ _headers: Optional[Dict[StrictStr, Any]] = None,
142
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
143
+ ) -> ApiResponse[DataDownloadResponse]:
144
+ """Download Data with HTTP info"""
145
+ if self.is_sync:
146
+ return self._download_data_sync_with_http_info(
147
+ model_id=model_id,
148
+ version=version,
149
+ feature_size=feature_size,
150
+ _request_timeout=_request_timeout,
151
+ _request_auth=_request_auth,
152
+ _content_type=_content_type,
153
+ _headers=_headers,
154
+ _host_index=_host_index,
155
+ )
156
+
157
+ else:
158
+ return self._download_data_async_with_http_info(
159
+ model_id=model_id,
160
+ version=version,
161
+ feature_size=feature_size,
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
+ @validate_call
170
+ def download_data_without_preload_content(
171
+ self,
172
+ model_id: Annotated[
173
+ StrictInt, Field(description="The ID of the model to download data for.")
174
+ ],
175
+ version: Annotated[
176
+ Optional[DataVersion],
177
+ Field(
178
+ description="The version of the data to download. Default is the latest public version."
179
+ ),
180
+ ] = None,
181
+ feature_size: Annotated[
182
+ Optional[FeatureSize],
183
+ Field(
184
+ description="The number of features in the data. Default is `LARGE`."
185
+ ),
186
+ ] = None,
187
+ _request_timeout: Union[
188
+ None,
189
+ Annotated[StrictFloat, Field(gt=0)],
190
+ Tuple[
191
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
192
+ ],
193
+ ] = None,
194
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
195
+ _content_type: Optional[StrictStr] = None,
196
+ _headers: Optional[Dict[StrictStr, Any]] = None,
197
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
198
+ ) -> RESTResponseType:
199
+ """Download Data without preloading content"""
200
+ if self.is_sync:
201
+ return self._download_data_sync_without_preload_content(
202
+ model_id=model_id,
203
+ version=version,
204
+ feature_size=feature_size,
205
+ _request_timeout=_request_timeout,
206
+ _request_auth=_request_auth,
207
+ _content_type=_content_type,
208
+ _headers=_headers,
209
+ _host_index=_host_index,
210
+ )
211
+
212
+ else:
213
+ return self._download_data_async_without_preload_content(
214
+ model_id=model_id,
215
+ version=version,
216
+ feature_size=feature_size,
217
+ _request_timeout=_request_timeout,
218
+ _request_auth=_request_auth,
219
+ _content_type=_content_type,
220
+ _headers=_headers,
221
+ _host_index=_host_index,
222
+ )
223
+
224
+ # Private async implementation methods
225
+ @validate_call
226
+ async def _download_data_async(
46
227
  self,
47
228
  model_id: Annotated[
48
229
  StrictInt, Field(description="The ID of the model to download data for.")
@@ -126,7 +307,7 @@ class DataApi:
126
307
  ).data
127
308
 
128
309
  @validate_call
129
- async def download_data_with_http_info(
310
+ async def _download_data_async_with_http_info(
130
311
  self,
131
312
  model_id: Annotated[
132
313
  StrictInt, Field(description="The ID of the model to download data for.")
@@ -205,12 +386,11 @@ class DataApi:
205
386
  )
206
387
  await response_data.read()
207
388
  return self.api_client.response_deserialize(
208
- response_data=response_data,
209
- response_types_map=_response_types_map,
389
+ response_data=response_data, response_types_map=_response_types_map
210
390
  )
211
391
 
212
392
  @validate_call
213
- async def download_data_without_preload_content(
393
+ async def _download_data_async_without_preload_content(
214
394
  self,
215
395
  model_id: Annotated[
216
396
  StrictInt, Field(description="The ID of the model to download data for.")
@@ -287,7 +467,134 @@ class DataApi:
287
467
  response_data = await self.api_client.call_api(
288
468
  *_param, _request_timeout=_request_timeout
289
469
  )
290
- return response_data.response
470
+ return response_data
471
+
472
+ # Private sync implementation methods
473
+ @validate_call
474
+ def _download_data_sync(
475
+ self,
476
+ model_id: Annotated[
477
+ StrictInt, Field(description="The ID of the model to download data for.")
478
+ ],
479
+ version: Annotated[
480
+ Optional[DataVersion],
481
+ Field(
482
+ description="The version of the data to download. Default is the latest public version."
483
+ ),
484
+ ] = None,
485
+ feature_size: Annotated[
486
+ Optional[FeatureSize],
487
+ Field(
488
+ description="The number of features in the data. Default is `LARGE`."
489
+ ),
490
+ ] = None,
491
+ _request_timeout: Union[
492
+ None,
493
+ Annotated[StrictFloat, Field(gt=0)],
494
+ Tuple[
495
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
496
+ ],
497
+ ] = None,
498
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
499
+ _content_type: Optional[StrictStr] = None,
500
+ _headers: Optional[Dict[StrictStr, Any]] = None,
501
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
502
+ ) -> DataDownloadResponse:
503
+ """Synchronous version of download_data"""
504
+ return async_to_sync(self._download_data_async)(
505
+ model_id=model_id,
506
+ version=version,
507
+ feature_size=feature_size,
508
+ _request_timeout=_request_timeout,
509
+ _request_auth=_request_auth,
510
+ _content_type=_content_type,
511
+ _headers=_headers,
512
+ _host_index=_host_index,
513
+ )
514
+
515
+ @validate_call
516
+ def _download_data_sync_with_http_info(
517
+ self,
518
+ model_id: Annotated[
519
+ StrictInt, Field(description="The ID of the model to download data for.")
520
+ ],
521
+ version: Annotated[
522
+ Optional[DataVersion],
523
+ Field(
524
+ description="The version of the data to download. Default is the latest public version."
525
+ ),
526
+ ] = None,
527
+ feature_size: Annotated[
528
+ Optional[FeatureSize],
529
+ Field(
530
+ description="The number of features in the data. Default is `LARGE`."
531
+ ),
532
+ ] = None,
533
+ _request_timeout: Union[
534
+ None,
535
+ Annotated[StrictFloat, Field(gt=0)],
536
+ Tuple[
537
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
538
+ ],
539
+ ] = None,
540
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
541
+ _content_type: Optional[StrictStr] = None,
542
+ _headers: Optional[Dict[StrictStr, Any]] = None,
543
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
544
+ ) -> ApiResponse[DataDownloadResponse]:
545
+ """Synchronous version of download_data_with_http_info"""
546
+ return async_to_sync(self._download_data_async_with_http_info)(
547
+ model_id=model_id,
548
+ version=version,
549
+ feature_size=feature_size,
550
+ _request_timeout=_request_timeout,
551
+ _request_auth=_request_auth,
552
+ _content_type=_content_type,
553
+ _headers=_headers,
554
+ _host_index=_host_index,
555
+ )
556
+
557
+ @validate_call
558
+ def _download_data_sync_without_preload_content(
559
+ self,
560
+ model_id: Annotated[
561
+ StrictInt, Field(description="The ID of the model to download data for.")
562
+ ],
563
+ version: Annotated[
564
+ Optional[DataVersion],
565
+ Field(
566
+ description="The version of the data to download. Default is the latest public version."
567
+ ),
568
+ ] = None,
569
+ feature_size: Annotated[
570
+ Optional[FeatureSize],
571
+ Field(
572
+ description="The number of features in the data. Default is `LARGE`."
573
+ ),
574
+ ] = None,
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
+ """Synchronous version of download_data_without_preload_content"""
588
+ return async_to_sync(self._download_data_async_without_preload_content)(
589
+ model_id=model_id,
590
+ version=version,
591
+ feature_size=feature_size,
592
+ _request_timeout=_request_timeout,
593
+ _request_auth=_request_auth,
594
+ _content_type=_content_type,
595
+ _headers=_headers,
596
+ _host_index=_host_index,
597
+ )
291
598
 
292
599
  def _download_data_serialize(
293
600
  self,
@@ -356,7 +663,110 @@ class DataApi:
356
663
  )
357
664
 
358
665
  @validate_call
359
- async def get_data_info(
666
+ def get_data_info(
667
+ self,
668
+ _request_timeout: Union[
669
+ None,
670
+ Annotated[StrictFloat, Field(gt=0)],
671
+ Tuple[
672
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
673
+ ],
674
+ ] = None,
675
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
676
+ _content_type: Optional[StrictStr] = None,
677
+ _headers: Optional[Dict[StrictStr, Any]] = None,
678
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
679
+ ) -> DataInfo:
680
+ """Get Data Info"""
681
+ if self.is_sync:
682
+ return self._get_data_info_sync(
683
+ _request_timeout=_request_timeout,
684
+ _request_auth=_request_auth,
685
+ _content_type=_content_type,
686
+ _headers=_headers,
687
+ _host_index=_host_index,
688
+ )
689
+
690
+ else:
691
+ return self._get_data_info_async(
692
+ _request_timeout=_request_timeout,
693
+ _request_auth=_request_auth,
694
+ _content_type=_content_type,
695
+ _headers=_headers,
696
+ _host_index=_host_index,
697
+ )
698
+
699
+ @validate_call
700
+ def get_data_info_with_http_info(
701
+ self,
702
+ _request_timeout: Union[
703
+ None,
704
+ Annotated[StrictFloat, Field(gt=0)],
705
+ Tuple[
706
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
707
+ ],
708
+ ] = None,
709
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
710
+ _content_type: Optional[StrictStr] = None,
711
+ _headers: Optional[Dict[StrictStr, Any]] = None,
712
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
713
+ ) -> ApiResponse[DataInfo]:
714
+ """Get Data Info with HTTP info"""
715
+ if self.is_sync:
716
+ return self._get_data_info_sync_with_http_info(
717
+ _request_timeout=_request_timeout,
718
+ _request_auth=_request_auth,
719
+ _content_type=_content_type,
720
+ _headers=_headers,
721
+ _host_index=_host_index,
722
+ )
723
+
724
+ else:
725
+ return self._get_data_info_async_with_http_info(
726
+ _request_timeout=_request_timeout,
727
+ _request_auth=_request_auth,
728
+ _content_type=_content_type,
729
+ _headers=_headers,
730
+ _host_index=_host_index,
731
+ )
732
+
733
+ @validate_call
734
+ def get_data_info_without_preload_content(
735
+ self,
736
+ _request_timeout: Union[
737
+ None,
738
+ Annotated[StrictFloat, Field(gt=0)],
739
+ Tuple[
740
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
741
+ ],
742
+ ] = None,
743
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
744
+ _content_type: Optional[StrictStr] = None,
745
+ _headers: Optional[Dict[StrictStr, Any]] = None,
746
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
747
+ ) -> RESTResponseType:
748
+ """Get Data Info without preloading content"""
749
+ if self.is_sync:
750
+ return self._get_data_info_sync_without_preload_content(
751
+ _request_timeout=_request_timeout,
752
+ _request_auth=_request_auth,
753
+ _content_type=_content_type,
754
+ _headers=_headers,
755
+ _host_index=_host_index,
756
+ )
757
+
758
+ else:
759
+ return self._get_data_info_async_without_preload_content(
760
+ _request_timeout=_request_timeout,
761
+ _request_auth=_request_auth,
762
+ _content_type=_content_type,
763
+ _headers=_headers,
764
+ _host_index=_host_index,
765
+ )
766
+
767
+ # Private async implementation methods
768
+ @validate_call
769
+ async def _get_data_info_async(
360
770
  self,
361
771
  _request_timeout: Union[
362
772
  None,
@@ -416,7 +826,7 @@ class DataApi:
416
826
  ).data
417
827
 
418
828
  @validate_call
419
- async def get_data_info_with_http_info(
829
+ async def _get_data_info_async_with_http_info(
420
830
  self,
421
831
  _request_timeout: Union[
422
832
  None,
@@ -471,12 +881,11 @@ class DataApi:
471
881
  )
472
882
  await response_data.read()
473
883
  return self.api_client.response_deserialize(
474
- response_data=response_data,
475
- response_types_map=_response_types_map,
884
+ response_data=response_data, response_types_map=_response_types_map
476
885
  )
477
886
 
478
887
  @validate_call
479
- async def get_data_info_without_preload_content(
888
+ async def _get_data_info_async_without_preload_content(
480
889
  self,
481
890
  _request_timeout: Union[
482
891
  None,
@@ -529,7 +938,80 @@ class DataApi:
529
938
  response_data = await self.api_client.call_api(
530
939
  *_param, _request_timeout=_request_timeout
531
940
  )
532
- return response_data.response
941
+ return response_data
942
+
943
+ # Private sync implementation methods
944
+ @validate_call
945
+ def _get_data_info_sync(
946
+ self,
947
+ _request_timeout: Union[
948
+ None,
949
+ Annotated[StrictFloat, Field(gt=0)],
950
+ Tuple[
951
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
952
+ ],
953
+ ] = None,
954
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
955
+ _content_type: Optional[StrictStr] = None,
956
+ _headers: Optional[Dict[StrictStr, Any]] = None,
957
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
958
+ ) -> DataInfo:
959
+ """Synchronous version of get_data_info"""
960
+ return async_to_sync(self._get_data_info_async)(
961
+ _request_timeout=_request_timeout,
962
+ _request_auth=_request_auth,
963
+ _content_type=_content_type,
964
+ _headers=_headers,
965
+ _host_index=_host_index,
966
+ )
967
+
968
+ @validate_call
969
+ def _get_data_info_sync_with_http_info(
970
+ self,
971
+ _request_timeout: Union[
972
+ None,
973
+ Annotated[StrictFloat, Field(gt=0)],
974
+ Tuple[
975
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
976
+ ],
977
+ ] = None,
978
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
979
+ _content_type: Optional[StrictStr] = None,
980
+ _headers: Optional[Dict[StrictStr, Any]] = None,
981
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
982
+ ) -> ApiResponse[DataInfo]:
983
+ """Synchronous version of get_data_info_with_http_info"""
984
+ return async_to_sync(self._get_data_info_async_with_http_info)(
985
+ _request_timeout=_request_timeout,
986
+ _request_auth=_request_auth,
987
+ _content_type=_content_type,
988
+ _headers=_headers,
989
+ _host_index=_host_index,
990
+ )
991
+
992
+ @validate_call
993
+ def _get_data_info_sync_without_preload_content(
994
+ self,
995
+ _request_timeout: Union[
996
+ None,
997
+ Annotated[StrictFloat, Field(gt=0)],
998
+ Tuple[
999
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
1000
+ ],
1001
+ ] = None,
1002
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1003
+ _content_type: Optional[StrictStr] = None,
1004
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1005
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1006
+ ) -> RESTResponseType:
1007
+ """Synchronous version of get_data_info_without_preload_content"""
1008
+ return async_to_sync(self._get_data_info_async_without_preload_content)(
1009
+ _request_timeout=_request_timeout,
1010
+ _request_auth=_request_auth,
1011
+ _content_type=_content_type,
1012
+ _headers=_headers,
1013
+ _host_index=_host_index,
1014
+ )
533
1015
 
534
1016
  def _get_data_info_serialize(
535
1017
  self,