From partme-ai-full-stack-skills
Guides FastAPI development including routing, Pydantic validation, dependency injection, async operations, OpenAPI docs, authentication, middleware, and database integration for REST APIs.
npx claudepluginhub partme-ai/full-stack-skills --plugin t2ui-skillsThis skill uses the workspace's default tool permissions.
Use this skill whenever the user wants to:
Creates isolated Git worktrees for feature branches with prioritized directory selection, gitignore safety checks, auto project setup for Node/Python/Rust/Go, and baseline verification.
Executes implementation plans in current session by dispatching fresh subagents per independent task, with two-stage reviews: spec compliance then code quality.
Dispatches parallel agents to independently tackle 2+ tasks like separate test failures or subsystems without shared state or dependencies.
Use this skill whenever the user wants to:
FastAPI() and define route handlers/docsfrom fastapi import FastAPI, HTTPException, Depends
from pydantic import BaseModel
from datetime import datetime
app = FastAPI(title="My API", version="1.0.0")
# Request/Response models
class ItemCreate(BaseModel):
name: str
price: float
description: str | None = None
class ItemResponse(ItemCreate):
id: int
created_at: datetime
# Dependency example
async def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()
# Route handlers
@app.post("/items/", response_model=ItemResponse, status_code=201)
async def create_item(item: ItemCreate, db=Depends(get_db)):
db_item = Item(**item.model_dump())
db.add(db_item)
db.commit()
return db_item
@app.get("/items/{item_id}", response_model=ItemResponse)
async def get_item(item_id: int, db=Depends(get_db)):
item = db.query(Item).get(item_id)
if not item:
raise HTTPException(status_code=404, detail="Item not found")
return item
# Run the server
uvicorn main:app --reload
# Interactive docs available at http://localhost:8000/docs
from fastapi.security import OAuth2PasswordBearer
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
@app.get("/users/me")
async def read_current_user(token: str = Depends(oauth2_scheme)):
user = verify_token(token)
if not user:
raise HTTPException(status_code=401, detail="Invalid token")
return user
/docs, /redoc) for API explorationBackgroundTasks for non-blocking operations like email sendingfastapi, async API, Pydantic, OpenAPI, dependency injection, Python web, REST API, uvicorn