add download service
This commit is contained in:
24
backend/app/openings_downloader/config.py
Normal file
24
backend/app/openings_downloader/config.py
Normal file
@@ -0,0 +1,24 @@
|
||||
from pydantic_settings import BaseSettings
|
||||
|
||||
|
||||
class DownloaderSettings(BaseSettings):
|
||||
"""Settings for the Openings Downloader module."""
|
||||
|
||||
# Shikimori API
|
||||
shikimori_user_agent: str = "AnimeQuiz/1.0"
|
||||
shikimori_token: str = "" # Optional OAuth token for higher rate limits
|
||||
|
||||
# S3 Storage limit (100 GB default)
|
||||
s3_storage_limit_bytes: int = 107_374_182_400 # 100 GB
|
||||
|
||||
# Download settings
|
||||
download_timeout_seconds: int = 300
|
||||
default_estimated_size_bytes: int = 6_291_456 # 6 MB default for unknown files
|
||||
|
||||
class Config:
|
||||
env_prefix = "DOWNLOADER_"
|
||||
env_file = ".env"
|
||||
extra = "ignore"
|
||||
|
||||
|
||||
downloader_settings = DownloaderSettings()
|
||||
Reference in New Issue
Block a user