Home / Packages / @flyeric0212/frameworks-fastapi

@flyeric0212/frameworks-fastapi

FastAPI 高性能 Python API 的约定和最佳实践。 globs: **/*.py

prpm install @flyeric0212/frameworks-fastapi
0 total downloads

📄 Full Prompt Content

---
description: FastAPI 高性能 Python API 的约定和最佳实践。
globs: **/*.py
alwaysApply: false
---

# FastAPI 规则

- 为所有函数参数和返回值使用类型提示
- 使用 Pydantic 模型进行请求和响应验证
- 在路径操作装饰器中使用适当的 HTTP 方法(@app.get、@app.post 等)
- 使用依赖注入实现共享逻辑,如数据库连接和身份验证
- 使用后台任务(background tasks)进行非阻塞操作
- 使用适当的状态码进行响应(201 表示创建,404 表示未找到等)
- 使用 APIRouter 按功能或资源组织路由
- 适当使用路径参数、查询参数和请求体

═══════════════════════════════════════════════════════════════════
═══ ENGLISH TRANSLATION ═══
═══════════════════════════════════════════════════════════════════

---
description: Frameworks Fastapi Development Guidelines (Translation)
---

# Frameworks Fastapi Guidelines - English Translation

**Note**: This package contains Chinese cursor rules for Frameworks Fastapi.

**Original Language**: Chinese (Simplified)

**Content Summary**: This package provides comprehensive development guidelines, best practices, and coding standards for Frameworks Fastapi. The rules cover code organization, naming conventions, design patterns, testing strategies, and performance optimization.

**Translation Status**: Automated translation placeholder. For accurate technical translation of specific terms and context, please:
1. Use the original Chinese content above as authoritative reference
2. Refer to official Frameworks Fastapi documentation in English
3. The technical patterns and code examples remain universal across languages

**How to Use**:
- Code blocks and examples use universal syntax
- Technical terms (APIs, methods, libraries) are typically in English even in Chinese text
- Structure and organization principles translate directly to English development practices

**Content Length**: 338 characters of detailed technical guidance

For community-contributed English translation, please refer to the source repository.

💡 Suggested Test Inputs

Loading suggested inputs...

🎯 Community Test Results

Loading results...

📦 Package Info

Format
cursor
Type
rule
Category
backend-frameworks
License
MIT

🔗 Links

🏷️ Tags