from fastapi import APIRouter from .. import caldav_principal router = APIRouter(prefix="/calendar", tags=["calendar"]) @router.get("/list", response_model=list[str]) async def list_calendars() -> list[str]: principal = caldav_principal() return list( cal.name for cal in principal.calendars() )