crypticorn 2.15.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.
- crypticorn/__init__.py +2 -2
- crypticorn/auth/client/api/admin_api.py +397 -13
- crypticorn/auth/client/api/auth_api.py +3610 -341
- crypticorn/auth/client/api/service_api.py +249 -7
- crypticorn/auth/client/api/user_api.py +2295 -179
- crypticorn/auth/client/api/wallet_api.py +1468 -81
- crypticorn/auth/client/configuration.py +2 -2
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/rest.py +23 -4
- crypticorn/auth/main.py +8 -5
- crypticorn/cli/init.py +1 -1
- crypticorn/cli/templates/.env.docker.temp +3 -0
- crypticorn/cli/templates/.env.example.temp +4 -0
- crypticorn/cli/templates/Dockerfile +5 -2
- crypticorn/client.py +226 -59
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +45 -14
- crypticorn/common/decorators.py +1 -2
- crypticorn/common/enums.py +0 -2
- crypticorn/common/errors.py +10 -0
- crypticorn/common/metrics.py +30 -0
- crypticorn/common/middleware.py +94 -1
- crypticorn/common/pagination.py +252 -18
- crypticorn/common/router/admin_router.py +2 -2
- crypticorn/common/router/status_router.py +40 -2
- crypticorn/common/scopes.py +2 -0
- crypticorn/common/warnings.py +8 -0
- crypticorn/dex/__init__.py +6 -0
- crypticorn/dex/client/__init__.py +49 -0
- crypticorn/dex/client/api/__init__.py +6 -0
- crypticorn/dex/client/api/admin_api.py +2986 -0
- crypticorn/dex/client/api/signals_api.py +1798 -0
- crypticorn/dex/client/api/status_api.py +892 -0
- crypticorn/dex/client/api_client.py +758 -0
- crypticorn/dex/client/api_response.py +20 -0
- crypticorn/dex/client/configuration.py +620 -0
- crypticorn/dex/client/exceptions.py +220 -0
- crypticorn/dex/client/models/__init__.py +30 -0
- crypticorn/dex/client/models/api_error_identifier.py +121 -0
- crypticorn/dex/client/models/api_error_level.py +37 -0
- crypticorn/dex/client/models/api_error_type.py +37 -0
- crypticorn/dex/client/models/exception_detail.py +117 -0
- crypticorn/dex/client/models/log_level.py +38 -0
- crypticorn/dex/client/models/paginated_response_signal_with_token.py +134 -0
- crypticorn/dex/client/models/risk.py +86 -0
- crypticorn/dex/client/models/signal_overview_stats.py +158 -0
- crypticorn/dex/client/models/signal_volume.py +84 -0
- crypticorn/dex/client/models/signal_with_token.py +163 -0
- crypticorn/dex/client/models/token_data.py +127 -0
- crypticorn/dex/client/models/token_detail.py +116 -0
- crypticorn/dex/client/py.typed +0 -0
- crypticorn/dex/client/rest.py +217 -0
- crypticorn/dex/main.py +1 -0
- crypticorn/hive/client/api/admin_api.py +1173 -47
- crypticorn/hive/client/api/data_api.py +499 -17
- crypticorn/hive/client/api/models_api.py +1595 -87
- crypticorn/hive/client/api/status_api.py +397 -16
- crypticorn/hive/client/api_client.py +0 -5
- crypticorn/hive/client/models/api_error_identifier.py +1 -1
- crypticorn/hive/client/models/coin_info.py +1 -1
- crypticorn/hive/client/models/exception_detail.py +1 -1
- crypticorn/hive/client/models/target_info.py +1 -1
- crypticorn/hive/client/rest.py +23 -4
- crypticorn/hive/main.py +99 -25
- crypticorn/hive/utils.py +2 -2
- crypticorn/klines/client/api/admin_api.py +1173 -47
- crypticorn/klines/client/api/change_in_timeframe_api.py +269 -11
- crypticorn/klines/client/api/funding_rates_api.py +315 -11
- crypticorn/klines/client/api/ohlcv_data_api.py +390 -11
- crypticorn/klines/client/api/status_api.py +397 -16
- crypticorn/klines/client/api/symbols_api.py +216 -11
- crypticorn/klines/client/api/udf_api.py +1268 -51
- crypticorn/klines/client/api_client.py +0 -5
- crypticorn/klines/client/models/api_error_identifier.py +3 -1
- crypticorn/klines/client/models/exception_detail.py +1 -1
- crypticorn/klines/client/models/ohlcv.py +1 -1
- crypticorn/klines/client/models/symbol_group.py +1 -1
- crypticorn/klines/client/models/udf_config.py +1 -1
- crypticorn/klines/client/rest.py +23 -4
- crypticorn/klines/main.py +89 -12
- crypticorn/metrics/client/api/admin_api.py +1173 -47
- crypticorn/metrics/client/api/exchanges_api.py +1370 -145
- crypticorn/metrics/client/api/indicators_api.py +622 -17
- crypticorn/metrics/client/api/logs_api.py +296 -11
- crypticorn/metrics/client/api/marketcap_api.py +1207 -67
- crypticorn/metrics/client/api/markets_api.py +343 -11
- crypticorn/metrics/client/api/quote_currencies_api.py +228 -11
- crypticorn/metrics/client/api/status_api.py +397 -16
- crypticorn/metrics/client/api/tokens_api.py +382 -15
- crypticorn/metrics/client/api_client.py +0 -5
- crypticorn/metrics/client/configuration.py +4 -2
- crypticorn/metrics/client/models/exception_detail.py +1 -1
- crypticorn/metrics/client/models/exchange_mapping.py +1 -1
- crypticorn/metrics/client/models/marketcap_ranking.py +1 -1
- crypticorn/metrics/client/models/marketcap_symbol_ranking.py +1 -1
- crypticorn/metrics/client/models/ohlcv.py +1 -1
- crypticorn/metrics/client/rest.py +23 -4
- crypticorn/metrics/main.py +113 -19
- crypticorn/pay/client/api/admin_api.py +1585 -57
- crypticorn/pay/client/api/now_payments_api.py +961 -39
- crypticorn/pay/client/api/payments_api.py +562 -17
- crypticorn/pay/client/api/products_api.py +880 -30
- crypticorn/pay/client/api/status_api.py +397 -16
- crypticorn/pay/client/api_client.py +0 -5
- crypticorn/pay/client/configuration.py +2 -2
- crypticorn/pay/client/models/api_error_identifier.py +7 -7
- crypticorn/pay/client/models/exception_detail.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_req.py +1 -1
- crypticorn/pay/client/models/now_create_invoice_res.py +1 -1
- crypticorn/pay/client/models/product.py +1 -1
- crypticorn/pay/client/models/product_create.py +1 -1
- crypticorn/pay/client/models/product_update.py +1 -1
- crypticorn/pay/client/models/scope.py +1 -0
- crypticorn/pay/client/rest.py +23 -4
- crypticorn/pay/main.py +10 -6
- crypticorn/trade/client/__init__.py +11 -1
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/admin_api.py +1184 -55
- crypticorn/trade/client/api/api_keys_api.py +1678 -162
- crypticorn/trade/client/api/bots_api.py +7563 -187
- crypticorn/trade/client/api/exchanges_api.py +565 -19
- crypticorn/trade/client/api/notifications_api.py +1290 -116
- crypticorn/trade/client/api/orders_api.py +393 -55
- crypticorn/trade/client/api/status_api.py +397 -13
- crypticorn/trade/client/api/strategies_api.py +1133 -77
- crypticorn/trade/client/api/trading_actions_api.py +786 -65
- crypticorn/trade/client/models/__init__.py +11 -0
- crypticorn/trade/client/models/actions_count.py +88 -0
- crypticorn/trade/client/models/api_error_identifier.py +8 -7
- crypticorn/trade/client/models/bot.py +7 -18
- crypticorn/trade/client/models/bot_create.py +17 -1
- crypticorn/trade/client/models/bot_update.py +17 -1
- crypticorn/trade/client/models/exchange.py +6 -1
- crypticorn/trade/client/models/exchange_key.py +1 -1
- crypticorn/trade/client/models/exchange_key_balance.py +111 -0
- crypticorn/trade/client/models/exchange_key_create.py +17 -1
- crypticorn/trade/client/models/exchange_key_update.py +17 -1
- crypticorn/trade/client/models/execution_ids.py +1 -1
- crypticorn/trade/client/models/futures_balance.py +27 -25
- crypticorn/trade/client/models/futures_trading_action.py +6 -28
- crypticorn/trade/client/models/futures_trading_action_create.py +10 -13
- crypticorn/trade/client/models/notification.py +17 -1
- crypticorn/trade/client/models/notification_create.py +18 -2
- crypticorn/trade/client/models/notification_update.py +17 -1
- crypticorn/trade/client/models/order.py +2 -14
- crypticorn/trade/client/models/orders_count.py +88 -0
- crypticorn/trade/client/models/paginated_response_futures_trading_action.py +134 -0
- crypticorn/trade/client/models/paginated_response_order.py +134 -0
- crypticorn/trade/client/models/pn_l.py +95 -0
- crypticorn/trade/client/models/post_futures_action.py +1 -1
- crypticorn/trade/client/models/spot_balance.py +109 -0
- crypticorn/trade/client/models/spot_trading_action_create.py +4 -1
- crypticorn/trade/client/models/strategy.py +22 -4
- crypticorn/trade/client/models/strategy_create.py +23 -5
- crypticorn/trade/client/models/strategy_exchange_info.py +16 -4
- crypticorn/trade/client/models/strategy_update.py +19 -3
- crypticorn/trade/client/models/tpsl.py +4 -27
- crypticorn/trade/client/models/tpsl_create.py +6 -19
- crypticorn/trade/client/rest.py +23 -4
- crypticorn/trade/main.py +15 -12
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/METADATA +65 -20
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/RECORD +167 -132
- crypticorn/trade/client/api/futures_trading_panel_api.py +0 -1285
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/WHEEL +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.15.0.dist-info → crypticorn-2.17.0.dist-info}/licenses/LICENSE +0 -0
- {crypticorn-2.15.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
|
-
|
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
|
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
|
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
|
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
|
-
|
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
|
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
|
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
|
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,
|