from fastapi import APIRouter router = APIRouter() @router.get("/ping") async def web_ping(): return "pong"