{"filename":"python-fastapi-cursorrules-prompt-file.mdc","content":"---\ndescription: \"Cursor rules for Python Fastapi.\"\nglobs: **/*\nalwaysApply: false\n---\n# Python FastAPI .cursorrules\n\n# FastAPI best practices\n\nfastapi_best_practices = [\n    \"Use Pydantic models for request and response schemas\",\n    \"Implement dependency injection for shared resources\",\n    \"Utilize async/await for non-blocking operations\",\n    \"Use path operations decorators (@app.get, @app.post, etc.)\",\n    \"Implement proper error handling with HTTPException\",\n    \"Use FastAPI's built-in OpenAPI and JSON Schema support\",\n]\n\n# Folder structure\n\nfolder_structure = \"\"\"\napp/\n  main.py\n  models/\n  schemas/\n  routers/\n  dependencies/\n  services/\n  tests/\n\"\"\"\n\n# Additional instructions\n\nadditional_instructions = \"\"\"\n1. Use type hints for all function parameters and return values\n2. Implement proper input validation using Pydantic\n3. Use FastAPI's background tasks for long-running operations\n4. Implement proper CORS handling\n5. Use FastAPI's security utilities for authentication\n6. Follow PEP 8 style guide for Python code\n7. Implement comprehensive unit and integration tests\n\"\"\"\n"}