From 4a02b75ad76012984c3f4294e4199d92a1e42b9d Mon Sep 17 00:00:00 2001 From: Matan Yechiel Date: Mon, 16 Oct 2023 08:46:32 +0300 Subject: [PATCH 1/2] init --- CHANGES | 4 ++++ intezer_sdk/__init__.py | 2 +- intezer_sdk/alerts.py | 2 +- intezer_sdk/api.py | 11 +++++++++++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index 1e149c5..c8fdcb7 100644 --- a/CHANGES +++ b/CHANGES @@ -1,3 +1,7 @@ +1.19.4 +------ +- Add global API custom instance setter. + 1.19.3 ------ - Add file name to hash analysis. diff --git a/intezer_sdk/__init__.py b/intezer_sdk/__init__.py index 7056930..d81ac8e 100644 --- a/intezer_sdk/__init__.py +++ b/intezer_sdk/__init__.py @@ -1 +1 @@ -__version__ = '1.19.3' +__version__ = '1.19.4' diff --git a/intezer_sdk/alerts.py b/intezer_sdk/alerts.py index 095801d..2b9b4f7 100644 --- a/intezer_sdk/alerts.py +++ b/intezer_sdk/alerts.py @@ -5,7 +5,7 @@ from typing import BinaryIO import requests -import datetime +import datetimech from typing import Dict from typing import List from typing import Tuple diff --git a/intezer_sdk/api.py b/intezer_sdk/api.py index b559924..7afeaf9 100644 --- a/intezer_sdk/api.py +++ b/intezer_sdk/api.py @@ -733,5 +733,16 @@ def set_global_api(api_key: str = None, proxies=proxies) return _global_api +def set_global_api_custom_instance(api: IntezerApiClient) -> IntezerApiClient: + """ + Configure the global api with a custom instance + + :param api: The api instance + :return: The configured api + """ + global _global_api + _global_api = api + return _global_api + IntezerProxy = IntezerApiClient From 3699d0d0f20c8e48dc39988401fc57c1825dd00e Mon Sep 17 00:00:00 2001 From: Matan Yechiel Date: Mon, 16 Oct 2023 08:51:11 +0300 Subject: [PATCH 2/2] imports --- intezer_sdk/alerts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/intezer_sdk/alerts.py b/intezer_sdk/alerts.py index 2b9b4f7..d6a6cef 100644 --- a/intezer_sdk/alerts.py +++ b/intezer_sdk/alerts.py @@ -1,11 +1,11 @@ import hashlib import json import time +import datetime from io import BytesIO from typing import BinaryIO import requests -import datetimech from typing import Dict from typing import List from typing import Tuple