"""General application settings.""" from pydantic import Field from pydantic_settings import BaseSettings class Settings(BaseSettings): """Application settings.""" # --- General Settings --- # Preprocessing configuration file path. PP_CONFIG_PATH: str = Field( "src/preprocess.yaml", description="Path to the preprocessing configuration YAML file.", ) # SQLite database file path. # For in memory, use ":memory:" (not persistent). DB_PATH: str = Field( "data/database.sqlite", description="Path to the SQLite database." ) # --- API Keys --- # Preprocessor API key to access this app. PP_API_KEY: str = Field( ..., description="API key to access this app for preprocessing." ) # API key needed to access the endpoint that queries the database. DB_ENDPOINT_API_KEY: str = Field( ..., description="API key needed to access the database query endpoint." ) # --- Power BI Settings --- # Power BI base URL. POWERBI_BASE_URL: str = Field( "https://api.powerbi.com/v1.0/myorg", # "https://api.powerbigov.us/v1.0/myorg", # Rare: US Gov Cloud # "https://api.powerbi.de/v1.0/myorg", # Rare: Germany # "https://api.powerbi.cn/v1.0/myorg", # Rare: China description="Base URL for Power BI REST API.", ) # Power BI authority base. POWERBI_AUTHORITY_BASE: str = Field( "https://login.microsoftonline.com", description="Base URL for Power BI authority.", ) # Power BI Dataset ID. POWERBI_DATASET_ID: str = Field( ..., description="Power BI Dataset ID to read data from." ) # Power BI Table Name. POWERBI_TABLE_NAME: str = Field( ..., description="Power BI Table name to read data from." ) # Power BI Tenant ID. POWERBI_TENANT_ID: str = Field( ..., description="Azure AD Tenant ID for Power BI authentication." ) # Power BI Client ID. POWERBI_CLIENT_ID: str = Field( ..., description="Azure AD Client ID for Power BI authentication." ) # Power BI Client Secret. POWERBI_CLIENT_SECRET: str = Field( ..., description="Azure AD Client Secret for Power BI authentication." ) settings = Settings()