First attempt to tink demo
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
Some checks failed
Build and Deploy / build-and-deploy (push) Has been cancelled
This commit is contained in:
25
src/config.py
Normal file
25
src/config.py
Normal file
@@ -0,0 +1,25 @@
|
||||
"""
|
||||
App configuration loaded from environment / .env file.
|
||||
"""
|
||||
|
||||
import os
|
||||
from functools import lru_cache
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
class Settings:
|
||||
tink_client_id: str = os.environ["TINK_CLIENT_ID"]
|
||||
tink_client_secret: str = os.environ["TINK_CLIENT_SECRET"]
|
||||
tink_redirect_uri: str = os.getenv("TINK_REDIRECT_URI", "http://localhost:8000/callback")
|
||||
app_base_url: str = os.getenv("APP_BASE_URL", "http://localhost:8000")
|
||||
session_secret: str = os.getenv("SESSION_SECRET", "dev-only-change-in-prod")
|
||||
tink_api_base: str = os.getenv("TINK_API_BASE", "https://api.tink.com")
|
||||
tink_link_base: str = os.getenv("TINK_LINK_BASE", "https://link.tink.com")
|
||||
demo_mode: bool = os.getenv("DEMO_MODE", "false").lower() in ("true", "1", "yes")
|
||||
|
||||
|
||||
@lru_cache
|
||||
def get_settings() -> Settings:
|
||||
return Settings()
|
||||
Reference in New Issue
Block a user