crypticorn 1.0.2rc3__py3-none-any.whl → 2.0.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 (259) hide show
  1. crypticorn/__init__.py +3 -3
  2. crypticorn/auth/__init__.py +2 -0
  3. crypticorn/auth/client/__init__.py +112 -0
  4. crypticorn/auth/client/api/__init__.py +8 -0
  5. crypticorn/auth/client/api/admin_api.py +522 -0
  6. crypticorn/auth/client/api/auth_api.py +2089 -0
  7. crypticorn/auth/client/api/service_api.py +309 -0
  8. crypticorn/auth/client/api/user_api.py +2540 -0
  9. crypticorn/auth/client/api/wallet_api.py +1698 -0
  10. crypticorn/auth/client/api_client.py +758 -0
  11. crypticorn/auth/client/api_response.py +20 -0
  12. crypticorn/auth/client/configuration.py +584 -0
  13. crypticorn/auth/client/exceptions.py +220 -0
  14. crypticorn/auth/client/models/__init__.py +91 -0
  15. crypticorn/auth/client/models/add_wallet200_response.py +86 -0
  16. crypticorn/auth/client/models/add_wallet_request.py +107 -0
  17. crypticorn/auth/client/models/authorize_user200_response.py +107 -0
  18. crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
  19. crypticorn/auth/client/models/authorize_user_request.py +96 -0
  20. crypticorn/auth/client/models/create_user_request.py +114 -0
  21. crypticorn/auth/client/models/list_wallets200_response.py +137 -0
  22. crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
  23. crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
  24. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
  25. crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
  26. crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
  27. crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
  28. crypticorn/auth/client/models/logout_default_response.py +108 -0
  29. crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
  30. crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
  31. crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
  32. crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
  33. crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
  34. crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
  35. crypticorn/auth/client/models/token_info200_response.py +97 -0
  36. crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
  37. crypticorn/auth/client/models/update_user_request.py +93 -0
  38. crypticorn/auth/client/models/user_reset_password_request.py +87 -0
  39. crypticorn/auth/client/models/user_set_password_request.py +89 -0
  40. crypticorn/auth/client/models/verify200_response.py +110 -0
  41. crypticorn/auth/client/models/verify_email200_response.py +107 -0
  42. crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
  43. crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
  44. crypticorn/auth/client/models/verify_email_request.py +83 -0
  45. crypticorn/auth/client/models/verify_wallet_request.py +91 -0
  46. crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
  47. crypticorn/auth/client/models/whoami200_response.py +104 -0
  48. crypticorn/auth/client/rest.py +195 -0
  49. crypticorn/auth/main.py +45 -0
  50. crypticorn/client.py +46 -8
  51. crypticorn/common/__init__.py +5 -0
  52. crypticorn/common/auth.py +43 -0
  53. crypticorn/common/auth_client.py +163 -0
  54. crypticorn/common/errors.py +432 -0
  55. crypticorn/common/scopes.py +29 -0
  56. crypticorn/common/urls.py +25 -0
  57. crypticorn/hive/__init__.py +2 -1
  58. crypticorn/hive/client/__init__.py +57 -0
  59. crypticorn/hive/client/api/__init__.py +6 -0
  60. crypticorn/hive/client/api/data_api.py +594 -0
  61. crypticorn/hive/client/api/models_api.py +1680 -0
  62. crypticorn/hive/client/api/status_api.py +263 -0
  63. crypticorn/hive/client/api_client.py +758 -0
  64. crypticorn/hive/client/api_response.py +20 -0
  65. crypticorn/hive/client/configuration.py +612 -0
  66. crypticorn/hive/client/exceptions.py +220 -0
  67. crypticorn/hive/client/models/__init__.py +38 -0
  68. crypticorn/hive/client/models/coins.py +44 -0
  69. crypticorn/hive/client/models/data_download_response.py +113 -0
  70. crypticorn/hive/client/models/data_info.py +115 -0
  71. crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
  72. crypticorn/hive/client/models/data_version.py +35 -0
  73. crypticorn/hive/client/models/download_links.py +91 -0
  74. crypticorn/hive/client/models/evaluation.py +86 -0
  75. crypticorn/hive/client/models/evaluation_response.py +85 -0
  76. crypticorn/hive/client/models/feature_size.py +36 -0
  77. crypticorn/hive/client/models/http_validation_error.py +99 -0
  78. crypticorn/hive/client/models/model.py +133 -0
  79. crypticorn/hive/client/models/model_create.py +93 -0
  80. crypticorn/hive/client/models/model_status.py +35 -0
  81. crypticorn/hive/client/models/model_update.py +83 -0
  82. crypticorn/hive/client/models/target.py +36 -0
  83. crypticorn/hive/client/models/target_type.py +35 -0
  84. crypticorn/hive/client/models/validation_error.py +105 -0
  85. crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
  86. crypticorn/hive/client/py.typed +0 -0
  87. crypticorn/hive/client/rest.py +195 -0
  88. crypticorn/hive/main.py +27 -100
  89. crypticorn/klines/client/__init__.py +21 -7
  90. crypticorn/klines/client/api/__init__.py +0 -1
  91. crypticorn/klines/client/api/funding_rates_api.py +90 -79
  92. crypticorn/klines/client/api/health_check_api.py +29 -45
  93. crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
  94. crypticorn/klines/client/api/symbols_api.py +36 -54
  95. crypticorn/klines/client/api/udf_api.py +228 -352
  96. crypticorn/klines/client/api_client.py +106 -148
  97. crypticorn/klines/client/api_response.py +2 -3
  98. crypticorn/klines/client/configuration.py +64 -50
  99. crypticorn/klines/client/exceptions.py +20 -16
  100. crypticorn/klines/client/models/__init__.py +21 -7
  101. crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
  102. crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
  103. crypticorn/klines/client/models/base_response_list_str.py +16 -14
  104. crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
  105. crypticorn/klines/client/models/error_response.py +23 -15
  106. crypticorn/klines/client/models/exchange.py +11 -11
  107. crypticorn/klines/client/models/funding_rate_response.py +11 -11
  108. crypticorn/klines/client/models/health_check_response.py +14 -12
  109. crypticorn/klines/client/models/history_error_response.py +11 -11
  110. crypticorn/klines/client/models/history_no_data_response.py +16 -16
  111. crypticorn/klines/client/models/history_success_response.py +16 -16
  112. crypticorn/klines/client/models/http_validation_error.py +14 -10
  113. crypticorn/klines/client/models/market.py +2 -4
  114. crypticorn/klines/client/models/ohlcv_response.py +22 -15
  115. crypticorn/klines/client/models/resolution.py +5 -7
  116. crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
  117. crypticorn/klines/client/models/search_symbol_response.py +22 -15
  118. crypticorn/klines/client/models/sort_direction.py +2 -4
  119. crypticorn/klines/client/models/symbol_group_response.py +5 -9
  120. crypticorn/klines/client/models/symbol_info_response.py +40 -24
  121. crypticorn/klines/client/models/symbol_type.py +5 -10
  122. crypticorn/klines/client/models/timeframe.py +5 -7
  123. crypticorn/klines/client/models/udf_config_response.py +60 -21
  124. crypticorn/klines/client/models/validation_error.py +19 -13
  125. crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
  126. crypticorn/klines/client/rest.py +30 -41
  127. crypticorn/klines/main.py +52 -15
  128. crypticorn/pay/__init__.py +2 -0
  129. crypticorn/pay/client/__init__.py +52 -0
  130. crypticorn/pay/client/api/__init__.py +7 -0
  131. crypticorn/pay/client/api/now_payments_api.py +813 -0
  132. crypticorn/pay/client/api/payments_api.py +799 -0
  133. crypticorn/pay/client/api/products_api.py +891 -0
  134. crypticorn/pay/client/api/status_api.py +260 -0
  135. crypticorn/pay/client/api_client.py +758 -0
  136. crypticorn/pay/client/api_response.py +20 -0
  137. crypticorn/pay/client/configuration.py +612 -0
  138. crypticorn/pay/client/exceptions.py +220 -0
  139. crypticorn/pay/client/models/__init__.py +32 -0
  140. crypticorn/pay/client/models/api_status_res.py +83 -0
  141. crypticorn/pay/client/models/combined_payment_history.py +101 -0
  142. crypticorn/pay/client/models/create_invoice_req.py +188 -0
  143. crypticorn/pay/client/models/create_invoice_res.py +188 -0
  144. crypticorn/pay/client/models/currency.py +165 -0
  145. crypticorn/pay/client/models/estimate_price_req.py +91 -0
  146. crypticorn/pay/client/models/estimate_price_res.py +102 -0
  147. crypticorn/pay/client/models/get_currencies_res.py +99 -0
  148. crypticorn/pay/client/models/get_payment_status_res.py +222 -0
  149. crypticorn/pay/client/models/get_payments_list_res.py +109 -0
  150. crypticorn/pay/client/models/http_validation_error.py +99 -0
  151. crypticorn/pay/client/models/min_amount_req.py +124 -0
  152. crypticorn/pay/client/models/min_amount_res.py +105 -0
  153. crypticorn/pay/client/models/now_api_status_res.py +83 -0
  154. crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
  155. crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
  156. crypticorn/pay/client/models/now_fee_structure.py +104 -0
  157. crypticorn/pay/client/models/now_payment_model.py +124 -0
  158. crypticorn/pay/client/models/now_payment_status.py +42 -0
  159. crypticorn/pay/client/models/now_webhook_payload.py +181 -0
  160. crypticorn/pay/client/models/payment.py +231 -0
  161. crypticorn/pay/client/models/payment_status.py +40 -0
  162. crypticorn/pay/client/models/product.py +87 -0
  163. crypticorn/pay/client/models/product_model.py +119 -0
  164. crypticorn/pay/client/models/product_subs_model.py +108 -0
  165. crypticorn/pay/client/models/services.py +34 -0
  166. crypticorn/pay/client/models/unified_payment_model.py +112 -0
  167. crypticorn/pay/client/models/validation_error.py +105 -0
  168. crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
  169. crypticorn/pay/client/py.typed +0 -0
  170. crypticorn/pay/client/rest.py +195 -0
  171. crypticorn/pay/main.py +35 -0
  172. crypticorn/trade/client/__init__.py +9 -4
  173. crypticorn/trade/client/api/__init__.py +0 -1
  174. crypticorn/trade/client/api/api_keys_api.py +203 -304
  175. crypticorn/trade/client/api/bots_api.py +177 -250
  176. crypticorn/trade/client/api/exchanges_api.py +38 -57
  177. crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
  178. crypticorn/trade/client/api/notifications_api.py +247 -364
  179. crypticorn/trade/client/api/orders_api.py +44 -63
  180. crypticorn/trade/client/api/status_api.py +35 -53
  181. crypticorn/trade/client/api/strategies_api.py +852 -64
  182. crypticorn/trade/client/api/trading_actions_api.py +126 -203
  183. crypticorn/trade/client/api_client.py +115 -154
  184. crypticorn/trade/client/api_response.py +2 -3
  185. crypticorn/trade/client/configuration.py +128 -90
  186. crypticorn/trade/client/exceptions.py +21 -17
  187. crypticorn/trade/client/models/__init__.py +9 -4
  188. crypticorn/trade/client/models/action_model.py +114 -50
  189. crypticorn/trade/client/models/api_error_identifier.py +60 -51
  190. crypticorn/trade/client/models/api_error_level.py +37 -0
  191. crypticorn/trade/client/models/api_error_type.py +37 -0
  192. crypticorn/trade/client/models/api_key_model.py +49 -28
  193. crypticorn/trade/client/models/bot_model.py +76 -31
  194. crypticorn/trade/client/models/bot_status.py +37 -0
  195. crypticorn/trade/client/models/exchange.py +3 -5
  196. crypticorn/trade/client/models/execution_ids.py +14 -14
  197. crypticorn/trade/client/models/futures_balance.py +39 -23
  198. crypticorn/trade/client/models/futures_trading_action.py +98 -46
  199. crypticorn/trade/client/models/http_validation_error.py +15 -11
  200. crypticorn/trade/client/models/margin_mode.py +3 -5
  201. crypticorn/trade/client/models/market_type.py +3 -5
  202. crypticorn/trade/client/models/notification_model.py +60 -27
  203. crypticorn/trade/client/models/notification_type.py +4 -6
  204. crypticorn/trade/client/models/order_model.py +125 -65
  205. crypticorn/trade/client/models/order_status.py +6 -8
  206. crypticorn/trade/client/models/post_futures_action.py +16 -12
  207. crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
  208. crypticorn/trade/client/models/strategy_model.py +66 -27
  209. crypticorn/trade/client/models/strategy_model_input.py +160 -0
  210. crypticorn/trade/client/models/strategy_model_output.py +160 -0
  211. crypticorn/trade/client/models/tpsl.py +35 -21
  212. crypticorn/trade/client/models/trading_action_type.py +5 -7
  213. crypticorn/trade/client/models/update_notification.py +17 -13
  214. crypticorn/trade/client/models/validation_error.py +20 -14
  215. crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
  216. crypticorn/trade/client/rest.py +108 -170
  217. crypticorn/trade/main.py +26 -19
  218. crypticorn-2.0.0.dist-info/METADATA +74 -0
  219. crypticorn-2.0.0.dist-info/RECORD +226 -0
  220. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
  221. crypticorn/hive/requirements.txt +0 -4
  222. crypticorn/hive/utils.py +0 -109
  223. crypticorn/klines/requirements.txt +0 -4
  224. crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
  225. crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
  226. crypticorn/klines/test/test_base_response_list_str.py +0 -56
  227. crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
  228. crypticorn/klines/test/test_error_response.py +0 -57
  229. crypticorn/klines/test/test_exchange.py +0 -56
  230. crypticorn/klines/test/test_funding_rate_response.py +0 -56
  231. crypticorn/klines/test/test_funding_rates_api.py +0 -38
  232. crypticorn/klines/test/test_health_check_api.py +0 -38
  233. crypticorn/klines/test/test_health_check_response.py +0 -52
  234. crypticorn/klines/test/test_history_error_response.py +0 -53
  235. crypticorn/klines/test/test_history_no_data_response.py +0 -69
  236. crypticorn/klines/test/test_history_success_response.py +0 -87
  237. crypticorn/klines/test/test_http_validation_error.py +0 -58
  238. crypticorn/klines/test/test_market.py +0 -33
  239. crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
  240. crypticorn/klines/test/test_ohlcv_response.py +0 -86
  241. crypticorn/klines/test/test_resolution.py +0 -33
  242. crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
  243. crypticorn/klines/test/test_search_symbol_response.py +0 -62
  244. crypticorn/klines/test/test_sort_direction.py +0 -33
  245. crypticorn/klines/test/test_symbol_group_response.py +0 -53
  246. crypticorn/klines/test/test_symbol_info_response.py +0 -84
  247. crypticorn/klines/test/test_symbol_type.py +0 -54
  248. crypticorn/klines/test/test_symbols_api.py +0 -38
  249. crypticorn/klines/test/test_timeframe.py +0 -33
  250. crypticorn/klines/test/test_udf_api.py +0 -80
  251. crypticorn/klines/test/test_udf_config_response.py +0 -95
  252. crypticorn/klines/test/test_validation_error.py +0 -60
  253. crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
  254. crypticorn/trade/requirements.txt +0 -4
  255. crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
  256. crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
  257. crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
  258. /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
  259. {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,594 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Hive AI API
5
+
6
+ API for Hive AI model training and evaluation
7
+
8
+ The version of the OpenAPI document: 1.0.0
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+ from pydantic import Field, StrictInt, StrictStr
20
+ from typing import Optional
21
+ from typing_extensions import Annotated
22
+ from crypticorn.hive.client.models.data_download_response import DataDownloadResponse
23
+ from crypticorn.hive.client.models.data_info import DataInfo
24
+ from crypticorn.hive.client.models.data_version import DataVersion
25
+ from crypticorn.hive.client.models.feature_size import FeatureSize
26
+
27
+ from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
28
+ from crypticorn.hive.client.api_response import ApiResponse
29
+ from crypticorn.hive.client.rest import RESTResponseType
30
+
31
+
32
+ class DataApi:
33
+ """NOTE: This class is auto generated by OpenAPI Generator
34
+ Ref: https://openapi-generator.tech
35
+
36
+ Do not edit the class manually.
37
+ """
38
+
39
+ def __init__(self, api_client=None) -> None:
40
+ if api_client is None:
41
+ api_client = ApiClient.get_default()
42
+ self.api_client = api_client
43
+
44
+ @validate_call
45
+ async def download_data(
46
+ self,
47
+ model_id: Annotated[StrictInt, Field(description="Model ID")],
48
+ version: Annotated[
49
+ Optional[DataVersion],
50
+ Field(description="Data version. Default is the latest public version."),
51
+ ],
52
+ feature_size: Annotated[
53
+ Optional[FeatureSize], Field(description="Feature size")
54
+ ] = None,
55
+ access_token: Optional[StrictStr] = None,
56
+ _request_timeout: Union[
57
+ None,
58
+ Annotated[StrictFloat, Field(gt=0)],
59
+ Tuple[
60
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
61
+ ],
62
+ ] = None,
63
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
64
+ _content_type: Optional[StrictStr] = None,
65
+ _headers: Optional[Dict[StrictStr, Any]] = None,
66
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
67
+ ) -> DataDownloadResponse:
68
+ """Download Data
69
+
70
+ Get download links for model training data
71
+
72
+ :param model_id: Model ID (required)
73
+ :type model_id: int
74
+ :param version: Data version. Default is the latest public version. (required)
75
+ :type version: DataVersion
76
+ :param feature_size: Feature size
77
+ :type feature_size: FeatureSize
78
+ :param access_token:
79
+ :type access_token: str
80
+ :param _request_timeout: timeout setting for this request. If one
81
+ number provided, it will be total request
82
+ timeout. It can also be a pair (tuple) of
83
+ (connection, read) timeouts.
84
+ :type _request_timeout: int, tuple(int, int), optional
85
+ :param _request_auth: set to override the auth_settings for an a single
86
+ request; this effectively ignores the
87
+ authentication in the spec for a single request.
88
+ :type _request_auth: dict, optional
89
+ :param _content_type: force content-type for the request.
90
+ :type _content_type: str, Optional
91
+ :param _headers: set to override the headers for a single
92
+ request; this effectively ignores the headers
93
+ in the spec for a single request.
94
+ :type _headers: dict, optional
95
+ :param _host_index: set to override the host_index for a single
96
+ request; this effectively ignores the host_index
97
+ in the spec for a single request.
98
+ :type _host_index: int, optional
99
+ :return: Returns the result object.
100
+ """ # noqa: E501
101
+
102
+ _param = self._download_data_serialize(
103
+ model_id=model_id,
104
+ version=version,
105
+ feature_size=feature_size,
106
+ access_token=access_token,
107
+ _request_auth=_request_auth,
108
+ _content_type=_content_type,
109
+ _headers=_headers,
110
+ _host_index=_host_index,
111
+ )
112
+
113
+ _response_types_map: Dict[str, Optional[str]] = {
114
+ "200": "DataDownloadResponse",
115
+ "422": "HTTPValidationError",
116
+ }
117
+ response_data = await self.api_client.call_api(
118
+ *_param, _request_timeout=_request_timeout
119
+ )
120
+ await response_data.read()
121
+ return self.api_client.response_deserialize(
122
+ response_data=response_data,
123
+ response_types_map=_response_types_map,
124
+ ).data
125
+
126
+ @validate_call
127
+ async def download_data_with_http_info(
128
+ self,
129
+ model_id: Annotated[StrictInt, Field(description="Model ID")],
130
+ version: Annotated[
131
+ Optional[DataVersion],
132
+ Field(description="Data version. Default is the latest public version."),
133
+ ],
134
+ feature_size: Annotated[
135
+ Optional[FeatureSize], Field(description="Feature size")
136
+ ] = None,
137
+ access_token: Optional[StrictStr] = None,
138
+ _request_timeout: Union[
139
+ None,
140
+ Annotated[StrictFloat, Field(gt=0)],
141
+ Tuple[
142
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
143
+ ],
144
+ ] = None,
145
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
146
+ _content_type: Optional[StrictStr] = None,
147
+ _headers: Optional[Dict[StrictStr, Any]] = None,
148
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
149
+ ) -> ApiResponse[DataDownloadResponse]:
150
+ """Download Data
151
+
152
+ Get download links for model training data
153
+
154
+ :param model_id: Model ID (required)
155
+ :type model_id: int
156
+ :param version: Data version. Default is the latest public version. (required)
157
+ :type version: DataVersion
158
+ :param feature_size: Feature size
159
+ :type feature_size: FeatureSize
160
+ :param access_token:
161
+ :type access_token: str
162
+ :param _request_timeout: timeout setting for this request. If one
163
+ number provided, it will be total request
164
+ timeout. It can also be a pair (tuple) of
165
+ (connection, read) timeouts.
166
+ :type _request_timeout: int, tuple(int, int), optional
167
+ :param _request_auth: set to override the auth_settings for an a single
168
+ request; this effectively ignores the
169
+ authentication in the spec for a single request.
170
+ :type _request_auth: dict, optional
171
+ :param _content_type: force content-type for the request.
172
+ :type _content_type: str, Optional
173
+ :param _headers: set to override the headers for a single
174
+ request; this effectively ignores the headers
175
+ in the spec for a single request.
176
+ :type _headers: dict, optional
177
+ :param _host_index: set to override the host_index for a single
178
+ request; this effectively ignores the host_index
179
+ in the spec for a single request.
180
+ :type _host_index: int, optional
181
+ :return: Returns the result object.
182
+ """ # noqa: E501
183
+
184
+ _param = self._download_data_serialize(
185
+ model_id=model_id,
186
+ version=version,
187
+ feature_size=feature_size,
188
+ access_token=access_token,
189
+ _request_auth=_request_auth,
190
+ _content_type=_content_type,
191
+ _headers=_headers,
192
+ _host_index=_host_index,
193
+ )
194
+
195
+ _response_types_map: Dict[str, Optional[str]] = {
196
+ "200": "DataDownloadResponse",
197
+ "422": "HTTPValidationError",
198
+ }
199
+ response_data = await self.api_client.call_api(
200
+ *_param, _request_timeout=_request_timeout
201
+ )
202
+ await response_data.read()
203
+ return self.api_client.response_deserialize(
204
+ response_data=response_data,
205
+ response_types_map=_response_types_map,
206
+ )
207
+
208
+ @validate_call
209
+ async def download_data_without_preload_content(
210
+ self,
211
+ model_id: Annotated[StrictInt, Field(description="Model ID")],
212
+ version: Annotated[
213
+ Optional[DataVersion],
214
+ Field(description="Data version. Default is the latest public version."),
215
+ ],
216
+ feature_size: Annotated[
217
+ Optional[FeatureSize], Field(description="Feature size")
218
+ ] = None,
219
+ access_token: Optional[StrictStr] = None,
220
+ _request_timeout: Union[
221
+ None,
222
+ Annotated[StrictFloat, Field(gt=0)],
223
+ Tuple[
224
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
225
+ ],
226
+ ] = None,
227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
228
+ _content_type: Optional[StrictStr] = None,
229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
231
+ ) -> RESTResponseType:
232
+ """Download Data
233
+
234
+ Get download links for model training data
235
+
236
+ :param model_id: Model ID (required)
237
+ :type model_id: int
238
+ :param version: Data version. Default is the latest public version. (required)
239
+ :type version: DataVersion
240
+ :param feature_size: Feature size
241
+ :type feature_size: FeatureSize
242
+ :param access_token:
243
+ :type access_token: str
244
+ :param _request_timeout: timeout setting for this request. If one
245
+ number provided, it will be total request
246
+ timeout. It can also be a pair (tuple) of
247
+ (connection, read) timeouts.
248
+ :type _request_timeout: int, tuple(int, int), optional
249
+ :param _request_auth: set to override the auth_settings for an a single
250
+ request; this effectively ignores the
251
+ authentication in the spec for a single request.
252
+ :type _request_auth: dict, optional
253
+ :param _content_type: force content-type for the request.
254
+ :type _content_type: str, Optional
255
+ :param _headers: set to override the headers for a single
256
+ request; this effectively ignores the headers
257
+ in the spec for a single request.
258
+ :type _headers: dict, optional
259
+ :param _host_index: set to override the host_index for a single
260
+ request; this effectively ignores the host_index
261
+ in the spec for a single request.
262
+ :type _host_index: int, optional
263
+ :return: Returns the result object.
264
+ """ # noqa: E501
265
+
266
+ _param = self._download_data_serialize(
267
+ model_id=model_id,
268
+ version=version,
269
+ feature_size=feature_size,
270
+ access_token=access_token,
271
+ _request_auth=_request_auth,
272
+ _content_type=_content_type,
273
+ _headers=_headers,
274
+ _host_index=_host_index,
275
+ )
276
+
277
+ _response_types_map: Dict[str, Optional[str]] = {
278
+ "200": "DataDownloadResponse",
279
+ "422": "HTTPValidationError",
280
+ }
281
+ response_data = await self.api_client.call_api(
282
+ *_param, _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+ def _download_data_serialize(
287
+ self,
288
+ model_id,
289
+ version,
290
+ feature_size,
291
+ access_token,
292
+ _request_auth,
293
+ _content_type,
294
+ _headers,
295
+ _host_index,
296
+ ) -> RequestSerialized:
297
+
298
+ _host = None
299
+
300
+ _collection_formats: Dict[str, str] = {}
301
+
302
+ _path_params: Dict[str, str] = {}
303
+ _query_params: List[Tuple[str, str]] = []
304
+ _header_params: Dict[str, Optional[str]] = _headers or {}
305
+ _form_params: List[Tuple[str, str]] = []
306
+ _files: Dict[
307
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
308
+ ] = {}
309
+ _body_params: Optional[bytes] = None
310
+
311
+ # process the path parameters
312
+ # process the query parameters
313
+ if model_id is not None:
314
+
315
+ _query_params.append(("model_id", model_id))
316
+
317
+ if version is not None:
318
+
319
+ _query_params.append(("version", version.value))
320
+
321
+ if feature_size is not None:
322
+
323
+ _query_params.append(("feature_size", feature_size.value))
324
+
325
+ # process the header parameters
326
+ # process the form parameters
327
+ # process the body parameter
328
+
329
+ # set the HTTP header `Accept`
330
+ if "Accept" not in _header_params:
331
+ _header_params["Accept"] = self.api_client.select_header_accept(
332
+ ["application/json"]
333
+ )
334
+
335
+ # authentication setting
336
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
337
+
338
+ return self.api_client.param_serialize(
339
+ method="GET",
340
+ resource_path="/data",
341
+ path_params=_path_params,
342
+ query_params=_query_params,
343
+ header_params=_header_params,
344
+ body=_body_params,
345
+ post_params=_form_params,
346
+ files=_files,
347
+ auth_settings=_auth_settings,
348
+ collection_formats=_collection_formats,
349
+ _host=_host,
350
+ _request_auth=_request_auth,
351
+ )
352
+
353
+ @validate_call
354
+ async def get_data_info(
355
+ self,
356
+ access_token: Optional[StrictStr] = None,
357
+ _request_timeout: Union[
358
+ None,
359
+ Annotated[StrictFloat, Field(gt=0)],
360
+ Tuple[
361
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
362
+ ],
363
+ ] = None,
364
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
365
+ _content_type: Optional[StrictStr] = None,
366
+ _headers: Optional[Dict[StrictStr, Any]] = None,
367
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
368
+ ) -> DataInfo:
369
+ """Get Data Info
370
+
371
+ Get information about available data and options for the latest data version
372
+
373
+ :param access_token:
374
+ :type access_token: str
375
+ :param _request_timeout: timeout setting for this request. If one
376
+ number provided, it will be total request
377
+ timeout. It can also be a pair (tuple) of
378
+ (connection, read) timeouts.
379
+ :type _request_timeout: int, tuple(int, int), optional
380
+ :param _request_auth: set to override the auth_settings for an a single
381
+ request; this effectively ignores the
382
+ authentication in the spec for a single request.
383
+ :type _request_auth: dict, optional
384
+ :param _content_type: force content-type for the request.
385
+ :type _content_type: str, Optional
386
+ :param _headers: set to override the headers for a single
387
+ request; this effectively ignores the headers
388
+ in the spec for a single request.
389
+ :type _headers: dict, optional
390
+ :param _host_index: set to override the host_index for a single
391
+ request; this effectively ignores the host_index
392
+ in the spec for a single request.
393
+ :type _host_index: int, optional
394
+ :return: Returns the result object.
395
+ """ # noqa: E501
396
+
397
+ _param = self._get_data_info_serialize(
398
+ access_token=access_token,
399
+ _request_auth=_request_auth,
400
+ _content_type=_content_type,
401
+ _headers=_headers,
402
+ _host_index=_host_index,
403
+ )
404
+
405
+ _response_types_map: Dict[str, Optional[str]] = {
406
+ "200": "DataInfo",
407
+ "422": "HTTPValidationError",
408
+ }
409
+ response_data = await self.api_client.call_api(
410
+ *_param, _request_timeout=_request_timeout
411
+ )
412
+ await response_data.read()
413
+ return self.api_client.response_deserialize(
414
+ response_data=response_data,
415
+ response_types_map=_response_types_map,
416
+ ).data
417
+
418
+ @validate_call
419
+ async def get_data_info_with_http_info(
420
+ self,
421
+ access_token: Optional[StrictStr] = None,
422
+ _request_timeout: Union[
423
+ None,
424
+ Annotated[StrictFloat, Field(gt=0)],
425
+ Tuple[
426
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
427
+ ],
428
+ ] = None,
429
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
430
+ _content_type: Optional[StrictStr] = None,
431
+ _headers: Optional[Dict[StrictStr, Any]] = None,
432
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
433
+ ) -> ApiResponse[DataInfo]:
434
+ """Get Data Info
435
+
436
+ Get information about available data and options for the latest data version
437
+
438
+ :param access_token:
439
+ :type access_token: str
440
+ :param _request_timeout: timeout setting for this request. If one
441
+ number provided, it will be total request
442
+ timeout. It can also be a pair (tuple) of
443
+ (connection, read) timeouts.
444
+ :type _request_timeout: int, tuple(int, int), optional
445
+ :param _request_auth: set to override the auth_settings for an a single
446
+ request; this effectively ignores the
447
+ authentication in the spec for a single request.
448
+ :type _request_auth: dict, optional
449
+ :param _content_type: force content-type for the request.
450
+ :type _content_type: str, Optional
451
+ :param _headers: set to override the headers for a single
452
+ request; this effectively ignores the headers
453
+ in the spec for a single request.
454
+ :type _headers: dict, optional
455
+ :param _host_index: set to override the host_index for a single
456
+ request; this effectively ignores the host_index
457
+ in the spec for a single request.
458
+ :type _host_index: int, optional
459
+ :return: Returns the result object.
460
+ """ # noqa: E501
461
+
462
+ _param = self._get_data_info_serialize(
463
+ access_token=access_token,
464
+ _request_auth=_request_auth,
465
+ _content_type=_content_type,
466
+ _headers=_headers,
467
+ _host_index=_host_index,
468
+ )
469
+
470
+ _response_types_map: Dict[str, Optional[str]] = {
471
+ "200": "DataInfo",
472
+ "422": "HTTPValidationError",
473
+ }
474
+ response_data = await self.api_client.call_api(
475
+ *_param, _request_timeout=_request_timeout
476
+ )
477
+ await response_data.read()
478
+ return self.api_client.response_deserialize(
479
+ response_data=response_data,
480
+ response_types_map=_response_types_map,
481
+ )
482
+
483
+ @validate_call
484
+ async def get_data_info_without_preload_content(
485
+ self,
486
+ access_token: Optional[StrictStr] = None,
487
+ _request_timeout: Union[
488
+ None,
489
+ Annotated[StrictFloat, Field(gt=0)],
490
+ Tuple[
491
+ Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
492
+ ],
493
+ ] = None,
494
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
495
+ _content_type: Optional[StrictStr] = None,
496
+ _headers: Optional[Dict[StrictStr, Any]] = None,
497
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
498
+ ) -> RESTResponseType:
499
+ """Get Data Info
500
+
501
+ Get information about available data and options for the latest data version
502
+
503
+ :param access_token:
504
+ :type access_token: str
505
+ :param _request_timeout: timeout setting for this request. If one
506
+ number provided, it will be total request
507
+ timeout. It can also be a pair (tuple) of
508
+ (connection, read) timeouts.
509
+ :type _request_timeout: int, tuple(int, int), optional
510
+ :param _request_auth: set to override the auth_settings for an a single
511
+ request; this effectively ignores the
512
+ authentication in the spec for a single request.
513
+ :type _request_auth: dict, optional
514
+ :param _content_type: force content-type for the request.
515
+ :type _content_type: str, Optional
516
+ :param _headers: set to override the headers for a single
517
+ request; this effectively ignores the headers
518
+ in the spec for a single request.
519
+ :type _headers: dict, optional
520
+ :param _host_index: set to override the host_index for a single
521
+ request; this effectively ignores the host_index
522
+ in the spec for a single request.
523
+ :type _host_index: int, optional
524
+ :return: Returns the result object.
525
+ """ # noqa: E501
526
+
527
+ _param = self._get_data_info_serialize(
528
+ access_token=access_token,
529
+ _request_auth=_request_auth,
530
+ _content_type=_content_type,
531
+ _headers=_headers,
532
+ _host_index=_host_index,
533
+ )
534
+
535
+ _response_types_map: Dict[str, Optional[str]] = {
536
+ "200": "DataInfo",
537
+ "422": "HTTPValidationError",
538
+ }
539
+ response_data = await self.api_client.call_api(
540
+ *_param, _request_timeout=_request_timeout
541
+ )
542
+ return response_data.response
543
+
544
+ def _get_data_info_serialize(
545
+ self,
546
+ access_token,
547
+ _request_auth,
548
+ _content_type,
549
+ _headers,
550
+ _host_index,
551
+ ) -> RequestSerialized:
552
+
553
+ _host = None
554
+
555
+ _collection_formats: Dict[str, str] = {}
556
+
557
+ _path_params: Dict[str, str] = {}
558
+ _query_params: List[Tuple[str, str]] = []
559
+ _header_params: Dict[str, Optional[str]] = _headers or {}
560
+ _form_params: List[Tuple[str, str]] = []
561
+ _files: Dict[
562
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
563
+ ] = {}
564
+ _body_params: Optional[bytes] = None
565
+
566
+ # process the path parameters
567
+ # process the query parameters
568
+ # process the header parameters
569
+ # process the form parameters
570
+ # process the body parameter
571
+
572
+ # set the HTTP header `Accept`
573
+ if "Accept" not in _header_params:
574
+ _header_params["Accept"] = self.api_client.select_header_accept(
575
+ ["application/json"]
576
+ )
577
+
578
+ # authentication setting
579
+ _auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
580
+
581
+ return self.api_client.param_serialize(
582
+ method="GET",
583
+ resource_path="/data/info",
584
+ path_params=_path_params,
585
+ query_params=_query_params,
586
+ header_params=_header_params,
587
+ body=_body_params,
588
+ post_params=_form_params,
589
+ files=_files,
590
+ auth_settings=_auth_settings,
591
+ collection_formats=_collection_formats,
592
+ _host=_host,
593
+ _request_auth=_request_auth,
594
+ )