revengai 2.1.0__py3-none-any.whl → 2.8.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.

Files changed (31) hide show
  1. revengai/__init__.py +1 -37
  2. revengai/api/__init__.py +0 -1
  3. revengai/api/analyses_core_api.py +0 -294
  4. revengai/api/functions_core_api.py +2 -369
  5. revengai/api_client.py +1 -1
  6. revengai/configuration.py +2 -2
  7. revengai/models/__init__.py +0 -17
  8. revengai/models/elf_relocation.py +1 -1
  9. revengai/models/functions_detail_response.py +4 -2
  10. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/METADATA +1 -24
  11. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/RECORD +13 -31
  12. revengai/api/confidence_api.py +0 -1152
  13. revengai/models/ann_function.py +0 -122
  14. revengai/models/base_response_box_plot_confidence.py +0 -125
  15. revengai/models/base_response_list_function_box_plot_confidence.py +0 -129
  16. revengai/models/base_response_list_similar_functions_response.py +0 -129
  17. revengai/models/base_response_list_tag_origin_box_plot_confidence.py +0 -129
  18. revengai/models/base_response_nearest_neighbor_analysis.py +0 -135
  19. revengai/models/box_plot_confidence.py +0 -98
  20. revengai/models/function_box_plot_confidence.py +0 -92
  21. revengai/models/function_name_confidence_body.py +0 -97
  22. revengai/models/function_name_input.py +0 -88
  23. revengai/models/nearest_neighbor.py +0 -105
  24. revengai/models/origin.py +0 -42
  25. revengai/models/similar_functions_response.py +0 -100
  26. revengai/models/tag_confidence_body.py +0 -95
  27. revengai/models/tag_origin_box_plot_confidence.py +0 -96
  28. revengai/models/tags.py +0 -89
  29. revengai/models/threat_score_function_body.py +0 -87
  30. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/WHEEL +0 -0
  31. {revengai-2.1.0.dist-info → revengai-2.8.0.dist-info}/licenses/LICENSE.md +0 -0
revengai/__init__.py CHANGED
@@ -13,7 +13,7 @@
13
13
  """ # noqa: E501
14
14
 
15
15
 
16
- __version__ = "v2.1.0"
16
+ __version__ = "v2.8.0"
17
17
 
18
18
  # Define package exports
19
19
  __all__ = [
@@ -25,7 +25,6 @@ __all__ = [
25
25
  "AuthenticationUsersApi",
26
26
  "BinariesApi",
27
27
  "CollectionsApi",
28
- "ConfidenceApi",
29
28
  "ExternalSourcesApi",
30
29
  "FirmwareApi",
31
30
  "FunctionsAIDecompilationApi",
@@ -45,7 +44,6 @@ __all__ = [
45
44
  "ApiKeyError",
46
45
  "ApiAttributeError",
47
46
  "ApiException",
48
- "ANNFunction",
49
47
  "Addr",
50
48
  "AiDecompilationRating",
51
49
  "AiUnstripRequest",
@@ -92,7 +90,6 @@ __all__ = [
92
90
  "BaseResponseBlockCommentsGenerationForFunctionResponse",
93
91
  "BaseResponseBlockCommentsOverviewGenerationResponse",
94
92
  "BaseResponseBool",
95
- "BaseResponseBoxPlotConfidence",
96
93
  "BaseResponseCalleesCallerFunctionsResponse",
97
94
  "BaseResponseCapabilities",
98
95
  "BaseResponseCheckSecurityChecksTaskResponse",
@@ -125,16 +122,12 @@ __all__ = [
125
122
  "BaseResponseListCollectionResults",
126
123
  "BaseResponseListCommentResponse",
127
124
  "BaseResponseListDieMatch",
128
- "BaseResponseListFunctionBoxPlotConfidence",
129
125
  "BaseResponseListFunctionNameHistory",
130
126
  "BaseResponseListSBOM",
131
- "BaseResponseListSimilarFunctionsResponse",
132
- "BaseResponseListTagOriginBoxPlotConfidence",
133
127
  "BaseResponseListUserActivityResponse",
134
128
  "BaseResponseLoginResponse",
135
129
  "BaseResponseLogs",
136
130
  "BaseResponseModelsResponse",
137
- "BaseResponseNearestNeighborAnalysis",
138
131
  "BaseResponseNetworkOverviewResponse",
139
132
  "BaseResponseParams",
140
133
  "BaseResponseProcessDumps",
@@ -163,7 +156,6 @@ __all__ = [
163
156
  "BinaryTaskStatus",
164
157
  "Block",
165
158
  "BlockCommentsGenerationForFunctionResponse",
166
- "BoxPlotConfidence",
167
159
  "CalleeFunctionInfo",
168
160
  "CalleesCallerFunctionsResponse",
169
161
  "CallerFunctionInfo",
@@ -219,7 +211,6 @@ __all__ = [
219
211
  "FunctionBlockResponse",
220
212
  "FunctionBlocksResponse",
221
213
  "FunctionBoundary",
222
- "FunctionBoxPlotConfidence",
223
214
  "FunctionCapabilityResponse",
224
215
  "FunctionCommentCreateRequest",
225
216
  "FunctionDataTypes",
@@ -238,9 +229,7 @@ __all__ = [
238
229
  "FunctionMatchingFilters",
239
230
  "FunctionMatchingRequest",
240
231
  "FunctionMatchingResultWithBestMatch",
241
- "FunctionNameConfidenceBody",
242
232
  "FunctionNameHistory",
243
- "FunctionNameInput",
244
233
  "FunctionParamResponse",
245
234
  "FunctionRename",
246
235
  "FunctionRenameMap",
@@ -277,13 +266,11 @@ __all__ = [
277
266
  "ModelName",
278
267
  "ModelsResponse",
279
268
  "NameConfidence",
280
- "NearestNeighbor",
281
269
  "NetworkOverviewDns",
282
270
  "NetworkOverviewDnsAnswer",
283
271
  "NetworkOverviewMetadata",
284
272
  "NetworkOverviewResponse",
285
273
  "Order",
286
- "Origin",
287
274
  "PDBDebugModel",
288
275
  "PEModel",
289
276
  "PaginationModel",
@@ -310,7 +297,6 @@ __all__ = [
310
297
  "SecurityChecksResult",
311
298
  "SecurityModel",
312
299
  "SeverityType",
313
- "SimilarFunctionsResponse",
314
300
  "SingleCodeCertificateModel",
315
301
  "SingleCodeSignatureModel",
316
302
  "SinglePDBEntryModel",
@@ -328,15 +314,11 @@ __all__ = [
328
314
  "TTPSElement",
329
315
  "TTPSOccurance",
330
316
  "Tag",
331
- "TagConfidenceBody",
332
- "TagOriginBoxPlotConfidence",
333
317
  "TagResponse",
334
318
  "TagSearchResponse",
335
319
  "TagSearchResult",
336
- "Tags",
337
320
  "TaskResponse",
338
321
  "TaskStatus",
339
- "ThreatScoreFunctionBody",
340
322
  "TimestampModel",
341
323
  "TypeDefinition",
342
324
  "UpdateFunctionDataTypes",
@@ -359,7 +341,6 @@ from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi
359
341
  from revengai.api.authentication_users_api import AuthenticationUsersApi as AuthenticationUsersApi
360
342
  from revengai.api.binaries_api import BinariesApi as BinariesApi
361
343
  from revengai.api.collections_api import CollectionsApi as CollectionsApi
362
- from revengai.api.confidence_api import ConfidenceApi as ConfidenceApi
363
344
  from revengai.api.external_sources_api import ExternalSourcesApi as ExternalSourcesApi
364
345
  from revengai.api.firmware_api import FirmwareApi as FirmwareApi
365
346
  from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi as FunctionsAIDecompilationApi
@@ -383,7 +364,6 @@ from revengai.exceptions import ApiAttributeError as ApiAttributeError
383
364
  from revengai.exceptions import ApiException as ApiException
384
365
 
385
366
  # import models into sdk package
386
- from revengai.models.ann_function import ANNFunction as ANNFunction
387
367
  from revengai.models.addr import Addr as Addr
388
368
  from revengai.models.ai_decompilation_rating import AiDecompilationRating as AiDecompilationRating
389
369
  from revengai.models.ai_unstrip_request import AiUnstripRequest as AiUnstripRequest
@@ -430,7 +410,6 @@ from revengai.models.base_response_binary_search_response import BaseResponseBin
430
410
  from revengai.models.base_response_block_comments_generation_for_function_response import BaseResponseBlockCommentsGenerationForFunctionResponse as BaseResponseBlockCommentsGenerationForFunctionResponse
431
411
  from revengai.models.base_response_block_comments_overview_generation_response import BaseResponseBlockCommentsOverviewGenerationResponse as BaseResponseBlockCommentsOverviewGenerationResponse
432
412
  from revengai.models.base_response_bool import BaseResponseBool as BaseResponseBool
433
- from revengai.models.base_response_box_plot_confidence import BaseResponseBoxPlotConfidence as BaseResponseBoxPlotConfidence
434
413
  from revengai.models.base_response_callees_caller_functions_response import BaseResponseCalleesCallerFunctionsResponse as BaseResponseCalleesCallerFunctionsResponse
435
414
  from revengai.models.base_response_capabilities import BaseResponseCapabilities as BaseResponseCapabilities
436
415
  from revengai.models.base_response_check_security_checks_task_response import BaseResponseCheckSecurityChecksTaskResponse as BaseResponseCheckSecurityChecksTaskResponse
@@ -463,16 +442,12 @@ from revengai.models.base_response_get_user_response import BaseResponseGetUserR
463
442
  from revengai.models.base_response_list_collection_results import BaseResponseListCollectionResults as BaseResponseListCollectionResults
464
443
  from revengai.models.base_response_list_comment_response import BaseResponseListCommentResponse as BaseResponseListCommentResponse
465
444
  from revengai.models.base_response_list_die_match import BaseResponseListDieMatch as BaseResponseListDieMatch
466
- from revengai.models.base_response_list_function_box_plot_confidence import BaseResponseListFunctionBoxPlotConfidence as BaseResponseListFunctionBoxPlotConfidence
467
445
  from revengai.models.base_response_list_function_name_history import BaseResponseListFunctionNameHistory as BaseResponseListFunctionNameHistory
468
446
  from revengai.models.base_response_list_sbom import BaseResponseListSBOM as BaseResponseListSBOM
469
- from revengai.models.base_response_list_similar_functions_response import BaseResponseListSimilarFunctionsResponse as BaseResponseListSimilarFunctionsResponse
470
- from revengai.models.base_response_list_tag_origin_box_plot_confidence import BaseResponseListTagOriginBoxPlotConfidence as BaseResponseListTagOriginBoxPlotConfidence
471
447
  from revengai.models.base_response_list_user_activity_response import BaseResponseListUserActivityResponse as BaseResponseListUserActivityResponse
472
448
  from revengai.models.base_response_login_response import BaseResponseLoginResponse as BaseResponseLoginResponse
473
449
  from revengai.models.base_response_logs import BaseResponseLogs as BaseResponseLogs
474
450
  from revengai.models.base_response_models_response import BaseResponseModelsResponse as BaseResponseModelsResponse
475
- from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis as BaseResponseNearestNeighborAnalysis
476
451
  from revengai.models.base_response_network_overview_response import BaseResponseNetworkOverviewResponse as BaseResponseNetworkOverviewResponse
477
452
  from revengai.models.base_response_params import BaseResponseParams as BaseResponseParams
478
453
  from revengai.models.base_response_process_dumps import BaseResponseProcessDumps as BaseResponseProcessDumps
@@ -501,7 +476,6 @@ from revengai.models.binary_search_result import BinarySearchResult as BinarySea
501
476
  from revengai.models.binary_task_status import BinaryTaskStatus as BinaryTaskStatus
502
477
  from revengai.models.block import Block as Block
503
478
  from revengai.models.block_comments_generation_for_function_response import BlockCommentsGenerationForFunctionResponse as BlockCommentsGenerationForFunctionResponse
504
- from revengai.models.box_plot_confidence import BoxPlotConfidence as BoxPlotConfidence
505
479
  from revengai.models.callee_function_info import CalleeFunctionInfo as CalleeFunctionInfo
506
480
  from revengai.models.callees_caller_functions_response import CalleesCallerFunctionsResponse as CalleesCallerFunctionsResponse
507
481
  from revengai.models.caller_function_info import CallerFunctionInfo as CallerFunctionInfo
@@ -557,7 +531,6 @@ from revengai.models.function_block_destination_response import FunctionBlockDes
557
531
  from revengai.models.function_block_response import FunctionBlockResponse as FunctionBlockResponse
558
532
  from revengai.models.function_blocks_response import FunctionBlocksResponse as FunctionBlocksResponse
559
533
  from revengai.models.function_boundary import FunctionBoundary as FunctionBoundary
560
- from revengai.models.function_box_plot_confidence import FunctionBoxPlotConfidence as FunctionBoxPlotConfidence
561
534
  from revengai.models.function_capability_response import FunctionCapabilityResponse as FunctionCapabilityResponse
562
535
  from revengai.models.function_comment_create_request import FunctionCommentCreateRequest as FunctionCommentCreateRequest
563
536
  from revengai.models.function_data_types import FunctionDataTypes as FunctionDataTypes
@@ -576,9 +549,7 @@ from revengai.models.function_matching_batch_response import FunctionMatchingBat
576
549
  from revengai.models.function_matching_filters import FunctionMatchingFilters as FunctionMatchingFilters
577
550
  from revengai.models.function_matching_request import FunctionMatchingRequest as FunctionMatchingRequest
578
551
  from revengai.models.function_matching_result_with_best_match import FunctionMatchingResultWithBestMatch as FunctionMatchingResultWithBestMatch
579
- from revengai.models.function_name_confidence_body import FunctionNameConfidenceBody as FunctionNameConfidenceBody
580
552
  from revengai.models.function_name_history import FunctionNameHistory as FunctionNameHistory
581
- from revengai.models.function_name_input import FunctionNameInput as FunctionNameInput
582
553
  from revengai.models.function_param_response import FunctionParamResponse as FunctionParamResponse
583
554
  from revengai.models.function_rename import FunctionRename as FunctionRename
584
555
  from revengai.models.function_rename_map import FunctionRenameMap as FunctionRenameMap
@@ -615,13 +586,11 @@ from revengai.models.meta_model import MetaModel as MetaModel
615
586
  from revengai.models.model_name import ModelName as ModelName
616
587
  from revengai.models.models_response import ModelsResponse as ModelsResponse
617
588
  from revengai.models.name_confidence import NameConfidence as NameConfidence
618
- from revengai.models.nearest_neighbor import NearestNeighbor as NearestNeighbor
619
589
  from revengai.models.network_overview_dns import NetworkOverviewDns as NetworkOverviewDns
620
590
  from revengai.models.network_overview_dns_answer import NetworkOverviewDnsAnswer as NetworkOverviewDnsAnswer
621
591
  from revengai.models.network_overview_metadata import NetworkOverviewMetadata as NetworkOverviewMetadata
622
592
  from revengai.models.network_overview_response import NetworkOverviewResponse as NetworkOverviewResponse
623
593
  from revengai.models.order import Order as Order
624
- from revengai.models.origin import Origin as Origin
625
594
  from revengai.models.pdb_debug_model import PDBDebugModel as PDBDebugModel
626
595
  from revengai.models.pe_model import PEModel as PEModel
627
596
  from revengai.models.pagination_model import PaginationModel as PaginationModel
@@ -648,7 +617,6 @@ from revengai.models.security_checks_response import SecurityChecksResponse as S
648
617
  from revengai.models.security_checks_result import SecurityChecksResult as SecurityChecksResult
649
618
  from revengai.models.security_model import SecurityModel as SecurityModel
650
619
  from revengai.models.severity_type import SeverityType as SeverityType
651
- from revengai.models.similar_functions_response import SimilarFunctionsResponse as SimilarFunctionsResponse
652
620
  from revengai.models.single_code_certificate_model import SingleCodeCertificateModel as SingleCodeCertificateModel
653
621
  from revengai.models.single_code_signature_model import SingleCodeSignatureModel as SingleCodeSignatureModel
654
622
  from revengai.models.single_pdb_entry_model import SinglePDBEntryModel as SinglePDBEntryModel
@@ -666,15 +634,11 @@ from revengai.models.ttps_data import TTPSData as TTPSData
666
634
  from revengai.models.ttps_element import TTPSElement as TTPSElement
667
635
  from revengai.models.ttps_occurance import TTPSOccurance as TTPSOccurance
668
636
  from revengai.models.tag import Tag as Tag
669
- from revengai.models.tag_confidence_body import TagConfidenceBody as TagConfidenceBody
670
- from revengai.models.tag_origin_box_plot_confidence import TagOriginBoxPlotConfidence as TagOriginBoxPlotConfidence
671
637
  from revengai.models.tag_response import TagResponse as TagResponse
672
638
  from revengai.models.tag_search_response import TagSearchResponse as TagSearchResponse
673
639
  from revengai.models.tag_search_result import TagSearchResult as TagSearchResult
674
- from revengai.models.tags import Tags as Tags
675
640
  from revengai.models.task_response import TaskResponse as TaskResponse
676
641
  from revengai.models.task_status import TaskStatus as TaskStatus
677
- from revengai.models.threat_score_function_body import ThreatScoreFunctionBody as ThreatScoreFunctionBody
678
642
  from revengai.models.timestamp_model import TimestampModel as TimestampModel
679
643
  from revengai.models.type_definition import TypeDefinition as TypeDefinition
680
644
  from revengai.models.update_function_data_types import UpdateFunctionDataTypes as UpdateFunctionDataTypes
revengai/api/__init__.py CHANGED
@@ -9,7 +9,6 @@ from revengai.api.analyses_security_checks_api import AnalysesSecurityChecksApi
9
9
  from revengai.api.authentication_users_api import AuthenticationUsersApi
10
10
  from revengai.api.binaries_api import BinariesApi
11
11
  from revengai.api.collections_api import CollectionsApi
12
- from revengai.api.confidence_api import ConfidenceApi
13
12
  from revengai.api.external_sources_api import ExternalSourcesApi
14
13
  from revengai.api.firmware_api import FirmwareApi
15
14
  from revengai.api.functions_ai_decompilation_api import FunctionsAIDecompilationApi
@@ -18,7 +18,6 @@ from typing_extensions import Annotated
18
18
  from pydantic import Field, StrictBool, StrictBytes, StrictInt, StrictStr
19
19
  from typing import Any, List, Optional, Tuple, Union
20
20
  from typing_extensions import Annotated
21
- from revengai.models.ann_function import ANNFunction
22
21
  from revengai.models.analysis_create_request import AnalysisCreateRequest
23
22
  from revengai.models.analysis_update_request import AnalysisUpdateRequest
24
23
  from revengai.models.analysis_update_tags_request import AnalysisUpdateTagsRequest
@@ -32,7 +31,6 @@ from revengai.models.base_response_binary_ann_list_response import BaseResponseB
32
31
  from revengai.models.base_response_created import BaseResponseCreated
33
32
  from revengai.models.base_response_dict import BaseResponseDict
34
33
  from revengai.models.base_response_logs import BaseResponseLogs
35
- from revengai.models.base_response_nearest_neighbor_analysis import BaseResponseNearestNeighborAnalysis
36
34
  from revengai.models.base_response_params import BaseResponseParams
37
35
  from revengai.models.base_response_recent import BaseResponseRecent
38
36
  from revengai.models.base_response_status import BaseResponseStatus
@@ -617,298 +615,6 @@ class AnalysesCoreApi:
617
615
 
618
616
 
619
617
 
620
- @validate_call
621
- def find_similar_functions_batch(
622
- self,
623
- analysis_id: StrictInt,
624
- ann_function: ANNFunction,
625
- _request_timeout: Union[
626
- None,
627
- Annotated[StrictFloat, Field(gt=0)],
628
- Tuple[
629
- Annotated[StrictFloat, Field(gt=0)],
630
- Annotated[StrictFloat, Field(gt=0)]
631
- ]
632
- ] = None,
633
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
634
- _content_type: Optional[StrictStr] = None,
635
- _headers: Optional[Dict[StrictStr, Any]] = None,
636
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
637
- ) -> BaseResponseNearestNeighborAnalysis:
638
- """Batch Symbol ANN using Analysis ID
639
-
640
- Takes a analysis ID and returns the nearest functions within the database that match those functions
641
-
642
- :param analysis_id: (required)
643
- :type analysis_id: int
644
- :param ann_function: (required)
645
- :type ann_function: ANNFunction
646
- :param _request_timeout: timeout setting for this request. If one
647
- number provided, it will be total request
648
- timeout. It can also be a pair (tuple) of
649
- (connection, read) timeouts.
650
- :type _request_timeout: int, tuple(int, int), optional
651
- :param _request_auth: set to override the auth_settings for an a single
652
- request; this effectively ignores the
653
- authentication in the spec for a single request.
654
- :type _request_auth: dict, optional
655
- :param _content_type: force content-type for the request.
656
- :type _content_type: str, Optional
657
- :param _headers: set to override the headers for a single
658
- request; this effectively ignores the headers
659
- in the spec for a single request.
660
- :type _headers: dict, optional
661
- :param _host_index: set to override the host_index for a single
662
- request; this effectively ignores the host_index
663
- in the spec for a single request.
664
- :type _host_index: int, optional
665
- :return: Returns the result object.
666
- """ # noqa: E501
667
-
668
- _param = self._find_similar_functions_batch_serialize(
669
- analysis_id=analysis_id,
670
- ann_function=ann_function,
671
- _request_auth=_request_auth,
672
- _content_type=_content_type,
673
- _headers=_headers,
674
- _host_index=_host_index
675
- )
676
-
677
- _response_types_map: Dict[str, Optional[str]] = {
678
- '200': "BaseResponseNearestNeighborAnalysis",
679
- '422': "BaseResponse",
680
- }
681
- response_data = self.api_client.call_api(
682
- *_param,
683
- _request_timeout=_request_timeout
684
- )
685
- response_data.read()
686
- return self.api_client.response_deserialize(
687
- response_data=response_data,
688
- response_types_map=_response_types_map,
689
- ).data
690
-
691
-
692
- @validate_call
693
- def find_similar_functions_batch_with_http_info(
694
- self,
695
- analysis_id: StrictInt,
696
- ann_function: ANNFunction,
697
- _request_timeout: Union[
698
- None,
699
- Annotated[StrictFloat, Field(gt=0)],
700
- Tuple[
701
- Annotated[StrictFloat, Field(gt=0)],
702
- Annotated[StrictFloat, Field(gt=0)]
703
- ]
704
- ] = None,
705
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
706
- _content_type: Optional[StrictStr] = None,
707
- _headers: Optional[Dict[StrictStr, Any]] = None,
708
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
709
- ) -> ApiResponse[BaseResponseNearestNeighborAnalysis]:
710
- """Batch Symbol ANN using Analysis ID
711
-
712
- Takes a analysis ID and returns the nearest functions within the database that match those functions
713
-
714
- :param analysis_id: (required)
715
- :type analysis_id: int
716
- :param ann_function: (required)
717
- :type ann_function: ANNFunction
718
- :param _request_timeout: timeout setting for this request. If one
719
- number provided, it will be total request
720
- timeout. It can also be a pair (tuple) of
721
- (connection, read) timeouts.
722
- :type _request_timeout: int, tuple(int, int), optional
723
- :param _request_auth: set to override the auth_settings for an a single
724
- request; this effectively ignores the
725
- authentication in the spec for a single request.
726
- :type _request_auth: dict, optional
727
- :param _content_type: force content-type for the request.
728
- :type _content_type: str, Optional
729
- :param _headers: set to override the headers for a single
730
- request; this effectively ignores the headers
731
- in the spec for a single request.
732
- :type _headers: dict, optional
733
- :param _host_index: set to override the host_index for a single
734
- request; this effectively ignores the host_index
735
- in the spec for a single request.
736
- :type _host_index: int, optional
737
- :return: Returns the result object.
738
- """ # noqa: E501
739
-
740
- _param = self._find_similar_functions_batch_serialize(
741
- analysis_id=analysis_id,
742
- ann_function=ann_function,
743
- _request_auth=_request_auth,
744
- _content_type=_content_type,
745
- _headers=_headers,
746
- _host_index=_host_index
747
- )
748
-
749
- _response_types_map: Dict[str, Optional[str]] = {
750
- '200': "BaseResponseNearestNeighborAnalysis",
751
- '422': "BaseResponse",
752
- }
753
- response_data = self.api_client.call_api(
754
- *_param,
755
- _request_timeout=_request_timeout
756
- )
757
- response_data.read()
758
- return self.api_client.response_deserialize(
759
- response_data=response_data,
760
- response_types_map=_response_types_map,
761
- )
762
-
763
-
764
- @validate_call
765
- def find_similar_functions_batch_without_preload_content(
766
- self,
767
- analysis_id: StrictInt,
768
- ann_function: ANNFunction,
769
- _request_timeout: Union[
770
- None,
771
- Annotated[StrictFloat, Field(gt=0)],
772
- Tuple[
773
- Annotated[StrictFloat, Field(gt=0)],
774
- Annotated[StrictFloat, Field(gt=0)]
775
- ]
776
- ] = None,
777
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
778
- _content_type: Optional[StrictStr] = None,
779
- _headers: Optional[Dict[StrictStr, Any]] = None,
780
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
781
- ) -> RESTResponseType:
782
- """Batch Symbol ANN using Analysis ID
783
-
784
- Takes a analysis ID and returns the nearest functions within the database that match those functions
785
-
786
- :param analysis_id: (required)
787
- :type analysis_id: int
788
- :param ann_function: (required)
789
- :type ann_function: ANNFunction
790
- :param _request_timeout: timeout setting for this request. If one
791
- number provided, it will be total request
792
- timeout. It can also be a pair (tuple) of
793
- (connection, read) timeouts.
794
- :type _request_timeout: int, tuple(int, int), optional
795
- :param _request_auth: set to override the auth_settings for an a single
796
- request; this effectively ignores the
797
- authentication in the spec for a single request.
798
- :type _request_auth: dict, optional
799
- :param _content_type: force content-type for the request.
800
- :type _content_type: str, Optional
801
- :param _headers: set to override the headers for a single
802
- request; this effectively ignores the headers
803
- in the spec for a single request.
804
- :type _headers: dict, optional
805
- :param _host_index: set to override the host_index for a single
806
- request; this effectively ignores the host_index
807
- in the spec for a single request.
808
- :type _host_index: int, optional
809
- :return: Returns the result object.
810
- """ # noqa: E501
811
-
812
- _param = self._find_similar_functions_batch_serialize(
813
- analysis_id=analysis_id,
814
- ann_function=ann_function,
815
- _request_auth=_request_auth,
816
- _content_type=_content_type,
817
- _headers=_headers,
818
- _host_index=_host_index
819
- )
820
-
821
- _response_types_map: Dict[str, Optional[str]] = {
822
- '200': "BaseResponseNearestNeighborAnalysis",
823
- '422': "BaseResponse",
824
- }
825
- response_data = self.api_client.call_api(
826
- *_param,
827
- _request_timeout=_request_timeout
828
- )
829
- return response_data.response
830
-
831
-
832
- def _find_similar_functions_batch_serialize(
833
- self,
834
- analysis_id,
835
- ann_function,
836
- _request_auth,
837
- _content_type,
838
- _headers,
839
- _host_index,
840
- ) -> RequestSerialized:
841
-
842
- _host = None
843
-
844
- _collection_formats: Dict[str, str] = {
845
- }
846
-
847
- _path_params: Dict[str, str] = {}
848
- _query_params: List[Tuple[str, str]] = []
849
- _header_params: Dict[str, Optional[str]] = _headers or {}
850
- _form_params: List[Tuple[str, str]] = []
851
- _files: Dict[
852
- str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
853
- ] = {}
854
- _body_params: Optional[bytes] = None
855
-
856
- # process the path parameters
857
- if analysis_id is not None:
858
- _path_params['analysis_id'] = analysis_id
859
- # process the query parameters
860
- # process the header parameters
861
- # process the form parameters
862
- # process the body parameter
863
- if ann_function is not None:
864
- _body_params = ann_function
865
-
866
-
867
- # set the HTTP header `Accept`
868
- if 'Accept' not in _header_params:
869
- _header_params['Accept'] = self.api_client.select_header_accept(
870
- [
871
- 'application/json'
872
- ]
873
- )
874
-
875
- # set the HTTP header `Content-Type`
876
- if _content_type:
877
- _header_params['Content-Type'] = _content_type
878
- else:
879
- _default_content_type = (
880
- self.api_client.select_header_content_type(
881
- [
882
- 'application/json'
883
- ]
884
- )
885
- )
886
- if _default_content_type is not None:
887
- _header_params['Content-Type'] = _default_content_type
888
-
889
- # authentication setting
890
- _auth_settings: List[str] = [
891
- 'APIKey'
892
- ]
893
-
894
- return self.api_client.param_serialize(
895
- method='POST',
896
- resource_path='/v2/analyses/{analysis_id}/similarity/functions',
897
- path_params=_path_params,
898
- query_params=_query_params,
899
- header_params=_header_params,
900
- body=_body_params,
901
- post_params=_form_params,
902
- files=_files,
903
- auth_settings=_auth_settings,
904
- collection_formats=_collection_formats,
905
- _host=_host,
906
- _request_auth=_request_auth
907
- )
908
-
909
-
910
-
911
-
912
618
  @validate_call
913
619
  def get_analysis_basic_info(
914
620
  self,