CoolFace
Apppublic

cmoss3/RcmEmailAutomation

sourceHugging Faceupdated 4mo agoView on Hugging Face
0likes
config.py49 linesDownload Raw Back to app
1from pathlib import Path2 3from pydantic import HttpUrl, SecretStr4from pydantic_settings import BaseSettings, SettingsConfigDict5 6 7class Settings(BaseSettings):8    azure_tenant_id: str9    azure_client_id: str10    azure_client_secret: SecretStr11 12    mailbox_user: str13    mail_folder_name: str14    notification_url: HttpUrl15    subscription_expiry_minutes: int = 423016 17    host: str = "0.0.0.0"18    port: int = 800019 20    database_path: Path = Path("/data/rcmemail.db")21    email_storage_path: Path = Path("/emails")22    log_path: Path = Path("/logs")23 24    dropbox_app_key: str25    dropbox_app_secret: SecretStr26    dropbox_refresh_token: SecretStr27    dropbox_po_path: str = "/RCM Supply/Inside Sales/POs"28    dropbox_invoice_path: str = "/RCM Supply/Inside Sales/Invoices"29    dropbox_mtr_path: str = "/RCM Supply/MTRs"30    processor_poll_interval: int = 1031 32    score_weight_filename: float = 0.3533    score_weight_ocr: float = 0.6534    score_freq_multiplier: float = 0.1035    score_min_threshold: float = 0.3036    brief_recipients: str = ""37    dev_alert_recipients: str = ""38 39    model_config = SettingsConfigDict(env_file=".env", extra="ignore")40 41    def brief_recipient_list(self) -> list[str]:42        return [r.strip() for r in self.brief_recipients.split(",") if r.strip()]43 44    def dev_alert_recipient_list(self) -> list[str]:45        return [r.strip() for r in self.dev_alert_recipients.split(",") if r.strip()]46 47 48settings = Settings()49