Python FastAPI .cursorrules
Add this skill
npx mdskills install PatrickJS/cursor-python-fastapiBasic FastAPI guidance with good folder structure but lacks actionable trigger conditions and execution steps
1# Python FastAPI .cursorrules23# FastAPI best practices45fastapi_best_practices = [6 "Use Pydantic models for request and response schemas",7 "Implement dependency injection for shared resources",8 "Utilize async/await for non-blocking operations",9 "Use path operations decorators (@app.get, @app.post, etc.)",10 "Implement proper error handling with HTTPException",11 "Use FastAPI's built-in OpenAPI and JSON Schema support",12]1314# Folder structure1516folder_structure = """17app/18 main.py19 models/20 schemas/21 routers/22 dependencies/23 services/24 tests/25"""2627# Additional instructions2829additional_instructions = """301. Use type hints for all function parameters and return values312. Implement proper input validation using Pydantic323. Use FastAPI's background tasks for long-running operations334. Implement proper CORS handling345. Use FastAPI's security utilities for authentication356. Follow PEP 8 style guide for Python code367. Implement comprehensive unit and integration tests37"""3839
Full transparency — inspect the skill content before installing.