Routes

LongLink projects use standard FastAPI(opens in new tab). Define routes with APIRouter and add them to the application as you would in any FastAPI project.

Usage

python
from fastapi import APIRouter
router = APIRouter(prefix="/api")
@router.get("/sample")
async def sample() -> str:
"""This is a fastapi endpoint"""
return "ok"