Simple web backend added with upload/status/process/download API

This commit is contained in:
2026-07-30 12:24:37 +00:00
parent 277c538f21
commit cd56637d2a
20 changed files with 594 additions and 0 deletions
+33
View File
@@ -0,0 +1,33 @@
"""Configuration settings for the web backend."""
import os
from pathlib import Path
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
# Server
host: str = "0.0.0.0"
port: int = 8000
debug: bool = False
# File handling
max_upload_size_mb: int = 500
temp_dir: Path = Path("/tmp/audio_splitter_web")
cleanup_after_seconds: int = 3600 # 1 hour
# CORS
allow_origins: list[str] = ["http://localhost:5173", "http://localhost:3000"]
class Config:
env_file = ".env"
env_file_encoding = "utf-8"
settings = Settings()
# Ensure temp directory exists
settings.temp_dir.mkdir(parents=True, exist_ok=True)