Skip to content

Commit 7710a3f

Browse files
feat: Proxy support (#148)
1 parent 9458912 commit 7710a3f

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

supabase_functions/_async/functions_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88

99

1010
class AsyncFunctionsClient:
11-
def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11+
def __init__(
12+
self,
13+
url: str,
14+
headers: Dict,
15+
timeout: int,
16+
verify: bool = True,
17+
proxy: Optional[str] = None,
18+
):
1219
self.url = url
1320
self.headers = {
1421
"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):
1926
headers=self.headers,
2027
verify=bool(verify),
2128
timeout=timeout,
29+
proxy=proxy,
2230
follow_redirects=True,
2331
http2=True,
2432
)

supabase_functions/_sync/functions_client.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,14 @@
88

99

1010
class SyncFunctionsClient:
11-
def __init__(self, url: str, headers: Dict, timeout: int, verify: bool = True):
11+
def __init__(
12+
self,
13+
url: str,
14+
headers: Dict,
15+
timeout: int,
16+
verify: bool = True,
17+
proxy: Optional[str] = None,
18+
):
1219
self.url = url
1320
self.headers = {
1421
"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):
1926
headers=self.headers,
2027
verify=bool(verify),
2128
timeout=timeout,
29+
proxy=proxy,
2230
follow_redirects=True,
2331
http2=True,
2432
)

0 commit comments

Comments
 (0)