INNER CODE UNIT · Python

root

doganarif/fastapi-radar · example_app.py:140

async def root():
    """Root endpoint."""
    return {
        "message": "Welcome to the Example API",
        "dashboard": "Visit /__radar to see the debugging dashboard",
    }


@app.get("/products", response_model=List[ProductResponse])
async def list_products(
    skip: int = Query(0, ge=0),
    limit: int = Query(10, ge=1, le=100),
    in_stock_only: bool = False,
    db: Session = Depends(get_db),
):
    """List all products with pagination."""
    query = db.query(Product)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…