Skip to content

Commit fab190b

Browse files
authored
Merge pull request #10 from Zipstack/ssl-verification-option
Added SSL certificate verification option to APIDeploymentsClient
2 parents 3d40db9 + 8d7a187 commit fab190b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/unstract/api_deployments/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ def __init__(
5454
api_timeout: int = 300,
5555
logging_level: str = "INFO",
5656
include_metadata: bool = False,
57+
verify: bool = True
5758
):
5859
"""Initializes the APIClient class.
5960
@@ -86,6 +87,7 @@ def __init__(
8687
self.api_url = api_url
8788
self.__save_base_url(api_url)
8889
self.include_metadata = include_metadata
90+
self.verify = verify
8991

9092
def __save_base_url(self, full_url: str):
9193
"""Extracts the base URL from the full URL and saves it.
@@ -136,6 +138,7 @@ def structure_file(self, file_paths: list[str]) -> dict:
136138
headers=headers,
137139
data=data,
138140
files=files,
141+
verify=self.verify,
139142
)
140143
self.logger.debug(response.status_code)
141144
self.logger.debug(response.text)
@@ -222,6 +225,7 @@ def check_execution_status(self, status_check_api_endpoint: str) -> dict:
222225
status_call_url,
223226
headers=headers,
224227
params={"include_metadata": self.include_metadata},
228+
verify=self.verify,
225229
)
226230
self.logger.debug(response.status_code)
227231
self.logger.debug(response.text)

0 commit comments

Comments
 (0)