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.
- crypticorn/__init__.py +3 -3
- crypticorn/auth/__init__.py +2 -0
- crypticorn/auth/client/__init__.py +112 -0
- crypticorn/auth/client/api/__init__.py +8 -0
- crypticorn/auth/client/api/admin_api.py +522 -0
- crypticorn/auth/client/api/auth_api.py +2089 -0
- crypticorn/auth/client/api/service_api.py +309 -0
- crypticorn/auth/client/api/user_api.py +2540 -0
- crypticorn/auth/client/api/wallet_api.py +1698 -0
- crypticorn/auth/client/api_client.py +758 -0
- crypticorn/auth/client/api_response.py +20 -0
- crypticorn/auth/client/configuration.py +584 -0
- crypticorn/auth/client/exceptions.py +220 -0
- crypticorn/auth/client/models/__init__.py +91 -0
- crypticorn/auth/client/models/add_wallet200_response.py +86 -0
- crypticorn/auth/client/models/add_wallet_request.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response.py +107 -0
- crypticorn/auth/client/models/authorize_user200_response_auth.py +101 -0
- crypticorn/auth/client/models/authorize_user_request.py +96 -0
- crypticorn/auth/client/models/create_user_request.py +114 -0
- crypticorn/auth/client/models/list_wallets200_response.py +137 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_sale_round.py +115 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet.py +168 -0
- crypticorn/auth/client/models/list_wallets200_response_balances_inner_wallet_vesting_wallets_inner.py +191 -0
- crypticorn/auth/client/models/list_wallets200_response_data_inner.py +102 -0
- crypticorn/auth/client/models/list_wallets200_response_user_value.py +118 -0
- crypticorn/auth/client/models/logout_default_response.py +108 -0
- crypticorn/auth/client/models/logout_default_response_issues_inner.py +83 -0
- crypticorn/auth/client/models/refresh_token_info200_response.py +97 -0
- crypticorn/auth/client/models/refresh_token_info200_response_user_session.py +105 -0
- crypticorn/auth/client/models/resend_verification_email_request.py +84 -0
- crypticorn/auth/client/models/revoke_user_tokens_request.py +83 -0
- crypticorn/auth/client/models/rotate_tokens200_response.py +110 -0
- crypticorn/auth/client/models/token_info200_response.py +97 -0
- crypticorn/auth/client/models/unlink_wallet_request.py +83 -0
- crypticorn/auth/client/models/update_user_request.py +93 -0
- crypticorn/auth/client/models/user_reset_password_request.py +87 -0
- crypticorn/auth/client/models/user_set_password_request.py +89 -0
- crypticorn/auth/client/models/verify200_response.py +110 -0
- crypticorn/auth/client/models/verify_email200_response.py +107 -0
- crypticorn/auth/client/models/verify_email200_response_auth.py +101 -0
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +110 -0
- crypticorn/auth/client/models/verify_email_request.py +83 -0
- crypticorn/auth/client/models/verify_wallet_request.py +91 -0
- crypticorn/auth/client/models/wallet_verified200_response.py +83 -0
- crypticorn/auth/client/models/whoami200_response.py +104 -0
- crypticorn/auth/client/rest.py +195 -0
- crypticorn/auth/main.py +45 -0
- crypticorn/client.py +46 -8
- crypticorn/common/__init__.py +5 -0
- crypticorn/common/auth.py +43 -0
- crypticorn/common/auth_client.py +163 -0
- crypticorn/common/errors.py +432 -0
- crypticorn/common/scopes.py +29 -0
- crypticorn/common/urls.py +25 -0
- crypticorn/hive/__init__.py +2 -1
- crypticorn/hive/client/__init__.py +57 -0
- crypticorn/hive/client/api/__init__.py +6 -0
- crypticorn/hive/client/api/data_api.py +594 -0
- crypticorn/hive/client/api/models_api.py +1680 -0
- crypticorn/hive/client/api/status_api.py +263 -0
- crypticorn/hive/client/api_client.py +758 -0
- crypticorn/hive/client/api_response.py +20 -0
- crypticorn/hive/client/configuration.py +612 -0
- crypticorn/hive/client/exceptions.py +220 -0
- crypticorn/hive/client/models/__init__.py +38 -0
- crypticorn/hive/client/models/coins.py +44 -0
- crypticorn/hive/client/models/data_download_response.py +113 -0
- crypticorn/hive/client/models/data_info.py +115 -0
- crypticorn/hive/client/models/data_value_value_value_inner.py +154 -0
- crypticorn/hive/client/models/data_version.py +35 -0
- crypticorn/hive/client/models/download_links.py +91 -0
- crypticorn/hive/client/models/evaluation.py +86 -0
- crypticorn/hive/client/models/evaluation_response.py +85 -0
- crypticorn/hive/client/models/feature_size.py +36 -0
- crypticorn/hive/client/models/http_validation_error.py +99 -0
- crypticorn/hive/client/models/model.py +133 -0
- crypticorn/hive/client/models/model_create.py +93 -0
- crypticorn/hive/client/models/model_status.py +35 -0
- crypticorn/hive/client/models/model_update.py +83 -0
- crypticorn/hive/client/models/target.py +36 -0
- crypticorn/hive/client/models/target_type.py +35 -0
- crypticorn/hive/client/models/validation_error.py +105 -0
- crypticorn/hive/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/hive/client/py.typed +0 -0
- crypticorn/hive/client/rest.py +195 -0
- crypticorn/hive/main.py +27 -100
- crypticorn/klines/client/__init__.py +21 -7
- crypticorn/klines/client/api/__init__.py +0 -1
- crypticorn/klines/client/api/funding_rates_api.py +90 -79
- crypticorn/klines/client/api/health_check_api.py +29 -45
- crypticorn/klines/client/api/ohlcv_data_api.py +104 -87
- crypticorn/klines/client/api/symbols_api.py +36 -54
- crypticorn/klines/client/api/udf_api.py +228 -352
- crypticorn/klines/client/api_client.py +106 -148
- crypticorn/klines/client/api_response.py +2 -3
- crypticorn/klines/client/configuration.py +64 -50
- crypticorn/klines/client/exceptions.py +20 -16
- crypticorn/klines/client/models/__init__.py +21 -7
- crypticorn/klines/client/models/base_response_health_check_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_funding_rate_response.py +21 -15
- crypticorn/klines/client/models/base_response_list_str.py +16 -14
- crypticorn/klines/client/models/base_response_ohlcv_response.py +21 -15
- crypticorn/klines/client/models/error_response.py +23 -15
- crypticorn/klines/client/models/exchange.py +11 -11
- crypticorn/klines/client/models/funding_rate_response.py +11 -11
- crypticorn/klines/client/models/health_check_response.py +14 -12
- crypticorn/klines/client/models/history_error_response.py +11 -11
- crypticorn/klines/client/models/history_no_data_response.py +16 -16
- crypticorn/klines/client/models/history_success_response.py +16 -16
- crypticorn/klines/client/models/http_validation_error.py +14 -10
- crypticorn/klines/client/models/market.py +2 -4
- crypticorn/klines/client/models/ohlcv_response.py +22 -15
- crypticorn/klines/client/models/resolution.py +5 -7
- crypticorn/klines/client/models/response_get_history_udf_history_get.py +71 -22
- crypticorn/klines/client/models/search_symbol_response.py +22 -15
- crypticorn/klines/client/models/sort_direction.py +2 -4
- crypticorn/klines/client/models/symbol_group_response.py +5 -9
- crypticorn/klines/client/models/symbol_info_response.py +40 -24
- crypticorn/klines/client/models/symbol_type.py +5 -10
- crypticorn/klines/client/models/timeframe.py +5 -7
- crypticorn/klines/client/models/udf_config_response.py +60 -21
- crypticorn/klines/client/models/validation_error.py +19 -13
- crypticorn/klines/client/models/validation_error_loc_inner.py +32 -11
- crypticorn/klines/client/rest.py +30 -41
- crypticorn/klines/main.py +52 -15
- crypticorn/pay/__init__.py +2 -0
- crypticorn/pay/client/__init__.py +52 -0
- crypticorn/pay/client/api/__init__.py +7 -0
- crypticorn/pay/client/api/now_payments_api.py +813 -0
- crypticorn/pay/client/api/payments_api.py +799 -0
- crypticorn/pay/client/api/products_api.py +891 -0
- crypticorn/pay/client/api/status_api.py +260 -0
- crypticorn/pay/client/api_client.py +758 -0
- crypticorn/pay/client/api_response.py +20 -0
- crypticorn/pay/client/configuration.py +612 -0
- crypticorn/pay/client/exceptions.py +220 -0
- crypticorn/pay/client/models/__init__.py +32 -0
- crypticorn/pay/client/models/api_status_res.py +83 -0
- crypticorn/pay/client/models/combined_payment_history.py +101 -0
- crypticorn/pay/client/models/create_invoice_req.py +188 -0
- crypticorn/pay/client/models/create_invoice_res.py +188 -0
- crypticorn/pay/client/models/currency.py +165 -0
- crypticorn/pay/client/models/estimate_price_req.py +91 -0
- crypticorn/pay/client/models/estimate_price_res.py +102 -0
- crypticorn/pay/client/models/get_currencies_res.py +99 -0
- crypticorn/pay/client/models/get_payment_status_res.py +222 -0
- crypticorn/pay/client/models/get_payments_list_res.py +109 -0
- crypticorn/pay/client/models/http_validation_error.py +99 -0
- crypticorn/pay/client/models/min_amount_req.py +124 -0
- crypticorn/pay/client/models/min_amount_res.py +105 -0
- crypticorn/pay/client/models/now_api_status_res.py +83 -0
- crypticorn/pay/client/models/now_create_invoice_req.py +188 -0
- crypticorn/pay/client/models/now_create_invoice_res.py +188 -0
- crypticorn/pay/client/models/now_fee_structure.py +104 -0
- crypticorn/pay/client/models/now_payment_model.py +124 -0
- crypticorn/pay/client/models/now_payment_status.py +42 -0
- crypticorn/pay/client/models/now_webhook_payload.py +181 -0
- crypticorn/pay/client/models/payment.py +231 -0
- crypticorn/pay/client/models/payment_status.py +40 -0
- crypticorn/pay/client/models/product.py +87 -0
- crypticorn/pay/client/models/product_model.py +119 -0
- crypticorn/pay/client/models/product_subs_model.py +108 -0
- crypticorn/pay/client/models/services.py +34 -0
- crypticorn/pay/client/models/unified_payment_model.py +112 -0
- crypticorn/pay/client/models/validation_error.py +105 -0
- crypticorn/pay/client/models/validation_error_loc_inner.py +159 -0
- crypticorn/pay/client/py.typed +0 -0
- crypticorn/pay/client/rest.py +195 -0
- crypticorn/pay/main.py +35 -0
- crypticorn/trade/client/__init__.py +9 -4
- crypticorn/trade/client/api/__init__.py +0 -1
- crypticorn/trade/client/api/api_keys_api.py +203 -304
- crypticorn/trade/client/api/bots_api.py +177 -250
- crypticorn/trade/client/api/exchanges_api.py +38 -57
- crypticorn/trade/client/api/futures_trading_panel_api.py +223 -321
- crypticorn/trade/client/api/notifications_api.py +247 -364
- crypticorn/trade/client/api/orders_api.py +44 -63
- crypticorn/trade/client/api/status_api.py +35 -53
- crypticorn/trade/client/api/strategies_api.py +852 -64
- crypticorn/trade/client/api/trading_actions_api.py +126 -203
- crypticorn/trade/client/api_client.py +115 -154
- crypticorn/trade/client/api_response.py +2 -3
- crypticorn/trade/client/configuration.py +128 -90
- crypticorn/trade/client/exceptions.py +21 -17
- crypticorn/trade/client/models/__init__.py +9 -4
- crypticorn/trade/client/models/action_model.py +114 -50
- crypticorn/trade/client/models/api_error_identifier.py +60 -51
- crypticorn/trade/client/models/api_error_level.py +37 -0
- crypticorn/trade/client/models/api_error_type.py +37 -0
- crypticorn/trade/client/models/api_key_model.py +49 -28
- crypticorn/trade/client/models/bot_model.py +76 -31
- crypticorn/trade/client/models/bot_status.py +37 -0
- crypticorn/trade/client/models/exchange.py +3 -5
- crypticorn/trade/client/models/execution_ids.py +14 -14
- crypticorn/trade/client/models/futures_balance.py +39 -23
- crypticorn/trade/client/models/futures_trading_action.py +98 -46
- crypticorn/trade/client/models/http_validation_error.py +15 -11
- crypticorn/trade/client/models/margin_mode.py +3 -5
- crypticorn/trade/client/models/market_type.py +3 -5
- crypticorn/trade/client/models/notification_model.py +60 -27
- crypticorn/trade/client/models/notification_type.py +4 -6
- crypticorn/trade/client/models/order_model.py +125 -65
- crypticorn/trade/client/models/order_status.py +6 -8
- crypticorn/trade/client/models/post_futures_action.py +16 -12
- crypticorn/trade/client/models/strategy_exchange_info.py +11 -12
- crypticorn/trade/client/models/strategy_model.py +66 -27
- crypticorn/trade/client/models/strategy_model_input.py +160 -0
- crypticorn/trade/client/models/strategy_model_output.py +160 -0
- crypticorn/trade/client/models/tpsl.py +35 -21
- crypticorn/trade/client/models/trading_action_type.py +5 -7
- crypticorn/trade/client/models/update_notification.py +17 -13
- crypticorn/trade/client/models/validation_error.py +20 -14
- crypticorn/trade/client/models/validation_error_loc_inner.py +33 -12
- crypticorn/trade/client/rest.py +108 -170
- crypticorn/trade/main.py +26 -19
- crypticorn-2.0.0.dist-info/METADATA +74 -0
- crypticorn-2.0.0.dist-info/RECORD +226 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/WHEEL +1 -1
- crypticorn/hive/requirements.txt +0 -4
- crypticorn/hive/utils.py +0 -109
- crypticorn/klines/requirements.txt +0 -4
- crypticorn/klines/test/test_base_response_health_check_response.py +0 -56
- crypticorn/klines/test/test_base_response_list_funding_rate_response.py +0 -59
- crypticorn/klines/test/test_base_response_list_str.py +0 -56
- crypticorn/klines/test/test_base_response_ohlcv_response.py +0 -72
- crypticorn/klines/test/test_error_response.py +0 -57
- crypticorn/klines/test/test_exchange.py +0 -56
- crypticorn/klines/test/test_funding_rate_response.py +0 -56
- crypticorn/klines/test/test_funding_rates_api.py +0 -38
- crypticorn/klines/test/test_health_check_api.py +0 -38
- crypticorn/klines/test/test_health_check_response.py +0 -52
- crypticorn/klines/test/test_history_error_response.py +0 -53
- crypticorn/klines/test/test_history_no_data_response.py +0 -69
- crypticorn/klines/test/test_history_success_response.py +0 -87
- crypticorn/klines/test/test_http_validation_error.py +0 -58
- crypticorn/klines/test/test_market.py +0 -33
- crypticorn/klines/test/test_ohlcv_data_api.py +0 -38
- crypticorn/klines/test/test_ohlcv_response.py +0 -86
- crypticorn/klines/test/test_resolution.py +0 -33
- crypticorn/klines/test/test_response_get_history_udf_history_get.py +0 -89
- crypticorn/klines/test/test_search_symbol_response.py +0 -62
- crypticorn/klines/test/test_sort_direction.py +0 -33
- crypticorn/klines/test/test_symbol_group_response.py +0 -53
- crypticorn/klines/test/test_symbol_info_response.py +0 -84
- crypticorn/klines/test/test_symbol_type.py +0 -54
- crypticorn/klines/test/test_symbols_api.py +0 -38
- crypticorn/klines/test/test_timeframe.py +0 -33
- crypticorn/klines/test/test_udf_api.py +0 -80
- crypticorn/klines/test/test_udf_config_response.py +0 -95
- crypticorn/klines/test/test_validation_error.py +0 -60
- crypticorn/klines/test/test_validation_error_loc_inner.py +0 -50
- crypticorn/trade/requirements.txt +0 -4
- crypticorn-1.0.2rc3.dist-info/LICENSE.md +0 -19
- crypticorn-1.0.2rc3.dist-info/METADATA +0 -47
- crypticorn-1.0.2rc3.dist-info/RECORD +0 -128
- /crypticorn/{klines/test/__init__.py → auth/client/py.typed} +0 -0
- {crypticorn-1.0.2rc3.dist-info → crypticorn-2.0.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,1680 @@
|
|
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 Any, List, Optional
|
21
|
+
from typing_extensions import Annotated
|
22
|
+
from crypticorn.hive.client.models.data_version import DataVersion
|
23
|
+
from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
24
|
+
from crypticorn.hive.client.models.model import Model
|
25
|
+
from crypticorn.hive.client.models.model_create import ModelCreate
|
26
|
+
from crypticorn.hive.client.models.model_update import ModelUpdate
|
27
|
+
|
28
|
+
from crypticorn.hive.client.api_client import ApiClient, RequestSerialized
|
29
|
+
from crypticorn.hive.client.api_response import ApiResponse
|
30
|
+
from crypticorn.hive.client.rest import RESTResponseType
|
31
|
+
|
32
|
+
|
33
|
+
class ModelsApi:
|
34
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
35
|
+
Ref: https://openapi-generator.tech
|
36
|
+
|
37
|
+
Do not edit the class manually.
|
38
|
+
"""
|
39
|
+
|
40
|
+
def __init__(self, api_client=None) -> None:
|
41
|
+
if api_client is None:
|
42
|
+
api_client = ApiClient.get_default()
|
43
|
+
self.api_client = api_client
|
44
|
+
|
45
|
+
@validate_call
|
46
|
+
async def create_model(
|
47
|
+
self,
|
48
|
+
model_create: ModelCreate,
|
49
|
+
access_token: Optional[StrictStr] = None,
|
50
|
+
_request_timeout: Union[
|
51
|
+
None,
|
52
|
+
Annotated[StrictFloat, Field(gt=0)],
|
53
|
+
Tuple[
|
54
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
55
|
+
],
|
56
|
+
] = None,
|
57
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
58
|
+
_content_type: Optional[StrictStr] = None,
|
59
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
60
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
61
|
+
) -> Model:
|
62
|
+
"""Create Model
|
63
|
+
|
64
|
+
Create a new model
|
65
|
+
|
66
|
+
:param model_create: (required)
|
67
|
+
:type model_create: ModelCreate
|
68
|
+
:param access_token:
|
69
|
+
:type access_token: str
|
70
|
+
:param _request_timeout: timeout setting for this request. If one
|
71
|
+
number provided, it will be total request
|
72
|
+
timeout. It can also be a pair (tuple) of
|
73
|
+
(connection, read) timeouts.
|
74
|
+
:type _request_timeout: int, tuple(int, int), optional
|
75
|
+
:param _request_auth: set to override the auth_settings for an a single
|
76
|
+
request; this effectively ignores the
|
77
|
+
authentication in the spec for a single request.
|
78
|
+
:type _request_auth: dict, optional
|
79
|
+
:param _content_type: force content-type for the request.
|
80
|
+
:type _content_type: str, Optional
|
81
|
+
:param _headers: set to override the headers for a single
|
82
|
+
request; this effectively ignores the headers
|
83
|
+
in the spec for a single request.
|
84
|
+
:type _headers: dict, optional
|
85
|
+
:param _host_index: set to override the host_index for a single
|
86
|
+
request; this effectively ignores the host_index
|
87
|
+
in the spec for a single request.
|
88
|
+
:type _host_index: int, optional
|
89
|
+
:return: Returns the result object.
|
90
|
+
""" # noqa: E501
|
91
|
+
|
92
|
+
_param = self._create_model_serialize(
|
93
|
+
model_create=model_create,
|
94
|
+
access_token=access_token,
|
95
|
+
_request_auth=_request_auth,
|
96
|
+
_content_type=_content_type,
|
97
|
+
_headers=_headers,
|
98
|
+
_host_index=_host_index,
|
99
|
+
)
|
100
|
+
|
101
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
102
|
+
"200": "Model",
|
103
|
+
"422": "HTTPValidationError",
|
104
|
+
}
|
105
|
+
response_data = await self.api_client.call_api(
|
106
|
+
*_param, _request_timeout=_request_timeout
|
107
|
+
)
|
108
|
+
await response_data.read()
|
109
|
+
return self.api_client.response_deserialize(
|
110
|
+
response_data=response_data,
|
111
|
+
response_types_map=_response_types_map,
|
112
|
+
).data
|
113
|
+
|
114
|
+
@validate_call
|
115
|
+
async def create_model_with_http_info(
|
116
|
+
self,
|
117
|
+
model_create: ModelCreate,
|
118
|
+
access_token: Optional[StrictStr] = None,
|
119
|
+
_request_timeout: Union[
|
120
|
+
None,
|
121
|
+
Annotated[StrictFloat, Field(gt=0)],
|
122
|
+
Tuple[
|
123
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
124
|
+
],
|
125
|
+
] = None,
|
126
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
127
|
+
_content_type: Optional[StrictStr] = None,
|
128
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
129
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
130
|
+
) -> ApiResponse[Model]:
|
131
|
+
"""Create Model
|
132
|
+
|
133
|
+
Create a new model
|
134
|
+
|
135
|
+
:param model_create: (required)
|
136
|
+
:type model_create: ModelCreate
|
137
|
+
:param access_token:
|
138
|
+
:type access_token: str
|
139
|
+
:param _request_timeout: timeout setting for this request. If one
|
140
|
+
number provided, it will be total request
|
141
|
+
timeout. It can also be a pair (tuple) of
|
142
|
+
(connection, read) timeouts.
|
143
|
+
:type _request_timeout: int, tuple(int, int), optional
|
144
|
+
:param _request_auth: set to override the auth_settings for an a single
|
145
|
+
request; this effectively ignores the
|
146
|
+
authentication in the spec for a single request.
|
147
|
+
:type _request_auth: dict, optional
|
148
|
+
:param _content_type: force content-type for the request.
|
149
|
+
:type _content_type: str, Optional
|
150
|
+
:param _headers: set to override the headers for a single
|
151
|
+
request; this effectively ignores the headers
|
152
|
+
in the spec for a single request.
|
153
|
+
:type _headers: dict, optional
|
154
|
+
:param _host_index: set to override the host_index for a single
|
155
|
+
request; this effectively ignores the host_index
|
156
|
+
in the spec for a single request.
|
157
|
+
:type _host_index: int, optional
|
158
|
+
:return: Returns the result object.
|
159
|
+
""" # noqa: E501
|
160
|
+
|
161
|
+
_param = self._create_model_serialize(
|
162
|
+
model_create=model_create,
|
163
|
+
access_token=access_token,
|
164
|
+
_request_auth=_request_auth,
|
165
|
+
_content_type=_content_type,
|
166
|
+
_headers=_headers,
|
167
|
+
_host_index=_host_index,
|
168
|
+
)
|
169
|
+
|
170
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
171
|
+
"200": "Model",
|
172
|
+
"422": "HTTPValidationError",
|
173
|
+
}
|
174
|
+
response_data = await self.api_client.call_api(
|
175
|
+
*_param, _request_timeout=_request_timeout
|
176
|
+
)
|
177
|
+
await response_data.read()
|
178
|
+
return self.api_client.response_deserialize(
|
179
|
+
response_data=response_data,
|
180
|
+
response_types_map=_response_types_map,
|
181
|
+
)
|
182
|
+
|
183
|
+
@validate_call
|
184
|
+
async def create_model_without_preload_content(
|
185
|
+
self,
|
186
|
+
model_create: ModelCreate,
|
187
|
+
access_token: Optional[StrictStr] = None,
|
188
|
+
_request_timeout: Union[
|
189
|
+
None,
|
190
|
+
Annotated[StrictFloat, Field(gt=0)],
|
191
|
+
Tuple[
|
192
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
193
|
+
],
|
194
|
+
] = None,
|
195
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
196
|
+
_content_type: Optional[StrictStr] = None,
|
197
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
198
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
199
|
+
) -> RESTResponseType:
|
200
|
+
"""Create Model
|
201
|
+
|
202
|
+
Create a new model
|
203
|
+
|
204
|
+
:param model_create: (required)
|
205
|
+
:type model_create: ModelCreate
|
206
|
+
:param access_token:
|
207
|
+
:type access_token: str
|
208
|
+
:param _request_timeout: timeout setting for this request. If one
|
209
|
+
number provided, it will be total request
|
210
|
+
timeout. It can also be a pair (tuple) of
|
211
|
+
(connection, read) timeouts.
|
212
|
+
:type _request_timeout: int, tuple(int, int), optional
|
213
|
+
:param _request_auth: set to override the auth_settings for an a single
|
214
|
+
request; this effectively ignores the
|
215
|
+
authentication in the spec for a single request.
|
216
|
+
:type _request_auth: dict, optional
|
217
|
+
:param _content_type: force content-type for the request.
|
218
|
+
:type _content_type: str, Optional
|
219
|
+
:param _headers: set to override the headers for a single
|
220
|
+
request; this effectively ignores the headers
|
221
|
+
in the spec for a single request.
|
222
|
+
:type _headers: dict, optional
|
223
|
+
:param _host_index: set to override the host_index for a single
|
224
|
+
request; this effectively ignores the host_index
|
225
|
+
in the spec for a single request.
|
226
|
+
:type _host_index: int, optional
|
227
|
+
:return: Returns the result object.
|
228
|
+
""" # noqa: E501
|
229
|
+
|
230
|
+
_param = self._create_model_serialize(
|
231
|
+
model_create=model_create,
|
232
|
+
access_token=access_token,
|
233
|
+
_request_auth=_request_auth,
|
234
|
+
_content_type=_content_type,
|
235
|
+
_headers=_headers,
|
236
|
+
_host_index=_host_index,
|
237
|
+
)
|
238
|
+
|
239
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
240
|
+
"200": "Model",
|
241
|
+
"422": "HTTPValidationError",
|
242
|
+
}
|
243
|
+
response_data = await self.api_client.call_api(
|
244
|
+
*_param, _request_timeout=_request_timeout
|
245
|
+
)
|
246
|
+
return response_data.response
|
247
|
+
|
248
|
+
def _create_model_serialize(
|
249
|
+
self,
|
250
|
+
model_create,
|
251
|
+
access_token,
|
252
|
+
_request_auth,
|
253
|
+
_content_type,
|
254
|
+
_headers,
|
255
|
+
_host_index,
|
256
|
+
) -> RequestSerialized:
|
257
|
+
|
258
|
+
_host = None
|
259
|
+
|
260
|
+
_collection_formats: Dict[str, str] = {}
|
261
|
+
|
262
|
+
_path_params: Dict[str, str] = {}
|
263
|
+
_query_params: List[Tuple[str, str]] = []
|
264
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
265
|
+
_form_params: List[Tuple[str, str]] = []
|
266
|
+
_files: Dict[
|
267
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
268
|
+
] = {}
|
269
|
+
_body_params: Optional[bytes] = None
|
270
|
+
|
271
|
+
# process the path parameters
|
272
|
+
# process the query parameters
|
273
|
+
# process the header parameters
|
274
|
+
# process the form parameters
|
275
|
+
# process the body parameter
|
276
|
+
if model_create is not None:
|
277
|
+
_body_params = model_create
|
278
|
+
|
279
|
+
# set the HTTP header `Accept`
|
280
|
+
if "Accept" not in _header_params:
|
281
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
282
|
+
["application/json"]
|
283
|
+
)
|
284
|
+
|
285
|
+
# set the HTTP header `Content-Type`
|
286
|
+
if _content_type:
|
287
|
+
_header_params["Content-Type"] = _content_type
|
288
|
+
else:
|
289
|
+
_default_content_type = self.api_client.select_header_content_type(
|
290
|
+
["application/json"]
|
291
|
+
)
|
292
|
+
if _default_content_type is not None:
|
293
|
+
_header_params["Content-Type"] = _default_content_type
|
294
|
+
|
295
|
+
# authentication setting
|
296
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
297
|
+
|
298
|
+
return self.api_client.param_serialize(
|
299
|
+
method="POST",
|
300
|
+
resource_path="/model/creation",
|
301
|
+
path_params=_path_params,
|
302
|
+
query_params=_query_params,
|
303
|
+
header_params=_header_params,
|
304
|
+
body=_body_params,
|
305
|
+
post_params=_form_params,
|
306
|
+
files=_files,
|
307
|
+
auth_settings=_auth_settings,
|
308
|
+
collection_formats=_collection_formats,
|
309
|
+
_host=_host,
|
310
|
+
_request_auth=_request_auth,
|
311
|
+
)
|
312
|
+
|
313
|
+
@validate_call
|
314
|
+
async def delete_model(
|
315
|
+
self,
|
316
|
+
id: Annotated[StrictInt, Field(description="Model ID to delete")],
|
317
|
+
access_token: Optional[StrictStr] = None,
|
318
|
+
_request_timeout: Union[
|
319
|
+
None,
|
320
|
+
Annotated[StrictFloat, Field(gt=0)],
|
321
|
+
Tuple[
|
322
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
323
|
+
],
|
324
|
+
] = None,
|
325
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
326
|
+
_content_type: Optional[StrictStr] = None,
|
327
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
328
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
329
|
+
) -> object:
|
330
|
+
"""Delete Model
|
331
|
+
|
332
|
+
Delete a model
|
333
|
+
|
334
|
+
:param id: Model ID to delete (required)
|
335
|
+
:type id: int
|
336
|
+
:param access_token:
|
337
|
+
:type access_token: str
|
338
|
+
:param _request_timeout: timeout setting for this request. If one
|
339
|
+
number provided, it will be total request
|
340
|
+
timeout. It can also be a pair (tuple) of
|
341
|
+
(connection, read) timeouts.
|
342
|
+
:type _request_timeout: int, tuple(int, int), optional
|
343
|
+
:param _request_auth: set to override the auth_settings for an a single
|
344
|
+
request; this effectively ignores the
|
345
|
+
authentication in the spec for a single request.
|
346
|
+
:type _request_auth: dict, optional
|
347
|
+
:param _content_type: force content-type for the request.
|
348
|
+
:type _content_type: str, Optional
|
349
|
+
:param _headers: set to override the headers for a single
|
350
|
+
request; this effectively ignores the headers
|
351
|
+
in the spec for a single request.
|
352
|
+
:type _headers: dict, optional
|
353
|
+
:param _host_index: set to override the host_index for a single
|
354
|
+
request; this effectively ignores the host_index
|
355
|
+
in the spec for a single request.
|
356
|
+
:type _host_index: int, optional
|
357
|
+
:return: Returns the result object.
|
358
|
+
""" # noqa: E501
|
359
|
+
|
360
|
+
_param = self._delete_model_serialize(
|
361
|
+
id=id,
|
362
|
+
access_token=access_token,
|
363
|
+
_request_auth=_request_auth,
|
364
|
+
_content_type=_content_type,
|
365
|
+
_headers=_headers,
|
366
|
+
_host_index=_host_index,
|
367
|
+
)
|
368
|
+
|
369
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
370
|
+
"200": "object",
|
371
|
+
"422": "HTTPValidationError",
|
372
|
+
}
|
373
|
+
response_data = await self.api_client.call_api(
|
374
|
+
*_param, _request_timeout=_request_timeout
|
375
|
+
)
|
376
|
+
await response_data.read()
|
377
|
+
return self.api_client.response_deserialize(
|
378
|
+
response_data=response_data,
|
379
|
+
response_types_map=_response_types_map,
|
380
|
+
).data
|
381
|
+
|
382
|
+
@validate_call
|
383
|
+
async def delete_model_with_http_info(
|
384
|
+
self,
|
385
|
+
id: Annotated[StrictInt, Field(description="Model ID to delete")],
|
386
|
+
access_token: Optional[StrictStr] = None,
|
387
|
+
_request_timeout: Union[
|
388
|
+
None,
|
389
|
+
Annotated[StrictFloat, Field(gt=0)],
|
390
|
+
Tuple[
|
391
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
392
|
+
],
|
393
|
+
] = None,
|
394
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
395
|
+
_content_type: Optional[StrictStr] = None,
|
396
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
397
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
398
|
+
) -> ApiResponse[object]:
|
399
|
+
"""Delete Model
|
400
|
+
|
401
|
+
Delete a model
|
402
|
+
|
403
|
+
:param id: Model ID to delete (required)
|
404
|
+
:type id: int
|
405
|
+
:param access_token:
|
406
|
+
:type access_token: str
|
407
|
+
:param _request_timeout: timeout setting for this request. If one
|
408
|
+
number provided, it will be total request
|
409
|
+
timeout. It can also be a pair (tuple) of
|
410
|
+
(connection, read) timeouts.
|
411
|
+
:type _request_timeout: int, tuple(int, int), optional
|
412
|
+
:param _request_auth: set to override the auth_settings for an a single
|
413
|
+
request; this effectively ignores the
|
414
|
+
authentication in the spec for a single request.
|
415
|
+
:type _request_auth: dict, optional
|
416
|
+
:param _content_type: force content-type for the request.
|
417
|
+
:type _content_type: str, Optional
|
418
|
+
:param _headers: set to override the headers for a single
|
419
|
+
request; this effectively ignores the headers
|
420
|
+
in the spec for a single request.
|
421
|
+
:type _headers: dict, optional
|
422
|
+
:param _host_index: set to override the host_index for a single
|
423
|
+
request; this effectively ignores the host_index
|
424
|
+
in the spec for a single request.
|
425
|
+
:type _host_index: int, optional
|
426
|
+
:return: Returns the result object.
|
427
|
+
""" # noqa: E501
|
428
|
+
|
429
|
+
_param = self._delete_model_serialize(
|
430
|
+
id=id,
|
431
|
+
access_token=access_token,
|
432
|
+
_request_auth=_request_auth,
|
433
|
+
_content_type=_content_type,
|
434
|
+
_headers=_headers,
|
435
|
+
_host_index=_host_index,
|
436
|
+
)
|
437
|
+
|
438
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
439
|
+
"200": "object",
|
440
|
+
"422": "HTTPValidationError",
|
441
|
+
}
|
442
|
+
response_data = await self.api_client.call_api(
|
443
|
+
*_param, _request_timeout=_request_timeout
|
444
|
+
)
|
445
|
+
await response_data.read()
|
446
|
+
return self.api_client.response_deserialize(
|
447
|
+
response_data=response_data,
|
448
|
+
response_types_map=_response_types_map,
|
449
|
+
)
|
450
|
+
|
451
|
+
@validate_call
|
452
|
+
async def delete_model_without_preload_content(
|
453
|
+
self,
|
454
|
+
id: Annotated[StrictInt, Field(description="Model ID to delete")],
|
455
|
+
access_token: Optional[StrictStr] = None,
|
456
|
+
_request_timeout: Union[
|
457
|
+
None,
|
458
|
+
Annotated[StrictFloat, Field(gt=0)],
|
459
|
+
Tuple[
|
460
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
461
|
+
],
|
462
|
+
] = None,
|
463
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
464
|
+
_content_type: Optional[StrictStr] = None,
|
465
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
466
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
467
|
+
) -> RESTResponseType:
|
468
|
+
"""Delete Model
|
469
|
+
|
470
|
+
Delete a model
|
471
|
+
|
472
|
+
:param id: Model ID to delete (required)
|
473
|
+
:type id: int
|
474
|
+
:param access_token:
|
475
|
+
:type access_token: str
|
476
|
+
:param _request_timeout: timeout setting for this request. If one
|
477
|
+
number provided, it will be total request
|
478
|
+
timeout. It can also be a pair (tuple) of
|
479
|
+
(connection, read) timeouts.
|
480
|
+
:type _request_timeout: int, tuple(int, int), optional
|
481
|
+
:param _request_auth: set to override the auth_settings for an a single
|
482
|
+
request; this effectively ignores the
|
483
|
+
authentication in the spec for a single request.
|
484
|
+
:type _request_auth: dict, optional
|
485
|
+
:param _content_type: force content-type for the request.
|
486
|
+
:type _content_type: str, Optional
|
487
|
+
:param _headers: set to override the headers for a single
|
488
|
+
request; this effectively ignores the headers
|
489
|
+
in the spec for a single request.
|
490
|
+
:type _headers: dict, optional
|
491
|
+
:param _host_index: set to override the host_index for a single
|
492
|
+
request; this effectively ignores the host_index
|
493
|
+
in the spec for a single request.
|
494
|
+
:type _host_index: int, optional
|
495
|
+
:return: Returns the result object.
|
496
|
+
""" # noqa: E501
|
497
|
+
|
498
|
+
_param = self._delete_model_serialize(
|
499
|
+
id=id,
|
500
|
+
access_token=access_token,
|
501
|
+
_request_auth=_request_auth,
|
502
|
+
_content_type=_content_type,
|
503
|
+
_headers=_headers,
|
504
|
+
_host_index=_host_index,
|
505
|
+
)
|
506
|
+
|
507
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
508
|
+
"200": "object",
|
509
|
+
"422": "HTTPValidationError",
|
510
|
+
}
|
511
|
+
response_data = await self.api_client.call_api(
|
512
|
+
*_param, _request_timeout=_request_timeout
|
513
|
+
)
|
514
|
+
return response_data.response
|
515
|
+
|
516
|
+
def _delete_model_serialize(
|
517
|
+
self,
|
518
|
+
id,
|
519
|
+
access_token,
|
520
|
+
_request_auth,
|
521
|
+
_content_type,
|
522
|
+
_headers,
|
523
|
+
_host_index,
|
524
|
+
) -> RequestSerialized:
|
525
|
+
|
526
|
+
_host = None
|
527
|
+
|
528
|
+
_collection_formats: Dict[str, str] = {}
|
529
|
+
|
530
|
+
_path_params: Dict[str, str] = {}
|
531
|
+
_query_params: List[Tuple[str, str]] = []
|
532
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
533
|
+
_form_params: List[Tuple[str, str]] = []
|
534
|
+
_files: Dict[
|
535
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
536
|
+
] = {}
|
537
|
+
_body_params: Optional[bytes] = None
|
538
|
+
|
539
|
+
# process the path parameters
|
540
|
+
if id is not None:
|
541
|
+
_path_params["id"] = id
|
542
|
+
# process the query parameters
|
543
|
+
# process the header parameters
|
544
|
+
# process the form parameters
|
545
|
+
# process the body parameter
|
546
|
+
|
547
|
+
# set the HTTP header `Accept`
|
548
|
+
if "Accept" not in _header_params:
|
549
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
550
|
+
["application/json"]
|
551
|
+
)
|
552
|
+
|
553
|
+
# authentication setting
|
554
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
555
|
+
|
556
|
+
return self.api_client.param_serialize(
|
557
|
+
method="DELETE",
|
558
|
+
resource_path="/model/{id}",
|
559
|
+
path_params=_path_params,
|
560
|
+
query_params=_query_params,
|
561
|
+
header_params=_header_params,
|
562
|
+
body=_body_params,
|
563
|
+
post_params=_form_params,
|
564
|
+
files=_files,
|
565
|
+
auth_settings=_auth_settings,
|
566
|
+
collection_formats=_collection_formats,
|
567
|
+
_host=_host,
|
568
|
+
_request_auth=_request_auth,
|
569
|
+
)
|
570
|
+
|
571
|
+
@validate_call
|
572
|
+
async def evaluate_model(
|
573
|
+
self,
|
574
|
+
id: Annotated[StrictInt, Field(description="Model ID to evaluate")],
|
575
|
+
request_body: List[Any],
|
576
|
+
version: Annotated[
|
577
|
+
Optional[DataVersion], Field(description="Data version to evaluate against")
|
578
|
+
] = None,
|
579
|
+
access_token: Optional[StrictStr] = None,
|
580
|
+
_request_timeout: Union[
|
581
|
+
None,
|
582
|
+
Annotated[StrictFloat, Field(gt=0)],
|
583
|
+
Tuple[
|
584
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
585
|
+
],
|
586
|
+
] = None,
|
587
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
588
|
+
_content_type: Optional[StrictStr] = None,
|
589
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
590
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
591
|
+
) -> EvaluationResponse:
|
592
|
+
"""Evaluate Model
|
593
|
+
|
594
|
+
Evaluate a model's predictions
|
595
|
+
|
596
|
+
:param id: Model ID to evaluate (required)
|
597
|
+
:type id: int
|
598
|
+
:param request_body: (required)
|
599
|
+
:type request_body: List[object]
|
600
|
+
:param version: Data version to evaluate against
|
601
|
+
:type version: DataVersion
|
602
|
+
:param access_token:
|
603
|
+
:type access_token: str
|
604
|
+
:param _request_timeout: timeout setting for this request. If one
|
605
|
+
number provided, it will be total request
|
606
|
+
timeout. It can also be a pair (tuple) of
|
607
|
+
(connection, read) timeouts.
|
608
|
+
:type _request_timeout: int, tuple(int, int), optional
|
609
|
+
:param _request_auth: set to override the auth_settings for an a single
|
610
|
+
request; this effectively ignores the
|
611
|
+
authentication in the spec for a single request.
|
612
|
+
:type _request_auth: dict, optional
|
613
|
+
:param _content_type: force content-type for the request.
|
614
|
+
:type _content_type: str, Optional
|
615
|
+
:param _headers: set to override the headers for a single
|
616
|
+
request; this effectively ignores the headers
|
617
|
+
in the spec for a single request.
|
618
|
+
:type _headers: dict, optional
|
619
|
+
:param _host_index: set to override the host_index for a single
|
620
|
+
request; this effectively ignores the host_index
|
621
|
+
in the spec for a single request.
|
622
|
+
:type _host_index: int, optional
|
623
|
+
:return: Returns the result object.
|
624
|
+
""" # noqa: E501
|
625
|
+
|
626
|
+
_param = self._evaluate_model_serialize(
|
627
|
+
id=id,
|
628
|
+
request_body=request_body,
|
629
|
+
version=version,
|
630
|
+
access_token=access_token,
|
631
|
+
_request_auth=_request_auth,
|
632
|
+
_content_type=_content_type,
|
633
|
+
_headers=_headers,
|
634
|
+
_host_index=_host_index,
|
635
|
+
)
|
636
|
+
|
637
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
638
|
+
"200": "EvaluationResponse",
|
639
|
+
"422": "HTTPValidationError",
|
640
|
+
}
|
641
|
+
response_data = await self.api_client.call_api(
|
642
|
+
*_param, _request_timeout=_request_timeout
|
643
|
+
)
|
644
|
+
await response_data.read()
|
645
|
+
return self.api_client.response_deserialize(
|
646
|
+
response_data=response_data,
|
647
|
+
response_types_map=_response_types_map,
|
648
|
+
).data
|
649
|
+
|
650
|
+
@validate_call
|
651
|
+
async def evaluate_model_with_http_info(
|
652
|
+
self,
|
653
|
+
id: Annotated[StrictInt, Field(description="Model ID to evaluate")],
|
654
|
+
request_body: List[Any],
|
655
|
+
version: Annotated[
|
656
|
+
Optional[DataVersion], Field(description="Data version to evaluate against")
|
657
|
+
] = None,
|
658
|
+
access_token: Optional[StrictStr] = None,
|
659
|
+
_request_timeout: Union[
|
660
|
+
None,
|
661
|
+
Annotated[StrictFloat, Field(gt=0)],
|
662
|
+
Tuple[
|
663
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
664
|
+
],
|
665
|
+
] = None,
|
666
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
667
|
+
_content_type: Optional[StrictStr] = None,
|
668
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
669
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
670
|
+
) -> ApiResponse[EvaluationResponse]:
|
671
|
+
"""Evaluate Model
|
672
|
+
|
673
|
+
Evaluate a model's predictions
|
674
|
+
|
675
|
+
:param id: Model ID to evaluate (required)
|
676
|
+
:type id: int
|
677
|
+
:param request_body: (required)
|
678
|
+
:type request_body: List[object]
|
679
|
+
:param version: Data version to evaluate against
|
680
|
+
:type version: DataVersion
|
681
|
+
:param access_token:
|
682
|
+
:type access_token: str
|
683
|
+
:param _request_timeout: timeout setting for this request. If one
|
684
|
+
number provided, it will be total request
|
685
|
+
timeout. It can also be a pair (tuple) of
|
686
|
+
(connection, read) timeouts.
|
687
|
+
:type _request_timeout: int, tuple(int, int), optional
|
688
|
+
:param _request_auth: set to override the auth_settings for an a single
|
689
|
+
request; this effectively ignores the
|
690
|
+
authentication in the spec for a single request.
|
691
|
+
:type _request_auth: dict, optional
|
692
|
+
:param _content_type: force content-type for the request.
|
693
|
+
:type _content_type: str, Optional
|
694
|
+
:param _headers: set to override the headers for a single
|
695
|
+
request; this effectively ignores the headers
|
696
|
+
in the spec for a single request.
|
697
|
+
:type _headers: dict, optional
|
698
|
+
:param _host_index: set to override the host_index for a single
|
699
|
+
request; this effectively ignores the host_index
|
700
|
+
in the spec for a single request.
|
701
|
+
:type _host_index: int, optional
|
702
|
+
:return: Returns the result object.
|
703
|
+
""" # noqa: E501
|
704
|
+
|
705
|
+
_param = self._evaluate_model_serialize(
|
706
|
+
id=id,
|
707
|
+
request_body=request_body,
|
708
|
+
version=version,
|
709
|
+
access_token=access_token,
|
710
|
+
_request_auth=_request_auth,
|
711
|
+
_content_type=_content_type,
|
712
|
+
_headers=_headers,
|
713
|
+
_host_index=_host_index,
|
714
|
+
)
|
715
|
+
|
716
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
717
|
+
"200": "EvaluationResponse",
|
718
|
+
"422": "HTTPValidationError",
|
719
|
+
}
|
720
|
+
response_data = await self.api_client.call_api(
|
721
|
+
*_param, _request_timeout=_request_timeout
|
722
|
+
)
|
723
|
+
await response_data.read()
|
724
|
+
return self.api_client.response_deserialize(
|
725
|
+
response_data=response_data,
|
726
|
+
response_types_map=_response_types_map,
|
727
|
+
)
|
728
|
+
|
729
|
+
@validate_call
|
730
|
+
async def evaluate_model_without_preload_content(
|
731
|
+
self,
|
732
|
+
id: Annotated[StrictInt, Field(description="Model ID to evaluate")],
|
733
|
+
request_body: List[Any],
|
734
|
+
version: Annotated[
|
735
|
+
Optional[DataVersion], Field(description="Data version to evaluate against")
|
736
|
+
] = None,
|
737
|
+
access_token: Optional[StrictStr] = None,
|
738
|
+
_request_timeout: Union[
|
739
|
+
None,
|
740
|
+
Annotated[StrictFloat, Field(gt=0)],
|
741
|
+
Tuple[
|
742
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
743
|
+
],
|
744
|
+
] = None,
|
745
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
746
|
+
_content_type: Optional[StrictStr] = None,
|
747
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
748
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
749
|
+
) -> RESTResponseType:
|
750
|
+
"""Evaluate Model
|
751
|
+
|
752
|
+
Evaluate a model's predictions
|
753
|
+
|
754
|
+
:param id: Model ID to evaluate (required)
|
755
|
+
:type id: int
|
756
|
+
:param request_body: (required)
|
757
|
+
:type request_body: List[object]
|
758
|
+
:param version: Data version to evaluate against
|
759
|
+
:type version: DataVersion
|
760
|
+
:param access_token:
|
761
|
+
:type access_token: str
|
762
|
+
:param _request_timeout: timeout setting for this request. If one
|
763
|
+
number provided, it will be total request
|
764
|
+
timeout. It can also be a pair (tuple) of
|
765
|
+
(connection, read) timeouts.
|
766
|
+
:type _request_timeout: int, tuple(int, int), optional
|
767
|
+
:param _request_auth: set to override the auth_settings for an a single
|
768
|
+
request; this effectively ignores the
|
769
|
+
authentication in the spec for a single request.
|
770
|
+
:type _request_auth: dict, optional
|
771
|
+
:param _content_type: force content-type for the request.
|
772
|
+
:type _content_type: str, Optional
|
773
|
+
:param _headers: set to override the headers for a single
|
774
|
+
request; this effectively ignores the headers
|
775
|
+
in the spec for a single request.
|
776
|
+
:type _headers: dict, optional
|
777
|
+
:param _host_index: set to override the host_index for a single
|
778
|
+
request; this effectively ignores the host_index
|
779
|
+
in the spec for a single request.
|
780
|
+
:type _host_index: int, optional
|
781
|
+
:return: Returns the result object.
|
782
|
+
""" # noqa: E501
|
783
|
+
|
784
|
+
_param = self._evaluate_model_serialize(
|
785
|
+
id=id,
|
786
|
+
request_body=request_body,
|
787
|
+
version=version,
|
788
|
+
access_token=access_token,
|
789
|
+
_request_auth=_request_auth,
|
790
|
+
_content_type=_content_type,
|
791
|
+
_headers=_headers,
|
792
|
+
_host_index=_host_index,
|
793
|
+
)
|
794
|
+
|
795
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
796
|
+
"200": "EvaluationResponse",
|
797
|
+
"422": "HTTPValidationError",
|
798
|
+
}
|
799
|
+
response_data = await self.api_client.call_api(
|
800
|
+
*_param, _request_timeout=_request_timeout
|
801
|
+
)
|
802
|
+
return response_data.response
|
803
|
+
|
804
|
+
def _evaluate_model_serialize(
|
805
|
+
self,
|
806
|
+
id,
|
807
|
+
request_body,
|
808
|
+
version,
|
809
|
+
access_token,
|
810
|
+
_request_auth,
|
811
|
+
_content_type,
|
812
|
+
_headers,
|
813
|
+
_host_index,
|
814
|
+
) -> RequestSerialized:
|
815
|
+
|
816
|
+
_host = None
|
817
|
+
|
818
|
+
_collection_formats: Dict[str, str] = {
|
819
|
+
"request_body": "",
|
820
|
+
}
|
821
|
+
|
822
|
+
_path_params: Dict[str, str] = {}
|
823
|
+
_query_params: List[Tuple[str, str]] = []
|
824
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
825
|
+
_form_params: List[Tuple[str, str]] = []
|
826
|
+
_files: Dict[
|
827
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
828
|
+
] = {}
|
829
|
+
_body_params: Optional[bytes] = None
|
830
|
+
|
831
|
+
# process the path parameters
|
832
|
+
if id is not None:
|
833
|
+
_path_params["id"] = id
|
834
|
+
# process the query parameters
|
835
|
+
if version is not None:
|
836
|
+
|
837
|
+
_query_params.append(("version", version.value))
|
838
|
+
|
839
|
+
# process the header parameters
|
840
|
+
# process the form parameters
|
841
|
+
# process the body parameter
|
842
|
+
if request_body is not None:
|
843
|
+
_body_params = request_body
|
844
|
+
|
845
|
+
# set the HTTP header `Accept`
|
846
|
+
if "Accept" not in _header_params:
|
847
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
848
|
+
["application/json"]
|
849
|
+
)
|
850
|
+
|
851
|
+
# set the HTTP header `Content-Type`
|
852
|
+
if _content_type:
|
853
|
+
_header_params["Content-Type"] = _content_type
|
854
|
+
else:
|
855
|
+
_default_content_type = self.api_client.select_header_content_type(
|
856
|
+
["application/json"]
|
857
|
+
)
|
858
|
+
if _default_content_type is not None:
|
859
|
+
_header_params["Content-Type"] = _default_content_type
|
860
|
+
|
861
|
+
# authentication setting
|
862
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
863
|
+
|
864
|
+
return self.api_client.param_serialize(
|
865
|
+
method="POST",
|
866
|
+
resource_path="/model/evaluation/{id}",
|
867
|
+
path_params=_path_params,
|
868
|
+
query_params=_query_params,
|
869
|
+
header_params=_header_params,
|
870
|
+
body=_body_params,
|
871
|
+
post_params=_form_params,
|
872
|
+
files=_files,
|
873
|
+
auth_settings=_auth_settings,
|
874
|
+
collection_formats=_collection_formats,
|
875
|
+
_host=_host,
|
876
|
+
_request_auth=_request_auth,
|
877
|
+
)
|
878
|
+
|
879
|
+
@validate_call
|
880
|
+
async def get_all_models(
|
881
|
+
self,
|
882
|
+
access_token: Optional[StrictStr] = None,
|
883
|
+
_request_timeout: Union[
|
884
|
+
None,
|
885
|
+
Annotated[StrictFloat, Field(gt=0)],
|
886
|
+
Tuple[
|
887
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
888
|
+
],
|
889
|
+
] = None,
|
890
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
891
|
+
_content_type: Optional[StrictStr] = None,
|
892
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
893
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
894
|
+
) -> List[Model]:
|
895
|
+
"""Get All Models
|
896
|
+
|
897
|
+
List all models
|
898
|
+
|
899
|
+
:param access_token:
|
900
|
+
:type access_token: str
|
901
|
+
:param _request_timeout: timeout setting for this request. If one
|
902
|
+
number provided, it will be total request
|
903
|
+
timeout. It can also be a pair (tuple) of
|
904
|
+
(connection, read) timeouts.
|
905
|
+
:type _request_timeout: int, tuple(int, int), optional
|
906
|
+
:param _request_auth: set to override the auth_settings for an a single
|
907
|
+
request; this effectively ignores the
|
908
|
+
authentication in the spec for a single request.
|
909
|
+
:type _request_auth: dict, optional
|
910
|
+
:param _content_type: force content-type for the request.
|
911
|
+
:type _content_type: str, Optional
|
912
|
+
:param _headers: set to override the headers for a single
|
913
|
+
request; this effectively ignores the headers
|
914
|
+
in the spec for a single request.
|
915
|
+
:type _headers: dict, optional
|
916
|
+
:param _host_index: set to override the host_index for a single
|
917
|
+
request; this effectively ignores the host_index
|
918
|
+
in the spec for a single request.
|
919
|
+
:type _host_index: int, optional
|
920
|
+
:return: Returns the result object.
|
921
|
+
""" # noqa: E501
|
922
|
+
|
923
|
+
_param = self._get_all_models_serialize(
|
924
|
+
access_token=access_token,
|
925
|
+
_request_auth=_request_auth,
|
926
|
+
_content_type=_content_type,
|
927
|
+
_headers=_headers,
|
928
|
+
_host_index=_host_index,
|
929
|
+
)
|
930
|
+
|
931
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
932
|
+
"200": "List[Model]",
|
933
|
+
"422": "HTTPValidationError",
|
934
|
+
}
|
935
|
+
response_data = await self.api_client.call_api(
|
936
|
+
*_param, _request_timeout=_request_timeout
|
937
|
+
)
|
938
|
+
await response_data.read()
|
939
|
+
return self.api_client.response_deserialize(
|
940
|
+
response_data=response_data,
|
941
|
+
response_types_map=_response_types_map,
|
942
|
+
).data
|
943
|
+
|
944
|
+
@validate_call
|
945
|
+
async def get_all_models_with_http_info(
|
946
|
+
self,
|
947
|
+
access_token: Optional[StrictStr] = None,
|
948
|
+
_request_timeout: Union[
|
949
|
+
None,
|
950
|
+
Annotated[StrictFloat, Field(gt=0)],
|
951
|
+
Tuple[
|
952
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
953
|
+
],
|
954
|
+
] = None,
|
955
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
956
|
+
_content_type: Optional[StrictStr] = None,
|
957
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
958
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
959
|
+
) -> ApiResponse[List[Model]]:
|
960
|
+
"""Get All Models
|
961
|
+
|
962
|
+
List all models
|
963
|
+
|
964
|
+
:param access_token:
|
965
|
+
:type access_token: str
|
966
|
+
:param _request_timeout: timeout setting for this request. If one
|
967
|
+
number provided, it will be total request
|
968
|
+
timeout. It can also be a pair (tuple) of
|
969
|
+
(connection, read) timeouts.
|
970
|
+
:type _request_timeout: int, tuple(int, int), optional
|
971
|
+
:param _request_auth: set to override the auth_settings for an a single
|
972
|
+
request; this effectively ignores the
|
973
|
+
authentication in the spec for a single request.
|
974
|
+
:type _request_auth: dict, optional
|
975
|
+
:param _content_type: force content-type for the request.
|
976
|
+
:type _content_type: str, Optional
|
977
|
+
:param _headers: set to override the headers for a single
|
978
|
+
request; this effectively ignores the headers
|
979
|
+
in the spec for a single request.
|
980
|
+
:type _headers: dict, optional
|
981
|
+
:param _host_index: set to override the host_index for a single
|
982
|
+
request; this effectively ignores the host_index
|
983
|
+
in the spec for a single request.
|
984
|
+
:type _host_index: int, optional
|
985
|
+
:return: Returns the result object.
|
986
|
+
""" # noqa: E501
|
987
|
+
|
988
|
+
_param = self._get_all_models_serialize(
|
989
|
+
access_token=access_token,
|
990
|
+
_request_auth=_request_auth,
|
991
|
+
_content_type=_content_type,
|
992
|
+
_headers=_headers,
|
993
|
+
_host_index=_host_index,
|
994
|
+
)
|
995
|
+
|
996
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
997
|
+
"200": "List[Model]",
|
998
|
+
"422": "HTTPValidationError",
|
999
|
+
}
|
1000
|
+
response_data = await self.api_client.call_api(
|
1001
|
+
*_param, _request_timeout=_request_timeout
|
1002
|
+
)
|
1003
|
+
await response_data.read()
|
1004
|
+
return self.api_client.response_deserialize(
|
1005
|
+
response_data=response_data,
|
1006
|
+
response_types_map=_response_types_map,
|
1007
|
+
)
|
1008
|
+
|
1009
|
+
@validate_call
|
1010
|
+
async def get_all_models_without_preload_content(
|
1011
|
+
self,
|
1012
|
+
access_token: Optional[StrictStr] = None,
|
1013
|
+
_request_timeout: Union[
|
1014
|
+
None,
|
1015
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1016
|
+
Tuple[
|
1017
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1018
|
+
],
|
1019
|
+
] = None,
|
1020
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1021
|
+
_content_type: Optional[StrictStr] = None,
|
1022
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1023
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1024
|
+
) -> RESTResponseType:
|
1025
|
+
"""Get All Models
|
1026
|
+
|
1027
|
+
List all models
|
1028
|
+
|
1029
|
+
:param access_token:
|
1030
|
+
:type access_token: str
|
1031
|
+
:param _request_timeout: timeout setting for this request. If one
|
1032
|
+
number provided, it will be total request
|
1033
|
+
timeout. It can also be a pair (tuple) of
|
1034
|
+
(connection, read) timeouts.
|
1035
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1036
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1037
|
+
request; this effectively ignores the
|
1038
|
+
authentication in the spec for a single request.
|
1039
|
+
:type _request_auth: dict, optional
|
1040
|
+
:param _content_type: force content-type for the request.
|
1041
|
+
:type _content_type: str, Optional
|
1042
|
+
:param _headers: set to override the headers for a single
|
1043
|
+
request; this effectively ignores the headers
|
1044
|
+
in the spec for a single request.
|
1045
|
+
:type _headers: dict, optional
|
1046
|
+
:param _host_index: set to override the host_index for a single
|
1047
|
+
request; this effectively ignores the host_index
|
1048
|
+
in the spec for a single request.
|
1049
|
+
:type _host_index: int, optional
|
1050
|
+
:return: Returns the result object.
|
1051
|
+
""" # noqa: E501
|
1052
|
+
|
1053
|
+
_param = self._get_all_models_serialize(
|
1054
|
+
access_token=access_token,
|
1055
|
+
_request_auth=_request_auth,
|
1056
|
+
_content_type=_content_type,
|
1057
|
+
_headers=_headers,
|
1058
|
+
_host_index=_host_index,
|
1059
|
+
)
|
1060
|
+
|
1061
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1062
|
+
"200": "List[Model]",
|
1063
|
+
"422": "HTTPValidationError",
|
1064
|
+
}
|
1065
|
+
response_data = await self.api_client.call_api(
|
1066
|
+
*_param, _request_timeout=_request_timeout
|
1067
|
+
)
|
1068
|
+
return response_data.response
|
1069
|
+
|
1070
|
+
def _get_all_models_serialize(
|
1071
|
+
self,
|
1072
|
+
access_token,
|
1073
|
+
_request_auth,
|
1074
|
+
_content_type,
|
1075
|
+
_headers,
|
1076
|
+
_host_index,
|
1077
|
+
) -> RequestSerialized:
|
1078
|
+
|
1079
|
+
_host = None
|
1080
|
+
|
1081
|
+
_collection_formats: Dict[str, str] = {}
|
1082
|
+
|
1083
|
+
_path_params: Dict[str, str] = {}
|
1084
|
+
_query_params: List[Tuple[str, str]] = []
|
1085
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1086
|
+
_form_params: List[Tuple[str, str]] = []
|
1087
|
+
_files: Dict[
|
1088
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1089
|
+
] = {}
|
1090
|
+
_body_params: Optional[bytes] = None
|
1091
|
+
|
1092
|
+
# process the path parameters
|
1093
|
+
# process the query parameters
|
1094
|
+
# process the header parameters
|
1095
|
+
# process the form parameters
|
1096
|
+
# process the body parameter
|
1097
|
+
|
1098
|
+
# set the HTTP header `Accept`
|
1099
|
+
if "Accept" not in _header_params:
|
1100
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1101
|
+
["application/json"]
|
1102
|
+
)
|
1103
|
+
|
1104
|
+
# authentication setting
|
1105
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1106
|
+
|
1107
|
+
return self.api_client.param_serialize(
|
1108
|
+
method="GET",
|
1109
|
+
resource_path="/model/all",
|
1110
|
+
path_params=_path_params,
|
1111
|
+
query_params=_query_params,
|
1112
|
+
header_params=_header_params,
|
1113
|
+
body=_body_params,
|
1114
|
+
post_params=_form_params,
|
1115
|
+
files=_files,
|
1116
|
+
auth_settings=_auth_settings,
|
1117
|
+
collection_formats=_collection_formats,
|
1118
|
+
_host=_host,
|
1119
|
+
_request_auth=_request_auth,
|
1120
|
+
)
|
1121
|
+
|
1122
|
+
@validate_call
|
1123
|
+
async def get_model(
|
1124
|
+
self,
|
1125
|
+
id: Optional[StrictInt] = None,
|
1126
|
+
name: Optional[StrictStr] = None,
|
1127
|
+
access_token: Optional[StrictStr] = None,
|
1128
|
+
_request_timeout: Union[
|
1129
|
+
None,
|
1130
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1131
|
+
Tuple[
|
1132
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1133
|
+
],
|
1134
|
+
] = None,
|
1135
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1136
|
+
_content_type: Optional[StrictStr] = None,
|
1137
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1138
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1139
|
+
) -> Model:
|
1140
|
+
"""Get Model
|
1141
|
+
|
1142
|
+
Get a model by ID or name
|
1143
|
+
|
1144
|
+
:param id:
|
1145
|
+
:type id: int
|
1146
|
+
:param name:
|
1147
|
+
:type name: str
|
1148
|
+
:param access_token:
|
1149
|
+
:type access_token: str
|
1150
|
+
:param _request_timeout: timeout setting for this request. If one
|
1151
|
+
number provided, it will be total request
|
1152
|
+
timeout. It can also be a pair (tuple) of
|
1153
|
+
(connection, read) timeouts.
|
1154
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1155
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1156
|
+
request; this effectively ignores the
|
1157
|
+
authentication in the spec for a single request.
|
1158
|
+
:type _request_auth: dict, optional
|
1159
|
+
:param _content_type: force content-type for the request.
|
1160
|
+
:type _content_type: str, Optional
|
1161
|
+
:param _headers: set to override the headers for a single
|
1162
|
+
request; this effectively ignores the headers
|
1163
|
+
in the spec for a single request.
|
1164
|
+
:type _headers: dict, optional
|
1165
|
+
:param _host_index: set to override the host_index for a single
|
1166
|
+
request; this effectively ignores the host_index
|
1167
|
+
in the spec for a single request.
|
1168
|
+
:type _host_index: int, optional
|
1169
|
+
:return: Returns the result object.
|
1170
|
+
""" # noqa: E501
|
1171
|
+
|
1172
|
+
_param = self._get_model_serialize(
|
1173
|
+
id=id,
|
1174
|
+
name=name,
|
1175
|
+
access_token=access_token,
|
1176
|
+
_request_auth=_request_auth,
|
1177
|
+
_content_type=_content_type,
|
1178
|
+
_headers=_headers,
|
1179
|
+
_host_index=_host_index,
|
1180
|
+
)
|
1181
|
+
|
1182
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1183
|
+
"200": "Model",
|
1184
|
+
"422": "HTTPValidationError",
|
1185
|
+
}
|
1186
|
+
response_data = await self.api_client.call_api(
|
1187
|
+
*_param, _request_timeout=_request_timeout
|
1188
|
+
)
|
1189
|
+
await response_data.read()
|
1190
|
+
return self.api_client.response_deserialize(
|
1191
|
+
response_data=response_data,
|
1192
|
+
response_types_map=_response_types_map,
|
1193
|
+
).data
|
1194
|
+
|
1195
|
+
@validate_call
|
1196
|
+
async def get_model_with_http_info(
|
1197
|
+
self,
|
1198
|
+
id: Optional[StrictInt] = None,
|
1199
|
+
name: Optional[StrictStr] = None,
|
1200
|
+
access_token: Optional[StrictStr] = None,
|
1201
|
+
_request_timeout: Union[
|
1202
|
+
None,
|
1203
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1204
|
+
Tuple[
|
1205
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1206
|
+
],
|
1207
|
+
] = None,
|
1208
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1209
|
+
_content_type: Optional[StrictStr] = None,
|
1210
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1211
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1212
|
+
) -> ApiResponse[Model]:
|
1213
|
+
"""Get Model
|
1214
|
+
|
1215
|
+
Get a model by ID or name
|
1216
|
+
|
1217
|
+
:param id:
|
1218
|
+
:type id: int
|
1219
|
+
:param name:
|
1220
|
+
:type name: str
|
1221
|
+
:param access_token:
|
1222
|
+
:type access_token: str
|
1223
|
+
:param _request_timeout: timeout setting for this request. If one
|
1224
|
+
number provided, it will be total request
|
1225
|
+
timeout. It can also be a pair (tuple) of
|
1226
|
+
(connection, read) timeouts.
|
1227
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1228
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1229
|
+
request; this effectively ignores the
|
1230
|
+
authentication in the spec for a single request.
|
1231
|
+
:type _request_auth: dict, optional
|
1232
|
+
:param _content_type: force content-type for the request.
|
1233
|
+
:type _content_type: str, Optional
|
1234
|
+
:param _headers: set to override the headers for a single
|
1235
|
+
request; this effectively ignores the headers
|
1236
|
+
in the spec for a single request.
|
1237
|
+
:type _headers: dict, optional
|
1238
|
+
:param _host_index: set to override the host_index for a single
|
1239
|
+
request; this effectively ignores the host_index
|
1240
|
+
in the spec for a single request.
|
1241
|
+
:type _host_index: int, optional
|
1242
|
+
:return: Returns the result object.
|
1243
|
+
""" # noqa: E501
|
1244
|
+
|
1245
|
+
_param = self._get_model_serialize(
|
1246
|
+
id=id,
|
1247
|
+
name=name,
|
1248
|
+
access_token=access_token,
|
1249
|
+
_request_auth=_request_auth,
|
1250
|
+
_content_type=_content_type,
|
1251
|
+
_headers=_headers,
|
1252
|
+
_host_index=_host_index,
|
1253
|
+
)
|
1254
|
+
|
1255
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1256
|
+
"200": "Model",
|
1257
|
+
"422": "HTTPValidationError",
|
1258
|
+
}
|
1259
|
+
response_data = await self.api_client.call_api(
|
1260
|
+
*_param, _request_timeout=_request_timeout
|
1261
|
+
)
|
1262
|
+
await response_data.read()
|
1263
|
+
return self.api_client.response_deserialize(
|
1264
|
+
response_data=response_data,
|
1265
|
+
response_types_map=_response_types_map,
|
1266
|
+
)
|
1267
|
+
|
1268
|
+
@validate_call
|
1269
|
+
async def get_model_without_preload_content(
|
1270
|
+
self,
|
1271
|
+
id: Optional[StrictInt] = None,
|
1272
|
+
name: Optional[StrictStr] = None,
|
1273
|
+
access_token: Optional[StrictStr] = None,
|
1274
|
+
_request_timeout: Union[
|
1275
|
+
None,
|
1276
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1277
|
+
Tuple[
|
1278
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1279
|
+
],
|
1280
|
+
] = None,
|
1281
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1282
|
+
_content_type: Optional[StrictStr] = None,
|
1283
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1284
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1285
|
+
) -> RESTResponseType:
|
1286
|
+
"""Get Model
|
1287
|
+
|
1288
|
+
Get a model by ID or name
|
1289
|
+
|
1290
|
+
:param id:
|
1291
|
+
:type id: int
|
1292
|
+
:param name:
|
1293
|
+
:type name: str
|
1294
|
+
:param access_token:
|
1295
|
+
:type access_token: str
|
1296
|
+
:param _request_timeout: timeout setting for this request. If one
|
1297
|
+
number provided, it will be total request
|
1298
|
+
timeout. It can also be a pair (tuple) of
|
1299
|
+
(connection, read) timeouts.
|
1300
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1301
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1302
|
+
request; this effectively ignores the
|
1303
|
+
authentication in the spec for a single request.
|
1304
|
+
:type _request_auth: dict, optional
|
1305
|
+
:param _content_type: force content-type for the request.
|
1306
|
+
:type _content_type: str, Optional
|
1307
|
+
:param _headers: set to override the headers for a single
|
1308
|
+
request; this effectively ignores the headers
|
1309
|
+
in the spec for a single request.
|
1310
|
+
:type _headers: dict, optional
|
1311
|
+
:param _host_index: set to override the host_index for a single
|
1312
|
+
request; this effectively ignores the host_index
|
1313
|
+
in the spec for a single request.
|
1314
|
+
:type _host_index: int, optional
|
1315
|
+
:return: Returns the result object.
|
1316
|
+
""" # noqa: E501
|
1317
|
+
|
1318
|
+
_param = self._get_model_serialize(
|
1319
|
+
id=id,
|
1320
|
+
name=name,
|
1321
|
+
access_token=access_token,
|
1322
|
+
_request_auth=_request_auth,
|
1323
|
+
_content_type=_content_type,
|
1324
|
+
_headers=_headers,
|
1325
|
+
_host_index=_host_index,
|
1326
|
+
)
|
1327
|
+
|
1328
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1329
|
+
"200": "Model",
|
1330
|
+
"422": "HTTPValidationError",
|
1331
|
+
}
|
1332
|
+
response_data = await self.api_client.call_api(
|
1333
|
+
*_param, _request_timeout=_request_timeout
|
1334
|
+
)
|
1335
|
+
return response_data.response
|
1336
|
+
|
1337
|
+
def _get_model_serialize(
|
1338
|
+
self,
|
1339
|
+
id,
|
1340
|
+
name,
|
1341
|
+
access_token,
|
1342
|
+
_request_auth,
|
1343
|
+
_content_type,
|
1344
|
+
_headers,
|
1345
|
+
_host_index,
|
1346
|
+
) -> RequestSerialized:
|
1347
|
+
|
1348
|
+
_host = None
|
1349
|
+
|
1350
|
+
_collection_formats: Dict[str, str] = {}
|
1351
|
+
|
1352
|
+
_path_params: Dict[str, str] = {}
|
1353
|
+
_query_params: List[Tuple[str, str]] = []
|
1354
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1355
|
+
_form_params: List[Tuple[str, str]] = []
|
1356
|
+
_files: Dict[
|
1357
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1358
|
+
] = {}
|
1359
|
+
_body_params: Optional[bytes] = None
|
1360
|
+
|
1361
|
+
# process the path parameters
|
1362
|
+
# process the query parameters
|
1363
|
+
if id is not None:
|
1364
|
+
|
1365
|
+
_query_params.append(("id", id))
|
1366
|
+
|
1367
|
+
if name is not None:
|
1368
|
+
|
1369
|
+
_query_params.append(("name", name))
|
1370
|
+
|
1371
|
+
# process the header parameters
|
1372
|
+
# process the form parameters
|
1373
|
+
# process the body parameter
|
1374
|
+
|
1375
|
+
# set the HTTP header `Accept`
|
1376
|
+
if "Accept" not in _header_params:
|
1377
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1378
|
+
["application/json"]
|
1379
|
+
)
|
1380
|
+
|
1381
|
+
# authentication setting
|
1382
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1383
|
+
|
1384
|
+
return self.api_client.param_serialize(
|
1385
|
+
method="GET",
|
1386
|
+
resource_path="/model",
|
1387
|
+
path_params=_path_params,
|
1388
|
+
query_params=_query_params,
|
1389
|
+
header_params=_header_params,
|
1390
|
+
body=_body_params,
|
1391
|
+
post_params=_form_params,
|
1392
|
+
files=_files,
|
1393
|
+
auth_settings=_auth_settings,
|
1394
|
+
collection_formats=_collection_formats,
|
1395
|
+
_host=_host,
|
1396
|
+
_request_auth=_request_auth,
|
1397
|
+
)
|
1398
|
+
|
1399
|
+
@validate_call
|
1400
|
+
async def update_model(
|
1401
|
+
self,
|
1402
|
+
id: Annotated[StrictInt, Field(description="Model ID to update")],
|
1403
|
+
model_update: ModelUpdate,
|
1404
|
+
access_token: Optional[StrictStr] = None,
|
1405
|
+
_request_timeout: Union[
|
1406
|
+
None,
|
1407
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1408
|
+
Tuple[
|
1409
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1410
|
+
],
|
1411
|
+
] = None,
|
1412
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1413
|
+
_content_type: Optional[StrictStr] = None,
|
1414
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1415
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1416
|
+
) -> object:
|
1417
|
+
"""Update Model
|
1418
|
+
|
1419
|
+
Update a model's information
|
1420
|
+
|
1421
|
+
:param id: Model ID to update (required)
|
1422
|
+
:type id: int
|
1423
|
+
:param model_update: (required)
|
1424
|
+
:type model_update: ModelUpdate
|
1425
|
+
:param access_token:
|
1426
|
+
:type access_token: str
|
1427
|
+
:param _request_timeout: timeout setting for this request. If one
|
1428
|
+
number provided, it will be total request
|
1429
|
+
timeout. It can also be a pair (tuple) of
|
1430
|
+
(connection, read) timeouts.
|
1431
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1432
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1433
|
+
request; this effectively ignores the
|
1434
|
+
authentication in the spec for a single request.
|
1435
|
+
:type _request_auth: dict, optional
|
1436
|
+
:param _content_type: force content-type for the request.
|
1437
|
+
:type _content_type: str, Optional
|
1438
|
+
:param _headers: set to override the headers for a single
|
1439
|
+
request; this effectively ignores the headers
|
1440
|
+
in the spec for a single request.
|
1441
|
+
:type _headers: dict, optional
|
1442
|
+
:param _host_index: set to override the host_index for a single
|
1443
|
+
request; this effectively ignores the host_index
|
1444
|
+
in the spec for a single request.
|
1445
|
+
:type _host_index: int, optional
|
1446
|
+
:return: Returns the result object.
|
1447
|
+
""" # noqa: E501
|
1448
|
+
|
1449
|
+
_param = self._update_model_serialize(
|
1450
|
+
id=id,
|
1451
|
+
model_update=model_update,
|
1452
|
+
access_token=access_token,
|
1453
|
+
_request_auth=_request_auth,
|
1454
|
+
_content_type=_content_type,
|
1455
|
+
_headers=_headers,
|
1456
|
+
_host_index=_host_index,
|
1457
|
+
)
|
1458
|
+
|
1459
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1460
|
+
"200": "object",
|
1461
|
+
"422": "HTTPValidationError",
|
1462
|
+
}
|
1463
|
+
response_data = await self.api_client.call_api(
|
1464
|
+
*_param, _request_timeout=_request_timeout
|
1465
|
+
)
|
1466
|
+
await response_data.read()
|
1467
|
+
return self.api_client.response_deserialize(
|
1468
|
+
response_data=response_data,
|
1469
|
+
response_types_map=_response_types_map,
|
1470
|
+
).data
|
1471
|
+
|
1472
|
+
@validate_call
|
1473
|
+
async def update_model_with_http_info(
|
1474
|
+
self,
|
1475
|
+
id: Annotated[StrictInt, Field(description="Model ID to update")],
|
1476
|
+
model_update: ModelUpdate,
|
1477
|
+
access_token: Optional[StrictStr] = None,
|
1478
|
+
_request_timeout: Union[
|
1479
|
+
None,
|
1480
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1481
|
+
Tuple[
|
1482
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1483
|
+
],
|
1484
|
+
] = None,
|
1485
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1486
|
+
_content_type: Optional[StrictStr] = None,
|
1487
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1488
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1489
|
+
) -> ApiResponse[object]:
|
1490
|
+
"""Update Model
|
1491
|
+
|
1492
|
+
Update a model's information
|
1493
|
+
|
1494
|
+
:param id: Model ID to update (required)
|
1495
|
+
:type id: int
|
1496
|
+
:param model_update: (required)
|
1497
|
+
:type model_update: ModelUpdate
|
1498
|
+
:param access_token:
|
1499
|
+
:type access_token: str
|
1500
|
+
:param _request_timeout: timeout setting for this request. If one
|
1501
|
+
number provided, it will be total request
|
1502
|
+
timeout. It can also be a pair (tuple) of
|
1503
|
+
(connection, read) timeouts.
|
1504
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1505
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1506
|
+
request; this effectively ignores the
|
1507
|
+
authentication in the spec for a single request.
|
1508
|
+
:type _request_auth: dict, optional
|
1509
|
+
:param _content_type: force content-type for the request.
|
1510
|
+
:type _content_type: str, Optional
|
1511
|
+
:param _headers: set to override the headers for a single
|
1512
|
+
request; this effectively ignores the headers
|
1513
|
+
in the spec for a single request.
|
1514
|
+
:type _headers: dict, optional
|
1515
|
+
:param _host_index: set to override the host_index for a single
|
1516
|
+
request; this effectively ignores the host_index
|
1517
|
+
in the spec for a single request.
|
1518
|
+
:type _host_index: int, optional
|
1519
|
+
:return: Returns the result object.
|
1520
|
+
""" # noqa: E501
|
1521
|
+
|
1522
|
+
_param = self._update_model_serialize(
|
1523
|
+
id=id,
|
1524
|
+
model_update=model_update,
|
1525
|
+
access_token=access_token,
|
1526
|
+
_request_auth=_request_auth,
|
1527
|
+
_content_type=_content_type,
|
1528
|
+
_headers=_headers,
|
1529
|
+
_host_index=_host_index,
|
1530
|
+
)
|
1531
|
+
|
1532
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1533
|
+
"200": "object",
|
1534
|
+
"422": "HTTPValidationError",
|
1535
|
+
}
|
1536
|
+
response_data = await self.api_client.call_api(
|
1537
|
+
*_param, _request_timeout=_request_timeout
|
1538
|
+
)
|
1539
|
+
await response_data.read()
|
1540
|
+
return self.api_client.response_deserialize(
|
1541
|
+
response_data=response_data,
|
1542
|
+
response_types_map=_response_types_map,
|
1543
|
+
)
|
1544
|
+
|
1545
|
+
@validate_call
|
1546
|
+
async def update_model_without_preload_content(
|
1547
|
+
self,
|
1548
|
+
id: Annotated[StrictInt, Field(description="Model ID to update")],
|
1549
|
+
model_update: ModelUpdate,
|
1550
|
+
access_token: Optional[StrictStr] = None,
|
1551
|
+
_request_timeout: Union[
|
1552
|
+
None,
|
1553
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1554
|
+
Tuple[
|
1555
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1556
|
+
],
|
1557
|
+
] = None,
|
1558
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1559
|
+
_content_type: Optional[StrictStr] = None,
|
1560
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1561
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1562
|
+
) -> RESTResponseType:
|
1563
|
+
"""Update Model
|
1564
|
+
|
1565
|
+
Update a model's information
|
1566
|
+
|
1567
|
+
:param id: Model ID to update (required)
|
1568
|
+
:type id: int
|
1569
|
+
:param model_update: (required)
|
1570
|
+
:type model_update: ModelUpdate
|
1571
|
+
:param access_token:
|
1572
|
+
:type access_token: str
|
1573
|
+
:param _request_timeout: timeout setting for this request. If one
|
1574
|
+
number provided, it will be total request
|
1575
|
+
timeout. It can also be a pair (tuple) of
|
1576
|
+
(connection, read) timeouts.
|
1577
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1578
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1579
|
+
request; this effectively ignores the
|
1580
|
+
authentication in the spec for a single request.
|
1581
|
+
:type _request_auth: dict, optional
|
1582
|
+
:param _content_type: force content-type for the request.
|
1583
|
+
:type _content_type: str, Optional
|
1584
|
+
:param _headers: set to override the headers for a single
|
1585
|
+
request; this effectively ignores the headers
|
1586
|
+
in the spec for a single request.
|
1587
|
+
:type _headers: dict, optional
|
1588
|
+
:param _host_index: set to override the host_index for a single
|
1589
|
+
request; this effectively ignores the host_index
|
1590
|
+
in the spec for a single request.
|
1591
|
+
:type _host_index: int, optional
|
1592
|
+
:return: Returns the result object.
|
1593
|
+
""" # noqa: E501
|
1594
|
+
|
1595
|
+
_param = self._update_model_serialize(
|
1596
|
+
id=id,
|
1597
|
+
model_update=model_update,
|
1598
|
+
access_token=access_token,
|
1599
|
+
_request_auth=_request_auth,
|
1600
|
+
_content_type=_content_type,
|
1601
|
+
_headers=_headers,
|
1602
|
+
_host_index=_host_index,
|
1603
|
+
)
|
1604
|
+
|
1605
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1606
|
+
"200": "object",
|
1607
|
+
"422": "HTTPValidationError",
|
1608
|
+
}
|
1609
|
+
response_data = await self.api_client.call_api(
|
1610
|
+
*_param, _request_timeout=_request_timeout
|
1611
|
+
)
|
1612
|
+
return response_data.response
|
1613
|
+
|
1614
|
+
def _update_model_serialize(
|
1615
|
+
self,
|
1616
|
+
id,
|
1617
|
+
model_update,
|
1618
|
+
access_token,
|
1619
|
+
_request_auth,
|
1620
|
+
_content_type,
|
1621
|
+
_headers,
|
1622
|
+
_host_index,
|
1623
|
+
) -> RequestSerialized:
|
1624
|
+
|
1625
|
+
_host = None
|
1626
|
+
|
1627
|
+
_collection_formats: Dict[str, str] = {}
|
1628
|
+
|
1629
|
+
_path_params: Dict[str, str] = {}
|
1630
|
+
_query_params: List[Tuple[str, str]] = []
|
1631
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1632
|
+
_form_params: List[Tuple[str, str]] = []
|
1633
|
+
_files: Dict[
|
1634
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1635
|
+
] = {}
|
1636
|
+
_body_params: Optional[bytes] = None
|
1637
|
+
|
1638
|
+
# process the path parameters
|
1639
|
+
if id is not None:
|
1640
|
+
_path_params["id"] = id
|
1641
|
+
# process the query parameters
|
1642
|
+
# process the header parameters
|
1643
|
+
# process the form parameters
|
1644
|
+
# process the body parameter
|
1645
|
+
if model_update is not None:
|
1646
|
+
_body_params = model_update
|
1647
|
+
|
1648
|
+
# set the HTTP header `Accept`
|
1649
|
+
if "Accept" not in _header_params:
|
1650
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1651
|
+
["application/json"]
|
1652
|
+
)
|
1653
|
+
|
1654
|
+
# set the HTTP header `Content-Type`
|
1655
|
+
if _content_type:
|
1656
|
+
_header_params["Content-Type"] = _content_type
|
1657
|
+
else:
|
1658
|
+
_default_content_type = self.api_client.select_header_content_type(
|
1659
|
+
["application/json"]
|
1660
|
+
)
|
1661
|
+
if _default_content_type is not None:
|
1662
|
+
_header_params["Content-Type"] = _default_content_type
|
1663
|
+
|
1664
|
+
# authentication setting
|
1665
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1666
|
+
|
1667
|
+
return self.api_client.param_serialize(
|
1668
|
+
method="PUT",
|
1669
|
+
resource_path="/model/{id}",
|
1670
|
+
path_params=_path_params,
|
1671
|
+
query_params=_query_params,
|
1672
|
+
header_params=_header_params,
|
1673
|
+
body=_body_params,
|
1674
|
+
post_params=_form_params,
|
1675
|
+
files=_files,
|
1676
|
+
auth_settings=_auth_settings,
|
1677
|
+
collection_formats=_collection_formats,
|
1678
|
+
_host=_host,
|
1679
|
+
_request_auth=_request_auth,
|
1680
|
+
)
|