From ebcc7ed2aa38068d409b287b46a9e406bbdc3ea3 Mon Sep 17 00:00:00 2001 From: Guillaume Bouvignies Date: Thu, 21 Dec 2023 02:38:16 +0100 Subject: [PATCH] chore: add `verify` to Windmill python object for httpx (#2900) * chore: add `verify` to Windmill python object for httpx * move it before get_client --- python-client/wmill/wmill/client.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python-client/wmill/wmill/client.py b/python-client/wmill/wmill/client.py index 34e4d4cfa4..2b587e8985 100644 --- a/python-client/wmill/wmill/client.py +++ b/python-client/wmill/wmill/client.py @@ -23,7 +23,7 @@ JobStatus = Literal["RUNNING", "WAITING", "COMPLETED"] class Windmill: - def __init__(self, base_url=None, token=None, workspace=None): + def __init__(self, base_url=None, token=None, workspace=None, verify=True): base = base_url or os.environ.get("BASE_INTERNAL_URL") self.base_url = f"{base}/api" @@ -32,6 +32,7 @@ class Windmill: "Content-Type": "application/json", "Authorization": f"Bearer {self.token}", } + self.verify = verify self.client = self.get_client() self.workspace = workspace or os.environ.get("WM_WORKSPACE") self.path = os.environ.get("WM_JOB_PATH") @@ -42,6 +43,7 @@ class Windmill: return httpx.Client( base_url=self.base_url, headers=self.headers, + verify=self.verify, ) def get(self, endpoint, raise_for_status=True, **kwargs) -> httpx.Response: