34 lines
664 B
Python
34 lines
664 B
Python
"""API-Konfiguration."""
|
|
|
|
from pydantic_settings import BaseSettings
|
|
from typing import Optional
|
|
|
|
|
|
class Settings(BaseSettings):
|
|
"""Rippy API Settings."""
|
|
|
|
# API Keys
|
|
tmdb_api_key: Optional[str] = None
|
|
thetvdb_api_key: Optional[str] = None
|
|
musicbrainz_user: Optional[str] = None
|
|
|
|
# Cache
|
|
cache_ttl: int = 86400 # 24h default
|
|
|
|
# Ripping
|
|
rip_output_dir: str = "/app/media"
|
|
temp_dir: str = "/app/temp"
|
|
|
|
# Logging
|
|
log_level: str = "INFO"
|
|
|
|
# JWT
|
|
jwt_secret_key: Optional[str] = None
|
|
|
|
class Config:
|
|
env_file = ".env"
|
|
env_file_encoding = "utf-8"
|
|
|
|
|
|
settings = Settings()
|