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

Commit 1a5c48d

Browse files
feat: Check if url arg is an HTTP URL
1 parent 1c17d79 commit 1a5c48d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

supabase_functions/utils.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
from urllib.parse import urlparse
2+
13
from httpx import AsyncClient as AsyncClient # noqa: F401
24
from httpx import Client as BaseClient
35

@@ -7,3 +9,11 @@
79
class SyncClient(BaseClient):
810
def aclose(self) -> None:
911
self.close()
12+
13+
14+
def is_valid_str_arg(target: str) -> bool:
15+
return isinstance(target, str) and len(target.strip()) > 0
16+
17+
18+
def is_https_url(url: str) -> bool:
19+
return urlparse(url).scheme == "https"

0 commit comments

Comments
 (0)