mirror of
https://github.com/sanjeed5/awesome-cursor-rules-mdc.git
synced 2026-11-29 22:22:55 +08:00
rename folder
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
---
|
||||
description: Specific guidelines for FastAPI application structure and setup in the main application file.
|
||||
globs: **/main.py
|
||||
---
|
||||
- Use functional components (plain functions) and Pydantic models for input validation and response schemas.
|
||||
- Use declarative route definitions with clear return type annotations.
|
||||
- Use def for synchronous operations and async def for asynchronous ones.
|
||||
- Minimize @app.on_event("startup") and @app.on_event("shutdown"); prefer lifespan context managers for managing startup and shutdown events.
|
||||
- Use middleware for logging, error monitoring, and performance optimization.
|
||||
Reference in New Issue
Block a user