mirror of
https://github.com/volcengine/OpenViking.git
synced 2026-10-01 17:57:49 +08:00
* feat: extract standalone python http sdk * fix(python-sdk): restore ovcli.conf compatibility fix(python-sdk): restore compatibility and lazy-load sdk fix(python-sdk): restore legacy http client compatibility docs(python-sdk): add chinese readme
39 lines
1.1 KiB
Python
39 lines
1.1 KiB
Python
# Copyright (c) 2026 Beijing Volcano Engine Technology Co., Ltd.
|
|
# SPDX-License-Identifier: AGPL-3.0
|
|
"""
|
|
OpenViking client.
|
|
This module provides both synchronous and asynchronous clients.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from typing import TYPE_CHECKING
|
|
|
|
if TYPE_CHECKING:
|
|
from openviking.async_client import AsyncOpenViking
|
|
from openviking.sync_client import SyncOpenViking
|
|
from openviking_cli.client.http import AsyncHTTPClient
|
|
from openviking_cli.client.sync_http import SyncHTTPClient
|
|
|
|
__all__ = ["SyncOpenViking", "AsyncOpenViking", "SyncHTTPClient", "AsyncHTTPClient"]
|
|
|
|
|
|
def __getattr__(name: str):
|
|
if name == "AsyncOpenViking":
|
|
from openviking.async_client import AsyncOpenViking
|
|
|
|
return AsyncOpenViking
|
|
if name == "SyncOpenViking":
|
|
from openviking.sync_client import SyncOpenViking
|
|
|
|
return SyncOpenViking
|
|
if name == "AsyncHTTPClient":
|
|
from openviking_cli.client.http import AsyncHTTPClient
|
|
|
|
return AsyncHTTPClient
|
|
if name == "SyncHTTPClient":
|
|
from openviking_cli.client.sync_http import SyncHTTPClient
|
|
|
|
return SyncHTTPClient
|
|
raise AttributeError(name)
|