Skip to content

Latest commit

 

History

History
18 lines (15 loc) · 612 Bytes

File metadata and controls

18 lines (15 loc) · 612 Bytes

Python FastAPI with Pydantic v2

Cursor rules for building async APIs with FastAPI, Pydantic v2, and SQLAlchemy.

Covers

  • Pydantic v2 models (model_validator, field_validator, ConfigDict)
  • Async patterns with asyncio, httpx, aiofiles
  • Dependency injection with Depends() and Annotated types
  • SQLAlchemy 2.0 async with repository pattern
  • Error handling with HTTPException and custom exception handlers
  • Testing with pytest-asyncio and httpx AsyncClient
  • Security (JWT, bcrypt, CORS, rate limiting)
  • Alembic migrations

Usage

cp .cursorrules /path/to/your/fastapi-project/.cursorrules