Files
DataStack/sdk-python/datastack_sdk/__init__.py
T
Team Dark Devil 177ed4a844 refactor(auth): standardize session management and security
- Centralize secret retrieval using `getAdminSessionSecret`
- Replace manual session parsing with `verifyRequestAdminSession` utility
- Tighten API validation and improve security headers handling
- Enforce environment variable security for production deployments
2026-11-18 05:18:55 +06:00

62 lines
1.5 KiB
Python

"""
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.
"""
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
ConnectionState,
DataStack,
DataStackAuthError,
DataStackClient,
DataStackConfig,
DataStackConfigError,
DataStackConnectionError,
DataStackError,
DataStackFileError,
DataStackOfflineSpoolError,
DataStackPayloadTooLargeError,
DataStackRateLimitError,
DiskSpooler,
HeartbeatMonitor,
__version__,
load_config,
)
__all__ = [
"DataStack",
"DataStackClient",
"DataStackConfig",
"load_config",
"ConnectionState",
"HeartbeatMonitor",
"DiskSpooler",
"DataStackError",
"DataStackConfigError",
"DataStackAuthError",
"DataStackConnectionError",
"DataStackRateLimitError",
"DataStackPayloadTooLargeError",
"DataStackFileError",
"DataStackOfflineSpoolError",
]