From 3ebf7051ab78cbf9f6ac11855e4bccb8704a8000 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Mon, 23 Sep 2024 13:37:59 -0300 Subject: [PATCH 1/4] feat: Proxy support --- supabase_functions/_async/functions_client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index c1fd033..616cdf0 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -8,7 +8,14 @@ class AsyncFunctionsClient: - def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): + def __init__( + self, + url: str, + headers: Dict, + timeout: int, + verify: bool = True, + proxy: str | None = None, + ): self.url = url self.headers = { "User-Agent": f"supabase-py/functions-py v{__version__}", @@ -19,6 +26,7 @@ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): headers=self.headers, verify=bool(verify), timeout=timeout, + proxy=proxy, follow_redirects=True, http2=True, ) From e64944cf31f34d8faba7cf4708fd30de778fe633 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Mon, 23 Sep 2024 13:38:05 -0300 Subject: [PATCH 2/4] feat: Proxy support --- supabase_functions/_sync/functions_client.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index edccd25..827c02e 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -8,7 +8,14 @@ class SyncFunctionsClient: - def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): + def __init__( + self, + url: str, + headers: Dict, + timeout: int, + verify: bool = True, + proxy: str | None = None, + ): self.url = url self.headers = { "User-Agent": f"supabase-py/functions-py v{__version__}", @@ -19,6 +26,7 @@ def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True): headers=self.headers, verify=bool(verify), timeout=timeout, + proxy=proxy, follow_redirects=True, http2=True, ) From dd6c03ea253916b3be8cd2a587b7b28be2e8e626 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Tue, 24 Sep 2024 10:05:22 -0300 Subject: [PATCH 3/4] feat: Proxy support --- supabase_functions/_sync/functions_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase_functions/_sync/functions_client.py b/supabase_functions/_sync/functions_client.py index 827c02e..372d864 100644 --- a/supabase_functions/_sync/functions_client.py +++ b/supabase_functions/_sync/functions_client.py @@ -14,7 +14,7 @@ def __init__( headers: Dict, timeout: int, verify: bool = True, - proxy: str | None = None, + proxy: Optional[str] = None, ): self.url = url self.headers = { From 73c66c3bccfbb8ea3cd0223f5749a6be3e1d7e47 Mon Sep 17 00:00:00 2001 From: Juan Carlos Date: Tue, 24 Sep 2024 10:07:03 -0300 Subject: [PATCH 4/4] feat: Proxy support --- supabase_functions/_async/functions_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supabase_functions/_async/functions_client.py b/supabase_functions/_async/functions_client.py index 616cdf0..9705774 100644 --- a/supabase_functions/_async/functions_client.py +++ b/supabase_functions/_async/functions_client.py @@ -14,7 +14,7 @@ def __init__( headers: Dict, timeout: int, verify: bool = True, - proxy: str | None = None, + proxy: Optional[str] = None, ): self.url = url self.headers = {