Files
main/rules-v0-deprecated/cursorrules-file-cursor-ai-python-fastapi-api/fastapi-function-definitions.mdc
T
2025-03-03 23:40:27 +05:30

6 lines
320 B
Plaintext

---
description: Specifies the use of 'def' and 'async def' for function definitions within FastAPI routers.
globs: **/routers/*.py
---
- Use def for pure functions and async def for asynchronous operations.
- Use type hints for all function signatures. Prefer Pydantic models over raw dictionaries for input validation.