2026-10-23 11:43:49 -05:00
|
|
|
"""
|
2026-11-18 05:18:55 +06:00
|
|
|
DataStack Python SDK Compatibility Alias (`datastack_sdk`).
|
|
|
|
|
Re-exports all canonical symbols from `sdk/python/datastack` (`datastack`)
|
|
|
|
|
so both `from datastack import DataStack` and legacy
|
|
|
|
|
`from datastack_sdk import DataStackClient` share a single source of truth.
|
2026-10-23 11:43:49 -05:00
|
|
|
"""
|
|
|
|
|
|
2026-11-18 05:18:55 +06:00
|
|
|
import sys
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def _ensure_canonical_datastack_on_path() -> None:
|
|
|
|
|
try:
|
|
|
|
|
import datastack # noqa: F401
|
|
|
|
|
return
|
|
|
|
|
except ImportError:
|
|
|
|
|
repo_canonical = (
|
|
|
|
|
Path(__file__).resolve().parents[2] / "sdk" / "python" / "datastack"
|
|
|
|
|
)
|
|
|
|
|
if repo_canonical.is_dir() and str(repo_canonical) not in sys.path:
|
|
|
|
|
sys.path.insert(0, str(repo_canonical))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
_ensure_canonical_datastack_on_path()
|
|
|
|
|
|
|
|
|
|
from datastack import ( # noqa: E402, F401
|
2026-11-18 02:51:04 +06:00
|
|
|
ConnectionState,
|
|
|
|
|
DataStack,
|
|
|
|
|
DataStackAuthError,
|
|
|
|
|
DataStackClient,
|
|
|
|
|
DataStackConfig,
|
|
|
|
|
DataStackConfigError,
|
|
|
|
|
DataStackConnectionError,
|
|
|
|
|
DataStackError,
|
|
|
|
|
DataStackFileError,
|
|
|
|
|
DataStackOfflineSpoolError,
|
|
|
|
|
DataStackPayloadTooLargeError,
|
|
|
|
|
DataStackRateLimitError,
|
|
|
|
|
DiskSpooler,
|
|
|
|
|
HeartbeatMonitor,
|
2026-11-18 05:18:55 +06:00
|
|
|
__version__,
|
2026-11-18 02:51:04 +06:00
|
|
|
load_config,
|
|
|
|
|
)
|
2026-10-23 11:43:49 -05:00
|
|
|
|
2026-11-18 02:51:04 +06:00
|
|
|
__all__ = [
|
|
|
|
|
"DataStack",
|
|
|
|
|
"DataStackClient",
|
|
|
|
|
"DataStackConfig",
|
|
|
|
|
"load_config",
|
|
|
|
|
"ConnectionState",
|
|
|
|
|
"HeartbeatMonitor",
|
|
|
|
|
"DiskSpooler",
|
|
|
|
|
"DataStackError",
|
|
|
|
|
"DataStackConfigError",
|
|
|
|
|
"DataStackAuthError",
|
|
|
|
|
"DataStackConnectionError",
|
|
|
|
|
"DataStackRateLimitError",
|
|
|
|
|
"DataStackPayloadTooLargeError",
|
|
|
|
|
"DataStackFileError",
|
|
|
|
|
"DataStackOfflineSpoolError",
|
|
|
|
|
]
|