mirror of
https://github.com/rommapp/romm.git
synced 2026-11-30 18:42:34 +01:00
Pydantic enforces response types before JSON serialization, so the Python dict must use int keys to match the actual data. JSON handles the int-to-string conversion automatically. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
441 B
Python
23 lines
441 B
Python
from typing import TypedDict
|
|
|
|
|
|
class MetadataCoverageItem(TypedDict):
|
|
source: str
|
|
matched: int
|
|
|
|
|
|
class RegionBreakdownItem(TypedDict):
|
|
region: str
|
|
count: int
|
|
|
|
|
|
class StatsReturn(TypedDict):
|
|
PLATFORMS: int
|
|
ROMS: int
|
|
SAVES: int
|
|
STATES: int
|
|
SCREENSHOTS: int
|
|
TOTAL_FILESIZE_BYTES: int
|
|
METADATA_COVERAGE: dict[int, list[MetadataCoverageItem]]
|
|
REGION_BREAKDOWN: dict[int, list[RegionBreakdownItem]]
|