mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-05-05 23:41:16 +00:00
update autogenerated client sdk (#2010)
This commit is contained in:
parent
13b0d314a8
commit
4e7dd87f99
94 changed files with 3691 additions and 5149 deletions
|
|
@ -7,7 +7,16 @@ from .http_client import AsyncHttpClient
|
|||
|
||||
|
||||
class BaseClientWrapper:
|
||||
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None):
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
authorization: typing.Optional[str] = None,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
):
|
||||
self._api_key = api_key
|
||||
self._authorization = authorization
|
||||
self._base_url = base_url
|
||||
self._timeout = timeout
|
||||
|
||||
|
|
@ -15,8 +24,12 @@ class BaseClientWrapper:
|
|||
headers: typing.Dict[str, str] = {
|
||||
"X-Fern-Language": "Python",
|
||||
"X-Fern-SDK-Name": "skyvern",
|
||||
"X-Fern-SDK-Version": "0.1.56",
|
||||
"X-Fern-SDK-Version": "0.1.65",
|
||||
}
|
||||
if self._api_key is not None:
|
||||
headers["x-api-key"] = self._api_key
|
||||
if self._authorization is not None:
|
||||
headers["authorization"] = self._authorization
|
||||
return headers
|
||||
|
||||
def get_base_url(self) -> str:
|
||||
|
|
@ -27,8 +40,16 @@ class BaseClientWrapper:
|
|||
|
||||
|
||||
class SyncClientWrapper(BaseClientWrapper):
|
||||
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.Client):
|
||||
super().__init__(base_url=base_url, timeout=timeout)
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
authorization: typing.Optional[str] = None,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
httpx_client: httpx.Client,
|
||||
):
|
||||
super().__init__(api_key=api_key, authorization=authorization, base_url=base_url, timeout=timeout)
|
||||
self.httpx_client = HttpClient(
|
||||
httpx_client=httpx_client,
|
||||
base_headers=self.get_headers,
|
||||
|
|
@ -38,8 +59,16 @@ class SyncClientWrapper(BaseClientWrapper):
|
|||
|
||||
|
||||
class AsyncClientWrapper(BaseClientWrapper):
|
||||
def __init__(self, *, base_url: str, timeout: typing.Optional[float] = None, httpx_client: httpx.AsyncClient):
|
||||
super().__init__(base_url=base_url, timeout=timeout)
|
||||
def __init__(
|
||||
self,
|
||||
*,
|
||||
api_key: typing.Optional[str] = None,
|
||||
authorization: typing.Optional[str] = None,
|
||||
base_url: str,
|
||||
timeout: typing.Optional[float] = None,
|
||||
httpx_client: httpx.AsyncClient,
|
||||
):
|
||||
super().__init__(api_key=api_key, authorization=authorization, base_url=base_url, timeout=timeout)
|
||||
self.httpx_client = AsyncHttpClient(
|
||||
httpx_client=httpx_client,
|
||||
base_headers=self.get_headers,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue