From ca0aef34fe61f0da03bce89cc7eead063505ad91 Mon Sep 17 00:00:00 2001 From: Walter Oggioni Date: Sat, 2 May 2026 06:51:22 +0200 Subject: [PATCH] Add Splitwise clone backend --- app/config.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 app/config.py diff --git a/app/config.py b/app/config.py new file mode 100644 index 0000000..5ff7527 --- /dev/null +++ b/app/config.py @@ -0,0 +1,18 @@ +from pydantic_settings import BaseSettings, SettingsConfigDict + + +class Settings(BaseSettings): + model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8") + + database_url: str = "postgres://spliteasy:spliteasy@localhost:5432/spliteasy" + oidc_issuer: str = "https://keycloak.example.com/realms/myrealm" + oidc_client_id: str = "spliteasy" + oidc_client_secret: str = "" + allowed_audiences: str = "account,spliteasy" + + @property + def audiences(self) -> list[str]: + return [a.strip() for a in self.allowed_audiences.split(",") if a.strip()] + + +settings = Settings()