Skip to content

Commit

Permalink
Merge pull request #118 from intezer/feat/add-global-api-custom-insta…
Browse files Browse the repository at this point in the history
…nce-setter

Feat/add global api custom instance setter
  • Loading branch information
matany90 authored Oct 16, 2023
2 parents d3edd36 + 3699d0d commit 1ab8757
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
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

0 comments on commit 1ab8757

Please sign in to comment.