Files
mastobot/app/settings/defaults.py

14 lines
409 B
Python
Raw Permalink Normal View History

2026-02-13 18:18:14 +01:00
from pydantic_settings import BaseSettings, SettingsConfigDict
from functools import lru_cache
class Settings(BaseSettings):
mastodon_server:str
openai_api_key:str
feeds: dict[str, dict[str,object]]
model_config = SettingsConfigDict(env_file=".env", env_nested_delimiter='__', arbitrary_types_allowed=True)
version:str
@lru_cache
def get_settings():
return Settings() # type: ignore