crypticorn 2.5.3__py3-none-any.whl → 2.7.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/auth/client/__init__.py +9 -0
- crypticorn/auth/client/api/auth_api.py +8 -5
- crypticorn/auth/client/api/user_api.py +247 -0
- crypticorn/auth/client/models/__init__.py +9 -0
- crypticorn/auth/client/models/create_api_key_request.py +2 -1
- crypticorn/auth/client/models/get_api_keys200_response_inner.py +2 -1
- crypticorn/auth/client/models/user_by_username200_response.py +91 -0
- crypticorn/auth/client/models/verify200_response.py +14 -1
- crypticorn/auth/client/models/verify_email200_response_auth_auth.py +14 -1
- crypticorn/auth/client/models/whoami200_response.py +6 -1
- crypticorn/common/__init__.py +1 -0
- crypticorn/common/auth.py +13 -9
- crypticorn/common/errors.py +320 -88
- crypticorn/common/exceptions.py +38 -4
- crypticorn/common/pagination.py +49 -0
- crypticorn/common/scopes.py +24 -5
- crypticorn/hive/client/__init__.py +2 -0
- crypticorn/hive/client/api/data_api.py +15 -12
- crypticorn/hive/client/api/models_api.py +343 -56
- crypticorn/hive/client/models/__init__.py +2 -0
- crypticorn/hive/client/models/data_info.py +44 -12
- crypticorn/hive/client/models/data_version_info.py +89 -0
- crypticorn/hive/client/models/model.py +2 -3
- crypticorn/hive/client/models/target_info.py +94 -0
- crypticorn/hive/main.py +43 -2
- crypticorn/hive/utils.py +65 -0
- {crypticorn-2.5.3.dist-info → crypticorn-2.7.0.dist-info}/METADATA +2 -2
- {crypticorn-2.5.3.dist-info → crypticorn-2.7.0.dist-info}/RECORD +31 -26
- {crypticorn-2.5.3.dist-info → crypticorn-2.7.0.dist-info}/WHEEL +1 -1
- {crypticorn-2.5.3.dist-info → crypticorn-2.7.0.dist-info}/entry_points.txt +0 -0
- {crypticorn-2.5.3.dist-info → crypticorn-2.7.0.dist-info}/top_level.txt +0 -0
@@ -48,9 +48,10 @@ class DataApi:
|
|
48
48
|
version: Annotated[
|
49
49
|
Optional[DataVersion],
|
50
50
|
Field(description="Data version. Default is the latest public version."),
|
51
|
-
],
|
51
|
+
] = None,
|
52
52
|
feature_size: Annotated[
|
53
|
-
Optional[FeatureSize],
|
53
|
+
Optional[FeatureSize],
|
54
|
+
Field(description="The number of features in the data. Default is LARGE."),
|
54
55
|
] = None,
|
55
56
|
_request_timeout: Union[
|
56
57
|
None,
|
@@ -70,9 +71,9 @@ class DataApi:
|
|
70
71
|
|
71
72
|
:param model_id: Model ID (required)
|
72
73
|
:type model_id: int
|
73
|
-
:param version: Data version. Default is the latest public version.
|
74
|
+
:param version: Data version. Default is the latest public version.
|
74
75
|
:type version: DataVersion
|
75
|
-
:param feature_size:
|
76
|
+
:param feature_size: The number of features in the data. Default is LARGE.
|
76
77
|
:type feature_size: FeatureSize
|
77
78
|
:param _request_timeout: timeout setting for this request. If one
|
78
79
|
number provided, it will be total request
|
@@ -125,9 +126,10 @@ class DataApi:
|
|
125
126
|
version: Annotated[
|
126
127
|
Optional[DataVersion],
|
127
128
|
Field(description="Data version. Default is the latest public version."),
|
128
|
-
],
|
129
|
+
] = None,
|
129
130
|
feature_size: Annotated[
|
130
|
-
Optional[FeatureSize],
|
131
|
+
Optional[FeatureSize],
|
132
|
+
Field(description="The number of features in the data. Default is LARGE."),
|
131
133
|
] = None,
|
132
134
|
_request_timeout: Union[
|
133
135
|
None,
|
@@ -147,9 +149,9 @@ class DataApi:
|
|
147
149
|
|
148
150
|
:param model_id: Model ID (required)
|
149
151
|
:type model_id: int
|
150
|
-
:param version: Data version. Default is the latest public version.
|
152
|
+
:param version: Data version. Default is the latest public version.
|
151
153
|
:type version: DataVersion
|
152
|
-
:param feature_size:
|
154
|
+
:param feature_size: The number of features in the data. Default is LARGE.
|
153
155
|
:type feature_size: FeatureSize
|
154
156
|
:param _request_timeout: timeout setting for this request. If one
|
155
157
|
number provided, it will be total request
|
@@ -202,9 +204,10 @@ class DataApi:
|
|
202
204
|
version: Annotated[
|
203
205
|
Optional[DataVersion],
|
204
206
|
Field(description="Data version. Default is the latest public version."),
|
205
|
-
],
|
207
|
+
] = None,
|
206
208
|
feature_size: Annotated[
|
207
|
-
Optional[FeatureSize],
|
209
|
+
Optional[FeatureSize],
|
210
|
+
Field(description="The number of features in the data. Default is LARGE."),
|
208
211
|
] = None,
|
209
212
|
_request_timeout: Union[
|
210
213
|
None,
|
@@ -224,9 +227,9 @@ class DataApi:
|
|
224
227
|
|
225
228
|
:param model_id: Model ID (required)
|
226
229
|
:type model_id: int
|
227
|
-
:param version: Data version. Default is the latest public version.
|
230
|
+
:param version: Data version. Default is the latest public version.
|
228
231
|
:type version: DataVersion
|
229
|
-
:param feature_size:
|
232
|
+
:param feature_size: The number of features in the data. Default is LARGE.
|
230
233
|
:type feature_size: FeatureSize
|
231
234
|
:param _request_timeout: timeout setting for this request. If one
|
232
235
|
number provided, it will be total request
|
@@ -16,7 +16,7 @@ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
|
|
16
16
|
from typing import Any, Dict, List, Optional, Tuple, Union
|
17
17
|
from typing_extensions import Annotated
|
18
18
|
|
19
|
-
from pydantic import Field, StrictInt, StrictStr
|
19
|
+
from pydantic import Field, StrictBool, StrictInt, StrictStr
|
20
20
|
from typing import Any, List, Optional
|
21
21
|
from typing_extensions import Annotated
|
22
22
|
from crypticorn.hive.client.models.data_version import DataVersion
|
@@ -829,8 +829,9 @@ class ModelsApi:
|
|
829
829
|
)
|
830
830
|
|
831
831
|
@validate_call
|
832
|
-
async def
|
832
|
+
async def get_model(
|
833
833
|
self,
|
834
|
+
id: Annotated[StrictInt, Field(description="Model ID to get")],
|
834
835
|
_request_timeout: Union[
|
835
836
|
None,
|
836
837
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -842,11 +843,13 @@ class ModelsApi:
|
|
842
843
|
_content_type: Optional[StrictStr] = None,
|
843
844
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
844
845
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
845
|
-
) ->
|
846
|
-
"""Get
|
846
|
+
) -> Model:
|
847
|
+
"""Get Model
|
847
848
|
|
848
|
-
|
849
|
+
Get a model by ID
|
849
850
|
|
851
|
+
:param id: Model ID to get (required)
|
852
|
+
:type id: int
|
850
853
|
:param _request_timeout: timeout setting for this request. If one
|
851
854
|
number provided, it will be total request
|
852
855
|
timeout. It can also be a pair (tuple) of
|
@@ -869,7 +872,8 @@ class ModelsApi:
|
|
869
872
|
:return: Returns the result object.
|
870
873
|
""" # noqa: E501
|
871
874
|
|
872
|
-
_param = self.
|
875
|
+
_param = self._get_model_serialize(
|
876
|
+
id=id,
|
873
877
|
_request_auth=_request_auth,
|
874
878
|
_content_type=_content_type,
|
875
879
|
_headers=_headers,
|
@@ -877,7 +881,7 @@ class ModelsApi:
|
|
877
881
|
)
|
878
882
|
|
879
883
|
_response_types_map: Dict[str, Optional[str]] = {
|
880
|
-
"200": "
|
884
|
+
"200": "Model",
|
881
885
|
}
|
882
886
|
response_data = await self.api_client.call_api(
|
883
887
|
*_param, _request_timeout=_request_timeout
|
@@ -889,8 +893,9 @@ class ModelsApi:
|
|
889
893
|
).data
|
890
894
|
|
891
895
|
@validate_call
|
892
|
-
async def
|
896
|
+
async def get_model_with_http_info(
|
893
897
|
self,
|
898
|
+
id: Annotated[StrictInt, Field(description="Model ID to get")],
|
894
899
|
_request_timeout: Union[
|
895
900
|
None,
|
896
901
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -902,11 +907,13 @@ class ModelsApi:
|
|
902
907
|
_content_type: Optional[StrictStr] = None,
|
903
908
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
904
909
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
905
|
-
) -> ApiResponse[
|
906
|
-
"""Get
|
910
|
+
) -> ApiResponse[Model]:
|
911
|
+
"""Get Model
|
907
912
|
|
908
|
-
|
913
|
+
Get a model by ID
|
909
914
|
|
915
|
+
:param id: Model ID to get (required)
|
916
|
+
:type id: int
|
910
917
|
:param _request_timeout: timeout setting for this request. If one
|
911
918
|
number provided, it will be total request
|
912
919
|
timeout. It can also be a pair (tuple) of
|
@@ -929,7 +936,8 @@ class ModelsApi:
|
|
929
936
|
:return: Returns the result object.
|
930
937
|
""" # noqa: E501
|
931
938
|
|
932
|
-
_param = self.
|
939
|
+
_param = self._get_model_serialize(
|
940
|
+
id=id,
|
933
941
|
_request_auth=_request_auth,
|
934
942
|
_content_type=_content_type,
|
935
943
|
_headers=_headers,
|
@@ -937,7 +945,7 @@ class ModelsApi:
|
|
937
945
|
)
|
938
946
|
|
939
947
|
_response_types_map: Dict[str, Optional[str]] = {
|
940
|
-
"200": "
|
948
|
+
"200": "Model",
|
941
949
|
}
|
942
950
|
response_data = await self.api_client.call_api(
|
943
951
|
*_param, _request_timeout=_request_timeout
|
@@ -949,8 +957,9 @@ class ModelsApi:
|
|
949
957
|
)
|
950
958
|
|
951
959
|
@validate_call
|
952
|
-
async def
|
960
|
+
async def get_model_without_preload_content(
|
953
961
|
self,
|
962
|
+
id: Annotated[StrictInt, Field(description="Model ID to get")],
|
954
963
|
_request_timeout: Union[
|
955
964
|
None,
|
956
965
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -963,10 +972,12 @@ class ModelsApi:
|
|
963
972
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
964
973
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
965
974
|
) -> RESTResponseType:
|
966
|
-
"""Get
|
975
|
+
"""Get Model
|
967
976
|
|
968
|
-
|
977
|
+
Get a model by ID
|
969
978
|
|
979
|
+
:param id: Model ID to get (required)
|
980
|
+
:type id: int
|
970
981
|
:param _request_timeout: timeout setting for this request. If one
|
971
982
|
number provided, it will be total request
|
972
983
|
timeout. It can also be a pair (tuple) of
|
@@ -989,7 +1000,8 @@ class ModelsApi:
|
|
989
1000
|
:return: Returns the result object.
|
990
1001
|
""" # noqa: E501
|
991
1002
|
|
992
|
-
_param = self.
|
1003
|
+
_param = self._get_model_serialize(
|
1004
|
+
id=id,
|
993
1005
|
_request_auth=_request_auth,
|
994
1006
|
_content_type=_content_type,
|
995
1007
|
_headers=_headers,
|
@@ -997,15 +1009,16 @@ class ModelsApi:
|
|
997
1009
|
)
|
998
1010
|
|
999
1011
|
_response_types_map: Dict[str, Optional[str]] = {
|
1000
|
-
"200": "
|
1012
|
+
"200": "Model",
|
1001
1013
|
}
|
1002
1014
|
response_data = await self.api_client.call_api(
|
1003
1015
|
*_param, _request_timeout=_request_timeout
|
1004
1016
|
)
|
1005
1017
|
return response_data.response
|
1006
1018
|
|
1007
|
-
def
|
1019
|
+
def _get_model_serialize(
|
1008
1020
|
self,
|
1021
|
+
id,
|
1009
1022
|
_request_auth,
|
1010
1023
|
_content_type,
|
1011
1024
|
_headers,
|
@@ -1026,6 +1039,8 @@ class ModelsApi:
|
|
1026
1039
|
_body_params: Optional[bytes] = None
|
1027
1040
|
|
1028
1041
|
# process the path parameters
|
1042
|
+
if id is not None:
|
1043
|
+
_path_params["id"] = id
|
1029
1044
|
# process the query parameters
|
1030
1045
|
# process the header parameters
|
1031
1046
|
# process the form parameters
|
@@ -1042,7 +1057,7 @@ class ModelsApi:
|
|
1042
1057
|
|
1043
1058
|
return self.api_client.param_serialize(
|
1044
1059
|
method="GET",
|
1045
|
-
resource_path="/model/
|
1060
|
+
resource_path="/model/{id}",
|
1046
1061
|
path_params=_path_params,
|
1047
1062
|
query_params=_query_params,
|
1048
1063
|
header_params=_header_params,
|
@@ -1056,10 +1071,9 @@ class ModelsApi:
|
|
1056
1071
|
)
|
1057
1072
|
|
1058
1073
|
@validate_call
|
1059
|
-
async def
|
1074
|
+
async def get_model_by_name(
|
1060
1075
|
self,
|
1061
|
-
|
1062
|
-
name: Optional[StrictStr] = None,
|
1076
|
+
name: Annotated[StrictStr, Field(description="Model name to get")],
|
1063
1077
|
_request_timeout: Union[
|
1064
1078
|
None,
|
1065
1079
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1072,13 +1086,11 @@ class ModelsApi:
|
|
1072
1086
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1073
1087
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1074
1088
|
) -> Model:
|
1075
|
-
"""Get Model
|
1089
|
+
"""Get Model By Name
|
1076
1090
|
|
1077
|
-
Get a model by
|
1091
|
+
Get a model by name
|
1078
1092
|
|
1079
|
-
:param
|
1080
|
-
:type id: int
|
1081
|
-
:param name:
|
1093
|
+
:param name: Model name to get (required)
|
1082
1094
|
:type name: str
|
1083
1095
|
:param _request_timeout: timeout setting for this request. If one
|
1084
1096
|
number provided, it will be total request
|
@@ -1102,8 +1114,7 @@ class ModelsApi:
|
|
1102
1114
|
:return: Returns the result object.
|
1103
1115
|
""" # noqa: E501
|
1104
1116
|
|
1105
|
-
_param = self.
|
1106
|
-
id=id,
|
1117
|
+
_param = self._get_model_by_name_serialize(
|
1107
1118
|
name=name,
|
1108
1119
|
_request_auth=_request_auth,
|
1109
1120
|
_content_type=_content_type,
|
@@ -1124,10 +1135,9 @@ class ModelsApi:
|
|
1124
1135
|
).data
|
1125
1136
|
|
1126
1137
|
@validate_call
|
1127
|
-
async def
|
1138
|
+
async def get_model_by_name_with_http_info(
|
1128
1139
|
self,
|
1129
|
-
|
1130
|
-
name: Optional[StrictStr] = None,
|
1140
|
+
name: Annotated[StrictStr, Field(description="Model name to get")],
|
1131
1141
|
_request_timeout: Union[
|
1132
1142
|
None,
|
1133
1143
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1140,13 +1150,11 @@ class ModelsApi:
|
|
1140
1150
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1141
1151
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1142
1152
|
) -> ApiResponse[Model]:
|
1143
|
-
"""Get Model
|
1153
|
+
"""Get Model By Name
|
1144
1154
|
|
1145
|
-
Get a model by
|
1155
|
+
Get a model by name
|
1146
1156
|
|
1147
|
-
:param
|
1148
|
-
:type id: int
|
1149
|
-
:param name:
|
1157
|
+
:param name: Model name to get (required)
|
1150
1158
|
:type name: str
|
1151
1159
|
:param _request_timeout: timeout setting for this request. If one
|
1152
1160
|
number provided, it will be total request
|
@@ -1170,8 +1178,7 @@ class ModelsApi:
|
|
1170
1178
|
:return: Returns the result object.
|
1171
1179
|
""" # noqa: E501
|
1172
1180
|
|
1173
|
-
_param = self.
|
1174
|
-
id=id,
|
1181
|
+
_param = self._get_model_by_name_serialize(
|
1175
1182
|
name=name,
|
1176
1183
|
_request_auth=_request_auth,
|
1177
1184
|
_content_type=_content_type,
|
@@ -1192,10 +1199,9 @@ class ModelsApi:
|
|
1192
1199
|
)
|
1193
1200
|
|
1194
1201
|
@validate_call
|
1195
|
-
async def
|
1202
|
+
async def get_model_by_name_without_preload_content(
|
1196
1203
|
self,
|
1197
|
-
|
1198
|
-
name: Optional[StrictStr] = None,
|
1204
|
+
name: Annotated[StrictStr, Field(description="Model name to get")],
|
1199
1205
|
_request_timeout: Union[
|
1200
1206
|
None,
|
1201
1207
|
Annotated[StrictFloat, Field(gt=0)],
|
@@ -1208,13 +1214,11 @@ class ModelsApi:
|
|
1208
1214
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1209
1215
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1210
1216
|
) -> RESTResponseType:
|
1211
|
-
"""Get Model
|
1217
|
+
"""Get Model By Name
|
1212
1218
|
|
1213
|
-
Get a model by
|
1219
|
+
Get a model by name
|
1214
1220
|
|
1215
|
-
:param
|
1216
|
-
:type id: int
|
1217
|
-
:param name:
|
1221
|
+
:param name: Model name to get (required)
|
1218
1222
|
:type name: str
|
1219
1223
|
:param _request_timeout: timeout setting for this request. If one
|
1220
1224
|
number provided, it will be total request
|
@@ -1238,8 +1242,7 @@ class ModelsApi:
|
|
1238
1242
|
:return: Returns the result object.
|
1239
1243
|
""" # noqa: E501
|
1240
1244
|
|
1241
|
-
_param = self.
|
1242
|
-
id=id,
|
1245
|
+
_param = self._get_model_by_name_serialize(
|
1243
1246
|
name=name,
|
1244
1247
|
_request_auth=_request_auth,
|
1245
1248
|
_content_type=_content_type,
|
@@ -1255,9 +1258,8 @@ class ModelsApi:
|
|
1255
1258
|
)
|
1256
1259
|
return response_data.response
|
1257
1260
|
|
1258
|
-
def
|
1261
|
+
def _get_model_by_name_serialize(
|
1259
1262
|
self,
|
1260
|
-
id,
|
1261
1263
|
name,
|
1262
1264
|
_request_auth,
|
1263
1265
|
_content_type,
|
@@ -1279,14 +1281,299 @@ class ModelsApi:
|
|
1279
1281
|
_body_params: Optional[bytes] = None
|
1280
1282
|
|
1281
1283
|
# process the path parameters
|
1284
|
+
if name is not None:
|
1285
|
+
_path_params["name"] = name
|
1282
1286
|
# process the query parameters
|
1283
|
-
|
1287
|
+
# process the header parameters
|
1288
|
+
# process the form parameters
|
1289
|
+
# process the body parameter
|
1284
1290
|
|
1285
|
-
|
1291
|
+
# set the HTTP header `Accept`
|
1292
|
+
if "Accept" not in _header_params:
|
1293
|
+
_header_params["Accept"] = self.api_client.select_header_accept(
|
1294
|
+
["application/json"]
|
1295
|
+
)
|
1286
1296
|
|
1287
|
-
|
1297
|
+
# authentication setting
|
1298
|
+
_auth_settings: List[str] = ["APIKeyHeader", "HTTPBearer"]
|
1299
|
+
|
1300
|
+
return self.api_client.param_serialize(
|
1301
|
+
method="GET",
|
1302
|
+
resource_path="/model/by-name/{name}",
|
1303
|
+
path_params=_path_params,
|
1304
|
+
query_params=_query_params,
|
1305
|
+
header_params=_header_params,
|
1306
|
+
body=_body_params,
|
1307
|
+
post_params=_form_params,
|
1308
|
+
files=_files,
|
1309
|
+
auth_settings=_auth_settings,
|
1310
|
+
collection_formats=_collection_formats,
|
1311
|
+
_host=_host,
|
1312
|
+
_request_auth=_request_auth,
|
1313
|
+
)
|
1314
|
+
|
1315
|
+
@validate_call
|
1316
|
+
async def get_models(
|
1317
|
+
self,
|
1318
|
+
by_user: Annotated[
|
1319
|
+
Optional[StrictBool],
|
1320
|
+
Field(
|
1321
|
+
description="Whether to get models by user. Else all models are returned."
|
1322
|
+
),
|
1323
|
+
] = None,
|
1324
|
+
user_id: Annotated[
|
1325
|
+
Optional[StrictStr],
|
1326
|
+
Field(
|
1327
|
+
description="User ID to get models for. Only used if by_user is true. Default is current user."
|
1328
|
+
),
|
1329
|
+
] = None,
|
1330
|
+
_request_timeout: Union[
|
1331
|
+
None,
|
1332
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1333
|
+
Tuple[
|
1334
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1335
|
+
],
|
1336
|
+
] = None,
|
1337
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1338
|
+
_content_type: Optional[StrictStr] = None,
|
1339
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1340
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1341
|
+
) -> List[Model]:
|
1342
|
+
"""Get All Models
|
1343
|
+
|
1344
|
+
List all models
|
1345
|
+
|
1346
|
+
:param by_user: Whether to get models by user. Else all models are returned.
|
1347
|
+
:type by_user: bool
|
1348
|
+
:param user_id: User ID to get models for. Only used if by_user is true. Default is current user.
|
1349
|
+
:type user_id: str
|
1350
|
+
:param _request_timeout: timeout setting for this request. If one
|
1351
|
+
number provided, it will be total request
|
1352
|
+
timeout. It can also be a pair (tuple) of
|
1353
|
+
(connection, read) timeouts.
|
1354
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1355
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1356
|
+
request; this effectively ignores the
|
1357
|
+
authentication in the spec for a single request.
|
1358
|
+
:type _request_auth: dict, optional
|
1359
|
+
:param _content_type: force content-type for the request.
|
1360
|
+
:type _content_type: str, Optional
|
1361
|
+
:param _headers: set to override the headers for a single
|
1362
|
+
request; this effectively ignores the headers
|
1363
|
+
in the spec for a single request.
|
1364
|
+
:type _headers: dict, optional
|
1365
|
+
:param _host_index: set to override the host_index for a single
|
1366
|
+
request; this effectively ignores the host_index
|
1367
|
+
in the spec for a single request.
|
1368
|
+
:type _host_index: int, optional
|
1369
|
+
:return: Returns the result object.
|
1370
|
+
""" # noqa: E501
|
1371
|
+
|
1372
|
+
_param = self._get_models_serialize(
|
1373
|
+
by_user=by_user,
|
1374
|
+
user_id=user_id,
|
1375
|
+
_request_auth=_request_auth,
|
1376
|
+
_content_type=_content_type,
|
1377
|
+
_headers=_headers,
|
1378
|
+
_host_index=_host_index,
|
1379
|
+
)
|
1380
|
+
|
1381
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1382
|
+
"200": "List[Model]",
|
1383
|
+
}
|
1384
|
+
response_data = await self.api_client.call_api(
|
1385
|
+
*_param, _request_timeout=_request_timeout
|
1386
|
+
)
|
1387
|
+
await response_data.read()
|
1388
|
+
return self.api_client.response_deserialize(
|
1389
|
+
response_data=response_data,
|
1390
|
+
response_types_map=_response_types_map,
|
1391
|
+
).data
|
1392
|
+
|
1393
|
+
@validate_call
|
1394
|
+
async def get_models_with_http_info(
|
1395
|
+
self,
|
1396
|
+
by_user: Annotated[
|
1397
|
+
Optional[StrictBool],
|
1398
|
+
Field(
|
1399
|
+
description="Whether to get models by user. Else all models are returned."
|
1400
|
+
),
|
1401
|
+
] = None,
|
1402
|
+
user_id: Annotated[
|
1403
|
+
Optional[StrictStr],
|
1404
|
+
Field(
|
1405
|
+
description="User ID to get models for. Only used if by_user is true. Default is current user."
|
1406
|
+
),
|
1407
|
+
] = None,
|
1408
|
+
_request_timeout: Union[
|
1409
|
+
None,
|
1410
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1411
|
+
Tuple[
|
1412
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1413
|
+
],
|
1414
|
+
] = None,
|
1415
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1416
|
+
_content_type: Optional[StrictStr] = None,
|
1417
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1418
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1419
|
+
) -> ApiResponse[List[Model]]:
|
1420
|
+
"""Get All Models
|
1421
|
+
|
1422
|
+
List all models
|
1423
|
+
|
1424
|
+
:param by_user: Whether to get models by user. Else all models are returned.
|
1425
|
+
:type by_user: bool
|
1426
|
+
:param user_id: User ID to get models for. Only used if by_user is true. Default is current user.
|
1427
|
+
:type user_id: str
|
1428
|
+
:param _request_timeout: timeout setting for this request. If one
|
1429
|
+
number provided, it will be total request
|
1430
|
+
timeout. It can also be a pair (tuple) of
|
1431
|
+
(connection, read) timeouts.
|
1432
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1433
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1434
|
+
request; this effectively ignores the
|
1435
|
+
authentication in the spec for a single request.
|
1436
|
+
:type _request_auth: dict, optional
|
1437
|
+
:param _content_type: force content-type for the request.
|
1438
|
+
:type _content_type: str, Optional
|
1439
|
+
:param _headers: set to override the headers for a single
|
1440
|
+
request; this effectively ignores the headers
|
1441
|
+
in the spec for a single request.
|
1442
|
+
:type _headers: dict, optional
|
1443
|
+
:param _host_index: set to override the host_index for a single
|
1444
|
+
request; this effectively ignores the host_index
|
1445
|
+
in the spec for a single request.
|
1446
|
+
:type _host_index: int, optional
|
1447
|
+
:return: Returns the result object.
|
1448
|
+
""" # noqa: E501
|
1449
|
+
|
1450
|
+
_param = self._get_models_serialize(
|
1451
|
+
by_user=by_user,
|
1452
|
+
user_id=user_id,
|
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": "List[Model]",
|
1461
|
+
}
|
1462
|
+
response_data = await self.api_client.call_api(
|
1463
|
+
*_param, _request_timeout=_request_timeout
|
1464
|
+
)
|
1465
|
+
await response_data.read()
|
1466
|
+
return self.api_client.response_deserialize(
|
1467
|
+
response_data=response_data,
|
1468
|
+
response_types_map=_response_types_map,
|
1469
|
+
)
|
1470
|
+
|
1471
|
+
@validate_call
|
1472
|
+
async def get_models_without_preload_content(
|
1473
|
+
self,
|
1474
|
+
by_user: Annotated[
|
1475
|
+
Optional[StrictBool],
|
1476
|
+
Field(
|
1477
|
+
description="Whether to get models by user. Else all models are returned."
|
1478
|
+
),
|
1479
|
+
] = None,
|
1480
|
+
user_id: Annotated[
|
1481
|
+
Optional[StrictStr],
|
1482
|
+
Field(
|
1483
|
+
description="User ID to get models for. Only used if by_user is true. Default is current user."
|
1484
|
+
),
|
1485
|
+
] = None,
|
1486
|
+
_request_timeout: Union[
|
1487
|
+
None,
|
1488
|
+
Annotated[StrictFloat, Field(gt=0)],
|
1489
|
+
Tuple[
|
1490
|
+
Annotated[StrictFloat, Field(gt=0)], Annotated[StrictFloat, Field(gt=0)]
|
1491
|
+
],
|
1492
|
+
] = None,
|
1493
|
+
_request_auth: Optional[Dict[StrictStr, Any]] = None,
|
1494
|
+
_content_type: Optional[StrictStr] = None,
|
1495
|
+
_headers: Optional[Dict[StrictStr, Any]] = None,
|
1496
|
+
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
1497
|
+
) -> RESTResponseType:
|
1498
|
+
"""Get All Models
|
1499
|
+
|
1500
|
+
List all models
|
1501
|
+
|
1502
|
+
:param by_user: Whether to get models by user. Else all models are returned.
|
1503
|
+
:type by_user: bool
|
1504
|
+
:param user_id: User ID to get models for. Only used if by_user is true. Default is current user.
|
1505
|
+
:type user_id: str
|
1506
|
+
:param _request_timeout: timeout setting for this request. If one
|
1507
|
+
number provided, it will be total request
|
1508
|
+
timeout. It can also be a pair (tuple) of
|
1509
|
+
(connection, read) timeouts.
|
1510
|
+
:type _request_timeout: int, tuple(int, int), optional
|
1511
|
+
:param _request_auth: set to override the auth_settings for an a single
|
1512
|
+
request; this effectively ignores the
|
1513
|
+
authentication in the spec for a single request.
|
1514
|
+
:type _request_auth: dict, optional
|
1515
|
+
:param _content_type: force content-type for the request.
|
1516
|
+
:type _content_type: str, Optional
|
1517
|
+
:param _headers: set to override the headers for a single
|
1518
|
+
request; this effectively ignores the headers
|
1519
|
+
in the spec for a single request.
|
1520
|
+
:type _headers: dict, optional
|
1521
|
+
:param _host_index: set to override the host_index for a single
|
1522
|
+
request; this effectively ignores the host_index
|
1523
|
+
in the spec for a single request.
|
1524
|
+
:type _host_index: int, optional
|
1525
|
+
:return: Returns the result object.
|
1526
|
+
""" # noqa: E501
|
1527
|
+
|
1528
|
+
_param = self._get_models_serialize(
|
1529
|
+
by_user=by_user,
|
1530
|
+
user_id=user_id,
|
1531
|
+
_request_auth=_request_auth,
|
1532
|
+
_content_type=_content_type,
|
1533
|
+
_headers=_headers,
|
1534
|
+
_host_index=_host_index,
|
1535
|
+
)
|
1536
|
+
|
1537
|
+
_response_types_map: Dict[str, Optional[str]] = {
|
1538
|
+
"200": "List[Model]",
|
1539
|
+
}
|
1540
|
+
response_data = await self.api_client.call_api(
|
1541
|
+
*_param, _request_timeout=_request_timeout
|
1542
|
+
)
|
1543
|
+
return response_data.response
|
1544
|
+
|
1545
|
+
def _get_models_serialize(
|
1546
|
+
self,
|
1547
|
+
by_user,
|
1548
|
+
user_id,
|
1549
|
+
_request_auth,
|
1550
|
+
_content_type,
|
1551
|
+
_headers,
|
1552
|
+
_host_index,
|
1553
|
+
) -> RequestSerialized:
|
1554
|
+
|
1555
|
+
_host = None
|
1556
|
+
|
1557
|
+
_collection_formats: Dict[str, str] = {}
|
1558
|
+
|
1559
|
+
_path_params: Dict[str, str] = {}
|
1560
|
+
_query_params: List[Tuple[str, str]] = []
|
1561
|
+
_header_params: Dict[str, Optional[str]] = _headers or {}
|
1562
|
+
_form_params: List[Tuple[str, str]] = []
|
1563
|
+
_files: Dict[
|
1564
|
+
str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
|
1565
|
+
] = {}
|
1566
|
+
_body_params: Optional[bytes] = None
|
1567
|
+
|
1568
|
+
# process the path parameters
|
1569
|
+
# process the query parameters
|
1570
|
+
if by_user is not None:
|
1571
|
+
|
1572
|
+
_query_params.append(("by_user", by_user))
|
1573
|
+
|
1574
|
+
if user_id is not None:
|
1288
1575
|
|
1289
|
-
_query_params.append(("
|
1576
|
+
_query_params.append(("user_id", user_id))
|
1290
1577
|
|
1291
1578
|
# process the header parameters
|
1292
1579
|
# process the form parameters
|
@@ -21,6 +21,7 @@ from crypticorn.hive.client.models.data_value_value_value_inner import (
|
|
21
21
|
DataValueValueValueInner,
|
22
22
|
)
|
23
23
|
from crypticorn.hive.client.models.data_version import DataVersion
|
24
|
+
from crypticorn.hive.client.models.data_version_info import DataVersionInfo
|
24
25
|
from crypticorn.hive.client.models.download_links import DownloadLinks
|
25
26
|
from crypticorn.hive.client.models.evaluation import Evaluation
|
26
27
|
from crypticorn.hive.client.models.evaluation_response import EvaluationResponse
|
@@ -31,4 +32,5 @@ from crypticorn.hive.client.models.model_create import ModelCreate
|
|
31
32
|
from crypticorn.hive.client.models.model_status import ModelStatus
|
32
33
|
from crypticorn.hive.client.models.model_update import ModelUpdate
|
33
34
|
from crypticorn.hive.client.models.target import Target
|
35
|
+
from crypticorn.hive.client.models.target_info import TargetInfo
|
34
36
|
from crypticorn.hive.client.models.target_type import TargetType
|