import sys from os import getenv from dotenv import load_dotenv load_dotenv() def _required(key: str) -> str: val = getenv(key) if not val: print(f"missing required env var: {key}", file=sys.stderr) sys.exit(1) return val TIME_INTERVALL: int = int(getenv("SLEEP_INTERVALL", "60")) # web backend: alert POSTs discovered flats here WEB_URL: str = getenv("WEB_URL", "http://web:8000") INTERNAL_API_KEY: str = _required("INTERNAL_API_KEY") # secrets — BERLIN_WOHNEN_* env acts as bootstrap only; the web service # owns the live creds in its DB (admin UI), alert fetches them on each # scan via /internal/secrets. GMAPS_API_KEY is still env-only. GMAPS_API_KEY: str = _required("GMAPS_API_KEY") BERLIN_WOHNEN_USERNAME: str = getenv("BERLIN_WOHNEN_USERNAME", "") BERLIN_WOHNEN_PASSWORD: str = getenv("BERLIN_WOHNEN_PASSWORD", "")