INNER CODE UNIT · Python

_read_first_config_value

TianGzlab/OmicsClaw · omicsclaw/surfaces/desktop/server.py:375

def _read_first_config_value(*keys: str) -> str:
    for key in keys:
        value = str(os.environ.get(key, "") or "").strip()
        if value:
            return value
    return ""


def _positive_environment_integer(name: str, default: int) -> int:
    raw = str(os.environ.get(name, "") or "").strip()
    if not raw:
        return default
    if not raw.isdigit() or int(raw) <= 0:
        raise RuntimeError(f"{name} must be a positive integer")
    return int(raw)


def _app_cors_origins() -> list[str]:

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…