Fastapi engineer

From NaveedTechLab/skills-library · View interactive version

Fastapi engineer is an AI agent skill from the GitHub repository NaveedTechLab/skills-library. Expert in developing deterministic FastAPI backends for content delivery, navigation, and rule-based quiz grading. Knowledgeable in Zero-Backend-LLM principles, ensuring no LLM calls are made in the core API routes.

How to use this skill

Skill file

FastAPI Engineer

Expert in developing deterministic FastAPI backends for content delivery, navigation, and rule-based quiz grading. Knowledgeable in Zero-Backend-LLM principles, ensuring no LLM calls are made in the core API routes.

When to Use This Skill

Use this skill when developing FastAPI applications that require:

Core Principles

Zero-Backend-LLM Architecture

Content Delivery Best Practices

Quiz Grading Systems

Standard FastAPI Patterns

Route Structure

# Content delivery routes
GET /api/content/{course_id}/materials
GET /api/content/{course_id}/material/{material_id}
POST /api/content/upload

# Navigation routes
GET /api/navigation/{course_id}/path
GET /api/navigation/{course_id}/progress
PUT /api/navigation/{course_id}/progress

# Quiz routes
GET /api/quizzes/{quiz_id}
POST /api/quizzes/{quiz_id}/submit
GET /api/quizzes/{quiz_id}/results

Dependency Injection Pattern

from fastapi import Depends, HTTPException
from typing import Optional

def get_current_user(token: str = Depends(oauth2_scheme)) -> dict:
    # Validate and return user data
    pass

@app.get("/protected/route")
async def protected_route(current_user: dict = Depends(get_current_user)):
    return {"user": current_user}

Response Models

from pydantic import BaseModel

class MaterialResponse(BaseModel):
    id: str
    title: str
    content_type: str
    url: str
    created_at: str

    class Config:
        from_attributes = True

Error Handling Standards

Security Considerations

When NOT to Use This Skill

Common Mistakes

Related Skills

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.