Buckets:

download
raw
810 Bytes
from pathlib import Path
from threading import RLock
class RuntimeConfig:
"""
Runtime-safe configuration.
Can be changed while app is running.
"""
def __init__(self):
self._lock = RLock()
self._data_base_path: Path | None = None
# -------------------------
# Data Base Path
# -------------------------
def set_data_base_path(self, path: Path) -> None:
with self._lock:
self._data_base_path = Path(path)
def get_data_base_path(self) -> Path:
with self._lock:
if self._data_base_path is None:
raise RuntimeError(
"DATA_BASE_PATH is not configured at runtime"
)
return self._data_base_path
# Singleton (critical)
runtime_config = RuntimeConfig()

Xet Storage Details

Size:
810 Bytes
·
Xet hash:
660ccc1da18c83c78f28c5951f4b3d6b24c6a88cadaa4472f120fb01f8f82070

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.