37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
"""Konfiguration, wird aus Umgebungsvariablen / .env geladen."""
|
|
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8", extra="ignore")
|
|
|
|
# --- phpipam ---
|
|
phpipam_base_url: str # z.B. https://ipam.firma.local
|
|
phpipam_app_id: str # App-ID der phpIPAM API-App (Administration > API)
|
|
|
|
# Variante A: statischer App-Token (App-Security-Type "Token" in phpipam)
|
|
phpipam_app_token: str | None = None
|
|
|
|
# Variante B: User-Login, Token wird zur Laufzeit geholt
|
|
phpipam_username: str | None = None
|
|
phpipam_password: str | None = None
|
|
|
|
phpipam_verify_ssl: bool = True
|
|
|
|
# --- Outline ---
|
|
outline_base_url: str # z.B. https://outline.firma.local
|
|
outline_api_token: str
|
|
outline_collection_id: str # Ziel-Collection für die Subnetz-Dokumente
|
|
outline_parent_document_id: str | None = None # z.B. die "Netze"-Seite; Docs werden darunter angelegt
|
|
outline_verify_ssl: bool = True
|
|
|
|
# --- Sync ---
|
|
sync_dry_run: bool = False
|
|
|
|
# Automatischer Zeitplan (Cron-Syntax, Standard: jede volle Stunde)
|
|
sync_schedule_enabled: bool = True
|
|
sync_schedule_cron: str = "0 * * * *"
|
|
|
|
|
|
settings = Settings() # type: ignore[call-arg]
|