Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 53a2461

Browse files
authored
[client] Fix OpenCTIApiClient parameter types (#744)
1 parent 96ea9d2 commit 53a2461

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pycti/api/opencti_api_client.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import datetime
44
import io
55
import json
6-
from typing import Union
6+
from typing import Dict, Tuple, Union
77

88
import magic
99
import requests
@@ -83,13 +83,13 @@ class OpenCTIApiClient:
8383
:param log_level: log level for the client
8484
:type log_level: str, optional
8585
:param ssl_verify: Requiring the requests to verify the TLS certificate at the server.
86-
:type ssl_verify: bool, optional
86+
:type ssl_verify: bool, str, optional
8787
:param proxies:
8888
:type proxies: dict, optional, The proxy configuration, would have `http` and `https` attributes. Defaults to {}
8989
```
9090
proxies: {
91-
"http: "http://my_proxy:8080"
92-
"https: "http://my_proxy:8080"
91+
"http": "http://my_proxy:8080"
92+
"https": "http://my_proxy:8080"
9393
}
9494
```
9595
:param json_logging: format the logs as json if set to True
@@ -102,14 +102,14 @@ class OpenCTIApiClient:
102102

103103
def __init__(
104104
self,
105-
url,
106-
token,
105+
url: str,
106+
token: str,
107107
log_level="info",
108-
ssl_verify=False,
109-
proxies=None,
108+
ssl_verify: Union[bool, str] = False,
109+
proxies: Union[Dict[str, str], None] = None,
110110
json_logging=False,
111111
bundle_send_to_queue=True,
112-
cert=None,
112+
cert: Union[str, Tuple[str, str], None] = None,
113113
auth=None,
114114
perform_health_check=True,
115115
):

0 commit comments

Comments
 (0)