revengai 1.85.0__py3-none-any.whl → 1.86.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.

Potentially problematic release.


This version of revengai might be problematic. Click here for more details.

revengai/__init__.py CHANGED
@@ -13,7 +13,7 @@
13
13
  """ # noqa: E501
14
14
 
15
15
 
16
- __version__ = "v1.85.0"
16
+ __version__ = "v1.86.0"
17
17
 
18
18
  # Define package exports
19
19
  __all__ = [
@@ -37,7 +37,6 @@ __all__ = [
37
37
  "FunctionsThreatScoreApi",
38
38
  "ModelsApi",
39
39
  "SearchApi",
40
- "V1Api",
41
40
  "ApiResponse",
42
41
  "ApiClient",
43
42
  "Configuration",
@@ -376,7 +375,6 @@ from revengai.api.functions_renaming_history_api import FunctionsRenamingHistory
376
375
  from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi as FunctionsThreatScoreApi
377
376
  from revengai.api.models_api import ModelsApi as ModelsApi
378
377
  from revengai.api.search_api import SearchApi as SearchApi
379
- from revengai.api.v1_api import V1Api as V1Api
380
378
 
381
379
  # import ApiClient
382
380
  from revengai.api_response import ApiResponse as ApiResponse
revengai/api/__init__.py CHANGED
@@ -21,5 +21,4 @@ from revengai.api.functions_renaming_history_api import FunctionsRenamingHistory
21
21
  from revengai.api.functions_threat_score_api import FunctionsThreatScoreApi
22
22
  from revengai.api.models_api import ModelsApi
23
23
  from revengai.api.search_api import SearchApi
24
- from revengai.api.v1_api import V1Api
25
24
 
@@ -21,6 +21,7 @@ from typing_extensions import Annotated
21
21
  from revengai.models.analysis_create_request import AnalysisCreateRequest
22
22
  from revengai.models.analysis_update_request import AnalysisUpdateRequest
23
23
  from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
24
+ from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
24
25
  from revengai.models.app_api_rest_v2_analyses_enums_order_by import AppApiRestV2AnalysesEnumsOrderBy
25
26
  from revengai.models.app_api_rest_v2_similarity_schema_ann_function import AppApiRestV2SimilaritySchemaANNFunction
26
27
  from revengai.models.base_response_analysis_create_response import BaseResponseAnalysisCreateResponse
@@ -39,6 +40,7 @@ from revengai.models.base_response_status import BaseResponseStatus
39
40
  from revengai.models.base_response_upload_response import BaseResponseUploadResponse
40
41
  from revengai.models.binary_ann_form import BinaryAnnForm
41
42
  from revengai.models.dynamic_execution_status_input import DynamicExecutionStatusInput
43
+ from revengai.models.function_batch_ann import FunctionBatchAnn
42
44
  from revengai.models.model_name import ModelName
43
45
  from revengai.models.order import Order
44
46
  from revengai.models.re_analysis_form import ReAnalysisForm
@@ -64,6 +66,298 @@ class AnalysesCoreApi:
64
66
  self.api_client = api_client
65
67
 
66
68
 
69
+ @validate_call
70
+ def batch_symbol_ann(
71
+ self,
72
+ app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
73
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
74
+ _request_timeout: Union[
75
+ None,
76
+ Annotated[StrictFloat, Field(gt=0)],
77
+ Tuple[
78
+ Annotated[StrictFloat, Field(gt=0)],
79
+ Annotated[StrictFloat, Field(gt=0)]
80
+ ]
81
+ ] = None,
82
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
83
+ _content_type: Optional[StrictStr] = None,
84
+ _headers: Optional[Dict[StrictStr, Any]] = None,
85
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
86
+ ) -> FunctionBatchAnn:
87
+ """Batch Symbol ANN using function IDs
88
+
89
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
90
+
91
+ :param app_api_rest_v1_ann_schema_ann_function: (required)
92
+ :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
93
+ :param authorization: API Key bearer token
94
+ :type authorization: str
95
+ :param _request_timeout: timeout setting for this request. If one
96
+ number provided, it will be total request
97
+ timeout. It can also be a pair (tuple) of
98
+ (connection, read) timeouts.
99
+ :type _request_timeout: int, tuple(int, int), optional
100
+ :param _request_auth: set to override the auth_settings for an a single
101
+ request; this effectively ignores the
102
+ authentication in the spec for a single request.
103
+ :type _request_auth: dict, optional
104
+ :param _content_type: force content-type for the request.
105
+ :type _content_type: str, Optional
106
+ :param _headers: set to override the headers for a single
107
+ request; this effectively ignores the headers
108
+ in the spec for a single request.
109
+ :type _headers: dict, optional
110
+ :param _host_index: set to override the host_index for a single
111
+ request; this effectively ignores the host_index
112
+ in the spec for a single request.
113
+ :type _host_index: int, optional
114
+ :return: Returns the result object.
115
+ """ # noqa: E501
116
+
117
+ _param = self._batch_symbol_ann_serialize(
118
+ app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
119
+ authorization=authorization,
120
+ _request_auth=_request_auth,
121
+ _content_type=_content_type,
122
+ _headers=_headers,
123
+ _host_index=_host_index
124
+ )
125
+
126
+ _response_types_map: Dict[str, Optional[str]] = {
127
+ '200': "FunctionBatchAnn",
128
+ '422': "BaseResponse",
129
+ }
130
+ response_data = self.api_client.call_api(
131
+ *_param,
132
+ _request_timeout=_request_timeout
133
+ )
134
+ response_data.read()
135
+ return self.api_client.response_deserialize(
136
+ response_data=response_data,
137
+ response_types_map=_response_types_map,
138
+ ).data
139
+
140
+
141
+ @validate_call
142
+ def batch_symbol_ann_with_http_info(
143
+ self,
144
+ app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
145
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
146
+ _request_timeout: Union[
147
+ None,
148
+ Annotated[StrictFloat, Field(gt=0)],
149
+ Tuple[
150
+ Annotated[StrictFloat, Field(gt=0)],
151
+ Annotated[StrictFloat, Field(gt=0)]
152
+ ]
153
+ ] = None,
154
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
155
+ _content_type: Optional[StrictStr] = None,
156
+ _headers: Optional[Dict[StrictStr, Any]] = None,
157
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
158
+ ) -> ApiResponse[FunctionBatchAnn]:
159
+ """Batch Symbol ANN using function IDs
160
+
161
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
162
+
163
+ :param app_api_rest_v1_ann_schema_ann_function: (required)
164
+ :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
165
+ :param authorization: API Key bearer token
166
+ :type authorization: str
167
+ :param _request_timeout: timeout setting for this request. If one
168
+ number provided, it will be total request
169
+ timeout. It can also be a pair (tuple) of
170
+ (connection, read) timeouts.
171
+ :type _request_timeout: int, tuple(int, int), optional
172
+ :param _request_auth: set to override the auth_settings for an a single
173
+ request; this effectively ignores the
174
+ authentication in the spec for a single request.
175
+ :type _request_auth: dict, optional
176
+ :param _content_type: force content-type for the request.
177
+ :type _content_type: str, Optional
178
+ :param _headers: set to override the headers for a single
179
+ request; this effectively ignores the headers
180
+ in the spec for a single request.
181
+ :type _headers: dict, optional
182
+ :param _host_index: set to override the host_index for a single
183
+ request; this effectively ignores the host_index
184
+ in the spec for a single request.
185
+ :type _host_index: int, optional
186
+ :return: Returns the result object.
187
+ """ # noqa: E501
188
+
189
+ _param = self._batch_symbol_ann_serialize(
190
+ app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
191
+ authorization=authorization,
192
+ _request_auth=_request_auth,
193
+ _content_type=_content_type,
194
+ _headers=_headers,
195
+ _host_index=_host_index
196
+ )
197
+
198
+ _response_types_map: Dict[str, Optional[str]] = {
199
+ '200': "FunctionBatchAnn",
200
+ '422': "BaseResponse",
201
+ }
202
+ response_data = self.api_client.call_api(
203
+ *_param,
204
+ _request_timeout=_request_timeout
205
+ )
206
+ response_data.read()
207
+ return self.api_client.response_deserialize(
208
+ response_data=response_data,
209
+ response_types_map=_response_types_map,
210
+ )
211
+
212
+
213
+ @validate_call
214
+ def batch_symbol_ann_without_preload_content(
215
+ self,
216
+ app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
217
+ authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
218
+ _request_timeout: Union[
219
+ None,
220
+ Annotated[StrictFloat, Field(gt=0)],
221
+ Tuple[
222
+ Annotated[StrictFloat, Field(gt=0)],
223
+ Annotated[StrictFloat, Field(gt=0)]
224
+ ]
225
+ ] = None,
226
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
227
+ _content_type: Optional[StrictStr] = None,
228
+ _headers: Optional[Dict[StrictStr, Any]] = None,
229
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
230
+ ) -> RESTResponseType:
231
+ """Batch Symbol ANN using function IDs
232
+
233
+ Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
234
+
235
+ :param app_api_rest_v1_ann_schema_ann_function: (required)
236
+ :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
237
+ :param authorization: API Key bearer token
238
+ :type authorization: str
239
+ :param _request_timeout: timeout setting for this request. If one
240
+ number provided, it will be total request
241
+ timeout. It can also be a pair (tuple) of
242
+ (connection, read) timeouts.
243
+ :type _request_timeout: int, tuple(int, int), optional
244
+ :param _request_auth: set to override the auth_settings for an a single
245
+ request; this effectively ignores the
246
+ authentication in the spec for a single request.
247
+ :type _request_auth: dict, optional
248
+ :param _content_type: force content-type for the request.
249
+ :type _content_type: str, Optional
250
+ :param _headers: set to override the headers for a single
251
+ request; this effectively ignores the headers
252
+ in the spec for a single request.
253
+ :type _headers: dict, optional
254
+ :param _host_index: set to override the host_index for a single
255
+ request; this effectively ignores the host_index
256
+ in the spec for a single request.
257
+ :type _host_index: int, optional
258
+ :return: Returns the result object.
259
+ """ # noqa: E501
260
+
261
+ _param = self._batch_symbol_ann_serialize(
262
+ app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
263
+ authorization=authorization,
264
+ _request_auth=_request_auth,
265
+ _content_type=_content_type,
266
+ _headers=_headers,
267
+ _host_index=_host_index
268
+ )
269
+
270
+ _response_types_map: Dict[str, Optional[str]] = {
271
+ '200': "FunctionBatchAnn",
272
+ '422': "BaseResponse",
273
+ }
274
+ response_data = self.api_client.call_api(
275
+ *_param,
276
+ _request_timeout=_request_timeout
277
+ )
278
+ return response_data.response
279
+
280
+
281
+ def _batch_symbol_ann_serialize(
282
+ self,
283
+ app_api_rest_v1_ann_schema_ann_function,
284
+ authorization,
285
+ _request_auth,
286
+ _content_type,
287
+ _headers,
288
+ _host_index,
289
+ ) -> RequestSerialized:
290
+
291
+ _host = None
292
+
293
+ _collection_formats: Dict[str, str] = {
294
+ }
295
+
296
+ _path_params: Dict[str, str] = {}
297
+ _query_params: List[Tuple[str, str]] = []
298
+ _header_params: Dict[str, Optional[str]] = _headers or {}
299
+ _form_params: List[Tuple[str, str]] = []
300
+ _files: Dict[
301
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
302
+ ] = {}
303
+ _body_params: Optional[bytes] = None
304
+
305
+ # process the path parameters
306
+ # process the query parameters
307
+ # process the header parameters
308
+ if authorization is not None:
309
+ _header_params['authorization'] = authorization
310
+ # process the form parameters
311
+ # process the body parameter
312
+ if app_api_rest_v1_ann_schema_ann_function is not None:
313
+ _body_params = app_api_rest_v1_ann_schema_ann_function
314
+
315
+
316
+ # set the HTTP header `Accept`
317
+ if 'Accept' not in _header_params:
318
+ _header_params['Accept'] = self.api_client.select_header_accept(
319
+ [
320
+ 'application/json'
321
+ ]
322
+ )
323
+
324
+ # set the HTTP header `Content-Type`
325
+ if _content_type:
326
+ _header_params['Content-Type'] = _content_type
327
+ else:
328
+ _default_content_type = (
329
+ self.api_client.select_header_content_type(
330
+ [
331
+ 'application/json'
332
+ ]
333
+ )
334
+ )
335
+ if _default_content_type is not None:
336
+ _header_params['Content-Type'] = _default_content_type
337
+
338
+ # authentication setting
339
+ _auth_settings: List[str] = [
340
+ 'APIKey'
341
+ ]
342
+
343
+ return self.api_client.param_serialize(
344
+ method='POST',
345
+ resource_path='/v1/ann/symbol/batch',
346
+ path_params=_path_params,
347
+ query_params=_query_params,
348
+ header_params=_header_params,
349
+ body=_body_params,
350
+ post_params=_form_params,
351
+ files=_files,
352
+ auth_settings=_auth_settings,
353
+ collection_formats=_collection_formats,
354
+ _host=_host,
355
+ _request_auth=_request_auth
356
+ )
357
+
358
+
359
+
360
+
67
361
  @validate_call
68
362
  def create_analysis(
69
363
  self,
revengai/api_client.py CHANGED
@@ -90,7 +90,7 @@ class ApiClient:
90
90
  self.default_headers[header_name] = header_value
91
91
  self.cookie = cookie
92
92
  # Set default User-Agent.
93
- self.user_agent = 'OpenAPI-Generator/v1.85.0/python'
93
+ self.user_agent = 'OpenAPI-Generator/v1.86.0/python'
94
94
  self.client_side_validation = configuration.client_side_validation
95
95
 
96
96
  def __enter__(self):
revengai/configuration.py CHANGED
@@ -529,8 +529,8 @@ conf = revengai.Configuration(
529
529
  return "Python SDK Debug Report:\n"\
530
530
  "OS: {env}\n"\
531
531
  "Python Version: {pyversion}\n"\
532
- "Version of the API: v1.85.0\n"\
533
- "SDK Package Version: v1.85.0".\
532
+ "Version of the API: v1.86.0\n"\
533
+ "SDK Package Version: v1.86.0".\
534
534
  format(env=sys.platform, pyversion=sys.version)
535
535
 
536
536
  def get_host_settings(self) -> List[HostSetting]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: revengai
3
- Version: 1.85.0
3
+ Version: 1.86.0
4
4
  Summary: RevEng.AI API
5
5
  Project-URL: Repository, https://github.com/RevEngAI/revengai-python
6
6
  Keywords: RevEng.AI API
@@ -59,6 +59,7 @@ Class | Method | HTTP request | Description
59
59
  *AnalysesCommentsApi* | [**delete_analysis_comment**](docs/AnalysesCommentsApi.md#delete_analysis_comment) | **DELETE** /v2/analyses/{analysis_id}/comments/{comment_id} | Delete a comment
60
60
  *AnalysesCommentsApi* | [**get_analysis_comments**](docs/AnalysesCommentsApi.md#get_analysis_comments) | **GET** /v2/analyses/{analysis_id}/comments | Get comments for this analysis
61
61
  *AnalysesCommentsApi* | [**update_analysis_comment**](docs/AnalysesCommentsApi.md#update_analysis_comment) | **PATCH** /v2/analyses/{analysis_id}/comments/{comment_id} | Update a comment
62
+ *AnalysesCoreApi* | [**batch_symbol_ann**](docs/AnalysesCoreApi.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
62
63
  *AnalysesCoreApi* | [**create_analysis**](docs/AnalysesCoreApi.md#create_analysis) | **POST** /v2/analyses | Create Analysis
63
64
  *AnalysesCoreApi* | [**delete_analysis**](docs/AnalysesCoreApi.md#delete_analysis) | **DELETE** /v2/analyses/{analysis_id} | Delete Analysis
64
65
  *AnalysesCoreApi* | [**find_similar_functions_batch**](docs/AnalysesCoreApi.md#find_similar_functions_batch) | **POST** /v2/analyses/{analysis_id}/similarity/functions | Batch Symbol ANN using Analysis ID
@@ -169,7 +170,6 @@ Class | Method | HTTP request | Description
169
170
  *SearchApi* | [**search_collections**](docs/SearchApi.md#search_collections) | **GET** /v2/search/collections | Collections search
170
171
  *SearchApi* | [**search_functions**](docs/SearchApi.md#search_functions) | **GET** /v2/search/functions | Functions search
171
172
  *SearchApi* | [**search_tags**](docs/SearchApi.md#search_tags) | **GET** /v2/search/tags | Tags search
172
- *V1Api* | [**batch_symbol_ann**](docs/V1Api.md#batch_symbol_ann) | **POST** /v1/ann/symbol/batch | Batch Symbol ANN using function IDs
173
173
 
174
174
 
175
175
  ## Documentation For Models
@@ -1,13 +1,13 @@
1
- revengai/__init__.py,sha256=PC0qsp-xovTuno-1xEpQ6fLMIL60yi1UwtkTWWif48w,43237
2
- revengai/api_client.py,sha256=J1pGmZsFtjoBi2WM8W_6w6xIFGN_Z1qu9xpi-gphLKY,27670
1
+ revengai/__init__.py,sha256=b9yuw2wu9iVAcq2az2XMIZ2GmkNor0YpHo5MyGTEGXQ,43177
2
+ revengai/api_client.py,sha256=cRVOtlFvWH5sI5QAIgcynvjGFRgkElhUXk2wjUmHEp8,27670
3
3
  revengai/api_response.py,sha256=eMxw1mpmJcoGZ3gs9z6jM4oYoZ10Gjk333s9sKxGv7s,652
4
- revengai/configuration.py,sha256=4PS822_qFlTBXp4bt-Ck3O0cZaXPdSSOOc2kLCLlkcA,18749
4
+ revengai/configuration.py,sha256=FB2PWD1OL9-rdvsh9iWLocTnlyATo6df5qiEzPovqpE,18749
5
5
  revengai/exceptions.py,sha256=IvdI9ZIZ9b2lSSKtIKMQDlG-5UPAedrjm3U4xfmGkso,6385
6
6
  revengai/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  revengai/rest.py,sha256=T6Q2dcazhntqm288H33BKC1hf8NVdvmQWgaymlJo158,9376
8
- revengai/api/__init__.py,sha256=ouKXi3c7Z-a9BtW-WbThk2Tspt6o5rnyLY65DWGiTf0,1434
8
+ revengai/api/__init__.py,sha256=KS_1v_pNTcR2cIzEuwGEFq0f_-HmC6aGSgb1qaq2k90,1396
9
9
  revengai/api/analyses_comments_api.py,sha256=L6NuM8bS3NJRt1b3WKdnZlYVE0YgdcZivNwGuQe5Gb4,49575
10
- revengai/api/analyses_core_api.py,sha256=RZsIrHfm0skMUEYHKiUea7vLYVBbd1G7ghuzMTnppKE,185121
10
+ revengai/api/analyses_core_api.py,sha256=NepmPQlWZ2YnBpAPHoK0rXjvsgw6lWjghaJWd8v-Sk0,197484
11
11
  revengai/api/analyses_dynamic_execution_api.py,sha256=4vNnupRsuwNVNk7cPa-VFx2nnLtrokJpHu4YUOPwX_o,77682
12
12
  revengai/api/analyses_results_metadata_api.py,sha256=NlwPugWgnvFLcth_p4DRk8kwBk76offi7y9zxHL5mxk,90181
13
13
  revengai/api/analyses_security_checks_api.py,sha256=b1phfsLDO2kvmLaYtGjMVUkHUhRp63EEN3aJvTyX16o,35691
@@ -26,7 +26,6 @@ revengai/api/functions_renaming_history_api.py,sha256=L2CDadLnZrA0oNxhJfTSLLiMDz
26
26
  revengai/api/functions_threat_score_api.py,sha256=RYbCaX71r2ssv7VxUrcezT8dSdU5K5ipHD6yR592k6I,23867
27
27
  revengai/api/models_api.py,sha256=bqukeUMctErkaX5mH8Rm3iPKEHQOCx-JT-P8_KV_iP8,11319
28
28
  revengai/api/search_api.py,sha256=Kzo7KfP4nY1-YsoCHxVOQm3Vn89kFjcnUV7oNdaw5z0,65835
29
- revengai/api/v1_api.py,sha256=YblSm_5lTCdcW_Gtsx9HOVBNRRYv0XBDf25YbHo3-GE,13671
30
29
  revengai/models/__init__.py,sha256=A40qaEs21K8MhzEhH-IEdR3ZnKRzpJkN9_yj-pYnH7I,23238
31
30
  revengai/models/addr.py,sha256=-2N-UQsOiZ0eyEAQ7ssk0of8W2fBrXeYdTZXuVt3SZs,4787
32
31
  revengai/models/ai_decompilation_rating.py,sha256=gyay27QJwToUNtK9NARyw731Sg8GFRTufGGUABVYyfo,722
@@ -334,6 +333,6 @@ revengai/models/vulnerabilities.py,sha256=9t6uoZd3svWyfcZJjmj6zP731Dp47Apb25y8Qt
334
333
  revengai/models/vulnerability.py,sha256=P7rAOAYU5JLLpcRr824-YJgZba5kPb_J9ALV3tSNfLQ,3688
335
334
  revengai/models/vulnerability_type.py,sha256=SyOgfMmELYYc_H84oPkikBpjwngtG5Qw9Q_86a2TPr8,866
336
335
  revengai/models/workspace.py,sha256=chjU62GFvByEmaNd6luMNQVQLP3wlPx1zJgGJ_yyMLA,676
337
- revengai-1.85.0.dist-info/METADATA,sha256=aujkpswxjk1tP3LIN_hl8nfV9jahsm1GVbjDA-fUL9E,41550
338
- revengai-1.85.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
339
- revengai-1.85.0.dist-info/RECORD,,
336
+ revengai-1.86.0.dist-info/METADATA,sha256=NDWb-sx3_UK__alTKD37NVQr7GSWhTeeA0FB5WI8om8,41570
337
+ revengai-1.86.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
338
+ revengai-1.86.0.dist-info/RECORD,,
revengai/api/v1_api.py DELETED
@@ -1,334 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- RevEng.AI API
5
-
6
- RevEng.AI is Similarity Search Engine for executable binaries
7
-
8
- Generated by OpenAPI Generator (https://openapi-generator.tech)
9
-
10
- Do not edit the class manually.
11
- """ # noqa: E501
12
-
13
- import warnings
14
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
15
- from typing import Any, Dict, List, Optional, Tuple, Union
16
- from typing_extensions import Annotated
17
-
18
- from pydantic import Field, StrictStr
19
- from typing import Optional
20
- from typing_extensions import Annotated
21
- from revengai.models.app_api_rest_v1_ann_schema_ann_function import AppApiRestV1AnnSchemaANNFunction
22
- from revengai.models.function_batch_ann import FunctionBatchAnn
23
-
24
- from revengai.api_client import ApiClient, RequestSerialized
25
- from revengai.api_response import ApiResponse
26
- from revengai.rest import RESTResponseType
27
-
28
-
29
- class V1Api:
30
- """NOTE: This class is auto generated by OpenAPI Generator
31
- Ref: https://openapi-generator.tech
32
-
33
- Do not edit the class manually.
34
- """
35
-
36
- def __init__(self, api_client=None) -> None:
37
- if api_client is None:
38
- api_client = ApiClient.get_default()
39
- self.api_client = api_client
40
-
41
-
42
- @validate_call
43
- def batch_symbol_ann(
44
- self,
45
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
46
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
47
- _request_timeout: Union[
48
- None,
49
- Annotated[StrictFloat, Field(gt=0)],
50
- Tuple[
51
- Annotated[StrictFloat, Field(gt=0)],
52
- Annotated[StrictFloat, Field(gt=0)]
53
- ]
54
- ] = None,
55
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
56
- _content_type: Optional[StrictStr] = None,
57
- _headers: Optional[Dict[StrictStr, Any]] = None,
58
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
59
- ) -> FunctionBatchAnn:
60
- """(Deprecated) Batch Symbol ANN using function IDs
61
-
62
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
63
-
64
- :param app_api_rest_v1_ann_schema_ann_function: (required)
65
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
66
- :param authorization: API Key bearer token
67
- :type authorization: str
68
- :param _request_timeout: timeout setting for this request. If one
69
- number provided, it will be total request
70
- timeout. It can also be a pair (tuple) of
71
- (connection, read) timeouts.
72
- :type _request_timeout: int, tuple(int, int), optional
73
- :param _request_auth: set to override the auth_settings for an a single
74
- request; this effectively ignores the
75
- authentication in the spec for a single request.
76
- :type _request_auth: dict, optional
77
- :param _content_type: force content-type for the request.
78
- :type _content_type: str, Optional
79
- :param _headers: set to override the headers for a single
80
- request; this effectively ignores the headers
81
- in the spec for a single request.
82
- :type _headers: dict, optional
83
- :param _host_index: set to override the host_index for a single
84
- request; this effectively ignores the host_index
85
- in the spec for a single request.
86
- :type _host_index: int, optional
87
- :return: Returns the result object.
88
- """ # noqa: E501
89
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
90
-
91
- _param = self._batch_symbol_ann_serialize(
92
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
93
- authorization=authorization,
94
- _request_auth=_request_auth,
95
- _content_type=_content_type,
96
- _headers=_headers,
97
- _host_index=_host_index
98
- )
99
-
100
- _response_types_map: Dict[str, Optional[str]] = {
101
- '200': "FunctionBatchAnn",
102
- '422': "BaseResponse",
103
- }
104
- response_data = self.api_client.call_api(
105
- *_param,
106
- _request_timeout=_request_timeout
107
- )
108
- 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
-
115
- @validate_call
116
- def batch_symbol_ann_with_http_info(
117
- self,
118
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
119
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
120
- _request_timeout: Union[
121
- None,
122
- Annotated[StrictFloat, Field(gt=0)],
123
- Tuple[
124
- Annotated[StrictFloat, Field(gt=0)],
125
- Annotated[StrictFloat, Field(gt=0)]
126
- ]
127
- ] = None,
128
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
129
- _content_type: Optional[StrictStr] = None,
130
- _headers: Optional[Dict[StrictStr, Any]] = None,
131
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
132
- ) -> ApiResponse[FunctionBatchAnn]:
133
- """(Deprecated) Batch Symbol ANN using function IDs
134
-
135
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
136
-
137
- :param app_api_rest_v1_ann_schema_ann_function: (required)
138
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
139
- :param authorization: API Key bearer token
140
- :type authorization: str
141
- :param _request_timeout: timeout setting for this request. If one
142
- number provided, it will be total request
143
- timeout. It can also be a pair (tuple) of
144
- (connection, read) timeouts.
145
- :type _request_timeout: int, tuple(int, int), optional
146
- :param _request_auth: set to override the auth_settings for an a single
147
- request; this effectively ignores the
148
- authentication in the spec for a single request.
149
- :type _request_auth: dict, optional
150
- :param _content_type: force content-type for the request.
151
- :type _content_type: str, Optional
152
- :param _headers: set to override the headers for a single
153
- request; this effectively ignores the headers
154
- in the spec for a single request.
155
- :type _headers: dict, optional
156
- :param _host_index: set to override the host_index for a single
157
- request; this effectively ignores the host_index
158
- in the spec for a single request.
159
- :type _host_index: int, optional
160
- :return: Returns the result object.
161
- """ # noqa: E501
162
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
163
-
164
- _param = self._batch_symbol_ann_serialize(
165
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
166
- authorization=authorization,
167
- _request_auth=_request_auth,
168
- _content_type=_content_type,
169
- _headers=_headers,
170
- _host_index=_host_index
171
- )
172
-
173
- _response_types_map: Dict[str, Optional[str]] = {
174
- '200': "FunctionBatchAnn",
175
- '422': "BaseResponse",
176
- }
177
- response_data = self.api_client.call_api(
178
- *_param,
179
- _request_timeout=_request_timeout
180
- )
181
- response_data.read()
182
- return self.api_client.response_deserialize(
183
- response_data=response_data,
184
- response_types_map=_response_types_map,
185
- )
186
-
187
-
188
- @validate_call
189
- def batch_symbol_ann_without_preload_content(
190
- self,
191
- app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction,
192
- authorization: Annotated[Optional[StrictStr], Field(description="API Key bearer token")] = None,
193
- _request_timeout: Union[
194
- None,
195
- Annotated[StrictFloat, Field(gt=0)],
196
- Tuple[
197
- Annotated[StrictFloat, Field(gt=0)],
198
- Annotated[StrictFloat, Field(gt=0)]
199
- ]
200
- ] = None,
201
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
202
- _content_type: Optional[StrictStr] = None,
203
- _headers: Optional[Dict[StrictStr, Any]] = None,
204
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
205
- ) -> RESTResponseType:
206
- """(Deprecated) Batch Symbol ANN using function IDs
207
-
208
- Takes in an input of functions ID's and settings and finds the nearest functions for each function that's within the database
209
-
210
- :param app_api_rest_v1_ann_schema_ann_function: (required)
211
- :type app_api_rest_v1_ann_schema_ann_function: AppApiRestV1AnnSchemaANNFunction
212
- :param authorization: API Key bearer token
213
- :type authorization: str
214
- :param _request_timeout: timeout setting for this request. If one
215
- number provided, it will be total request
216
- timeout. It can also be a pair (tuple) of
217
- (connection, read) timeouts.
218
- :type _request_timeout: int, tuple(int, int), optional
219
- :param _request_auth: set to override the auth_settings for an a single
220
- request; this effectively ignores the
221
- authentication in the spec for a single request.
222
- :type _request_auth: dict, optional
223
- :param _content_type: force content-type for the request.
224
- :type _content_type: str, Optional
225
- :param _headers: set to override the headers for a single
226
- request; this effectively ignores the headers
227
- in the spec for a single request.
228
- :type _headers: dict, optional
229
- :param _host_index: set to override the host_index for a single
230
- request; this effectively ignores the host_index
231
- in the spec for a single request.
232
- :type _host_index: int, optional
233
- :return: Returns the result object.
234
- """ # noqa: E501
235
- warnings.warn("POST /v1/ann/symbol/batch is deprecated.", DeprecationWarning)
236
-
237
- _param = self._batch_symbol_ann_serialize(
238
- app_api_rest_v1_ann_schema_ann_function=app_api_rest_v1_ann_schema_ann_function,
239
- authorization=authorization,
240
- _request_auth=_request_auth,
241
- _content_type=_content_type,
242
- _headers=_headers,
243
- _host_index=_host_index
244
- )
245
-
246
- _response_types_map: Dict[str, Optional[str]] = {
247
- '200': "FunctionBatchAnn",
248
- '422': "BaseResponse",
249
- }
250
- response_data = self.api_client.call_api(
251
- *_param,
252
- _request_timeout=_request_timeout
253
- )
254
- return response_data.response
255
-
256
-
257
- def _batch_symbol_ann_serialize(
258
- self,
259
- app_api_rest_v1_ann_schema_ann_function,
260
- authorization,
261
- _request_auth,
262
- _content_type,
263
- _headers,
264
- _host_index,
265
- ) -> RequestSerialized:
266
-
267
- _host = None
268
-
269
- _collection_formats: Dict[str, str] = {
270
- }
271
-
272
- _path_params: Dict[str, str] = {}
273
- _query_params: List[Tuple[str, str]] = []
274
- _header_params: Dict[str, Optional[str]] = _headers or {}
275
- _form_params: List[Tuple[str, str]] = []
276
- _files: Dict[
277
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
278
- ] = {}
279
- _body_params: Optional[bytes] = None
280
-
281
- # process the path parameters
282
- # process the query parameters
283
- # process the header parameters
284
- if authorization is not None:
285
- _header_params['authorization'] = authorization
286
- # process the form parameters
287
- # process the body parameter
288
- if app_api_rest_v1_ann_schema_ann_function is not None:
289
- _body_params = app_api_rest_v1_ann_schema_ann_function
290
-
291
-
292
- # set the HTTP header `Accept`
293
- if 'Accept' not in _header_params:
294
- _header_params['Accept'] = self.api_client.select_header_accept(
295
- [
296
- 'application/json'
297
- ]
298
- )
299
-
300
- # set the HTTP header `Content-Type`
301
- if _content_type:
302
- _header_params['Content-Type'] = _content_type
303
- else:
304
- _default_content_type = (
305
- self.api_client.select_header_content_type(
306
- [
307
- 'application/json'
308
- ]
309
- )
310
- )
311
- if _default_content_type is not None:
312
- _header_params['Content-Type'] = _default_content_type
313
-
314
- # authentication setting
315
- _auth_settings: List[str] = [
316
- 'APIKey'
317
- ]
318
-
319
- return self.api_client.param_serialize(
320
- method='POST',
321
- resource_path='/v1/ann/symbol/batch',
322
- path_params=_path_params,
323
- query_params=_query_params,
324
- header_params=_header_params,
325
- body=_body_params,
326
- post_params=_form_params,
327
- files=_files,
328
- auth_settings=_auth_settings,
329
- collection_formats=_collection_formats,
330
- _host=_host,
331
- _request_auth=_request_auth
332
- )
333
-
334
-