Add api server2

2
This commit is contained in:
2026-02-08 20:48:59 +01:00
parent 627a730191
commit 5a2fdd65d0
14 changed files with 328 additions and 0 deletions

12
api/config.py Normal file
View File

@@ -0,0 +1,12 @@
import os
from pathlib import Path
DEVICE: str = os.getenv("SCANNER_DEVICE", "pfusp")
SCAN_DIR: Path = Path(os.getenv("SCAN_DIR", "scans"))
SCRIPT_PATH: Path = Path(os.getenv("SCAN_SCRIPT", "scan.sh"))
ALLOWED_MODES: list[str] = ["Lineart", "Halftone", "Gray", "Color"]
MIN_RESOLUTION: int = 50
MAX_RESOLUTION: int = 1200
SCAN_TIMEOUT: int = int(os.getenv("SCAN_TIMEOUT", "600"))