from pydantic_settings import BaseSettings from typing import List import json class Settings(BaseSettings): # OpenRouter openrouter_api_key: str openrouter_model: str = "anthropic/claude-3.5-sonnet" # Instagram instagram_account_id: str instagram_access_token: str # Google Drive google_credentials_json: str # Canva canva_api_key: str = "" # RSS Feeds rss_feeds: str # Database database_url: str = "sqlite:///./instagram_autoposter.db" # Prefect prefect_api_url: str = "" class Config: env_file = ".env" case_sensitive = False @property def rss_feed_list(self) -> List[str]: return [feed.strip() for feed in self.rss_feeds.split(",")] @property def google_credentials_dict(self) -> dict: return json.loads(self.google_credentials_json) settings = Settings()