add pydantic settings
This commit is contained in:
13
settings.py
Normal file
13
settings.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from pydantic import Field
|
||||
from pydantic_settings import BaseSettings, SettingsConfigDict
|
||||
|
||||
class Settings(BaseSettings):
|
||||
jellyfin_server_url: str = Field(..., env="JELLYFIN_SERVER_URL")
|
||||
jellyfin_username: str = Field(..., env="JELLYFIN_USERNAME")
|
||||
jellyfin_password: str = Field(..., env="JELLYFIN_PASSWORD")
|
||||
|
||||
discord_app_id: str = Field(..., env="DISCORD_APP_ID")
|
||||
|
||||
model_config = SettingsConfigDict(env_file=".env", env_file_encoding="utf-8")
|
||||
|
||||
settings = Settings()
|
||||
Reference in New Issue
Block a user