Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/add global api custom instance setter #118

Merged
merged 2 commits into from
Oct 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
1.19.4
------
- Add global API custom instance setter.

1.19.3
------
- Add file name to hash analysis.
Expand Down
2 changes: 1 addition & 1 deletion intezer_sdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.19.3'
__version__ = '1.19.4'
2 changes: 1 addition & 1 deletion intezer_sdk/alerts.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import hashlib
import json
import time
import datetime
from io import BytesIO
from typing import BinaryIO

import requests
import datetime
from typing import Dict
from typing import List
from typing import Tuple
Expand Down
11 changes: 11 additions & 0 deletions intezer_sdk/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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