Initial version of app
This commit is contained in:
13
app/settings/defaults.py
Normal file
13
app/settings/defaults.py
Normal file
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Reference in New Issue
Block a user