aboutsummaryrefslogtreecommitdiff
path: root/.venv/lib/python3.12/site-packages/supafunc/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to '.venv/lib/python3.12/site-packages/supafunc/__init__.py')
-rw-r--r--.venv/lib/python3.12/site-packages/supafunc/__init__.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/.venv/lib/python3.12/site-packages/supafunc/__init__.py b/.venv/lib/python3.12/site-packages/supafunc/__init__.py
new file mode 100644
index 00000000..7b819695
--- /dev/null
+++ b/.venv/lib/python3.12/site-packages/supafunc/__init__.py
@@ -0,0 +1,34 @@
+from __future__ import annotations
+
+from typing import Literal, Optional, Union, overload
+
+from ._async.functions_client import AsyncFunctionsClient
+from ._sync.functions_client import SyncFunctionsClient
+from .utils import FunctionRegion
+
+__all__ = ["create_client"]
+
+
+@overload
+def create_client(
+ url: str, headers: dict[str, str], *, is_async: Literal[True], verify: bool
+) -> AsyncFunctionsClient: ...
+
+
+@overload
+def create_client(
+ url: str, headers: dict[str, str], *, is_async: Literal[False], verify: bool
+) -> SyncFunctionsClient: ...
+
+
+def create_client(
+ url: str,
+ headers: dict[str, str],
+ *,
+ is_async: bool,
+ verify: bool = True,
+) -> Union[AsyncFunctionsClient, SyncFunctionsClient]:
+ if is_async:
+ return AsyncFunctionsClient(url, headers, verify)
+ else:
+ return SyncFunctionsClient(url, headers, verify)