18 lines
352 B
Python
18 lines
352 B
Python
from __future__ import annotations
|
|
|
|
import os
|
|
|
|
SETTINGS_PREFIX = "OPENBAO__SETTINGS__"
|
|
|
|
|
|
def get_setting(name: str) -> str:
|
|
prefixed = os.getenv(f"{SETTINGS_PREFIX}{name}", "").strip()
|
|
if prefixed:
|
|
return prefixed
|
|
return os.getenv(name, "").strip()
|
|
|
|
|
|
def get_location() -> str:
|
|
return get_setting("LOCATION").lower() or "prod"
|
|
|