mirror of
https://github.com/Skyvern-AI/skyvern.git
synced 2026-07-09 16:09:13 +00:00
Some checks failed
Run tests and pre-commit / Run tests and pre-commit hooks (push) Waiting to run
Run tests and pre-commit / Frontend Lint and Build (push) Waiting to run
Run tests and pre-commit / pip Package Smoke Tests (3.11) (push) Waiting to run
Run tests and pre-commit / pip Package Smoke Tests (3.13) (push) Waiting to run
Publish Fern Docs / run (push) Waiting to run
Auto Create GitHub Release on Version Change / check-version-change (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / check-version-change (push) Has been cancelled
Build Skyvern TS SDK and publish to npm / check-version-change (push) Has been cancelled
Auto Create GitHub Release on Version Change / create-release (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / run-ci (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / build-sdk (push) Has been cancelled
Build Skyvern SDK and publish to PyPI / publish-sdk (push) Has been cancelled
Build Skyvern TS SDK and publish to npm / build-and-publish-sdk (push) Has been cancelled
99 lines
2.7 KiB
Python
99 lines
2.7 KiB
Python
# This file was auto-generated by Fern from our API Definition.
|
|
|
|
import typing
|
|
|
|
from ..core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
|
|
from ..core.request_options import RequestOptions
|
|
from .raw_client import AsyncRawServerClient, RawServerClient
|
|
|
|
|
|
class ServerClient:
|
|
def __init__(self, *, client_wrapper: SyncClientWrapper):
|
|
self._raw_client = RawServerClient(client_wrapper=client_wrapper)
|
|
|
|
@property
|
|
def with_raw_response(self) -> RawServerClient:
|
|
"""
|
|
Retrieves a raw implementation of this client that returns raw responses.
|
|
|
|
Returns
|
|
-------
|
|
RawServerClient
|
|
"""
|
|
return self._raw_client
|
|
|
|
def get_version(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
|
|
"""
|
|
Returns the current Skyvern server version (git SHA for official builds).
|
|
|
|
Parameters
|
|
----------
|
|
request_options : typing.Optional[RequestOptions]
|
|
Request-specific configuration.
|
|
|
|
Returns
|
|
-------
|
|
typing.Dict[str, str]
|
|
Current server version
|
|
|
|
Examples
|
|
--------
|
|
from skyvern import Skyvern
|
|
|
|
client = Skyvern(
|
|
api_key="YOUR_API_KEY",
|
|
)
|
|
client.server.get_version()
|
|
"""
|
|
_response = self._raw_client.get_version(request_options=request_options)
|
|
return _response.data
|
|
|
|
|
|
class AsyncServerClient:
|
|
def __init__(self, *, client_wrapper: AsyncClientWrapper):
|
|
self._raw_client = AsyncRawServerClient(client_wrapper=client_wrapper)
|
|
|
|
@property
|
|
def with_raw_response(self) -> AsyncRawServerClient:
|
|
"""
|
|
Retrieves a raw implementation of this client that returns raw responses.
|
|
|
|
Returns
|
|
-------
|
|
AsyncRawServerClient
|
|
"""
|
|
return self._raw_client
|
|
|
|
async def get_version(self, *, request_options: typing.Optional[RequestOptions] = None) -> typing.Dict[str, str]:
|
|
"""
|
|
Returns the current Skyvern server version (git SHA for official builds).
|
|
|
|
Parameters
|
|
----------
|
|
request_options : typing.Optional[RequestOptions]
|
|
Request-specific configuration.
|
|
|
|
Returns
|
|
-------
|
|
typing.Dict[str, str]
|
|
Current server version
|
|
|
|
Examples
|
|
--------
|
|
import asyncio
|
|
|
|
from skyvern import AsyncSkyvern
|
|
|
|
client = AsyncSkyvern(
|
|
api_key="YOUR_API_KEY",
|
|
)
|
|
|
|
|
|
async def main() -> None:
|
|
await client.server.get_version()
|
|
|
|
|
|
asyncio.run(main())
|
|
"""
|
|
_response = await self._raw_client.get_version(request_options=request_options)
|
|
return _response.data
|