Install any skill in seconds. Free to start, no credit card required.
Get Started Free →aiskillstore/python-fastapi-patterns
FastAPI web framework patterns.
Passed 22 of 22 test cases with the skill, and 21 of 22 without it.
1 fixed21 passed either way0 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
A test case the skill fixed. Same model, same prompt, with and without the skill.
Write a pytest fixture and test function using `httpx.AsyncClient` and `ASGITransport` to test an async Python web application endpoint asynchronously without spinning up a live server.
| Checked | Without skill | With skill |
|---|---|---|
| Uses httpx.AsyncClient with transport=ASGITransport(app=app) | Passed | Passed |
| Marks the test function with @pytest.mark.asyncio | Missed | Passed |
The instructions your model reads when the skill loads.
Modern async API development with FastAPI.
from fastapi import FastAPI
from contextlib import asynccontextmanager
@asynccontextmanager
async def lifespan(app: FastAPI):
"""Application lifespan - startup and shutdown."""
# Startup
app.state.db = await create_db_pool()
yield
# Shutdown
await app.state.db.close()
app = FastAPI(
title="My API",
version="1.0.0",
lifespan=lifespan,
)
@app.get("/")
async def root():
return {"message": "Hello World"}
from pydantic import BaseModel, Field, EmailStr
from datetime import datetime
class UserCreate(BaseModel):
"""Request model with validation."""
name: str = Field(..., min_length=1, max_length=100)
email: EmailStr
test cases passed, vs 21 / 22 without
Published skills whose descriptions closely match this one, with their headline benchmark lift.
More skills from the same source and nearby in the registry, with their headline benchmark lift.