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
+38
View File
@@ -0,0 +1,38 @@
"""Response models for API endpoints."""
from typing import Optional, List
from enum import Enum
from pydantic import BaseModel, Field
class TaskStatus(str, Enum):
PENDING = "pending"
PROCESSING = "processing"
DONE = "done"
ERROR = "error"
class TrackInfo(BaseModel):
filename: str
size: int # bytes
class UploadResponse(BaseModel):
task_id: str
filename: str
size: int
class SplitResponse(BaseModel):
task_id: str
status: TaskStatus
class StatusResponse(BaseModel):
task_id: str
status: TaskStatus
progress: int = Field(0, ge=0, le=100)
message: str = ""
error: Optional[str] = None
tracks: List[TrackInfo] = []