From 4a52a71956a8d46fcb7294ac71734504bb09bcc2 Mon Sep 17 00:00:00 2001 From: S. Solomon Darnell Date: Fri, 28 Mar 2025 21:52:21 -0500 Subject: two version of R2R are here --- .../python3.12/site-packages/supafunc/__init__.py | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .venv/lib/python3.12/site-packages/supafunc/__init__.py (limited to '.venv/lib/python3.12/site-packages/supafunc/__init__.py') 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) -- cgit v1.2.3