← スキル一覧に戻る

develop-fastapi-app
by xiaoland
⭐ 0🍴 0📅 2026年1月12日
SKILL.md
name: develop-fastapi-app description: Build production-ready FastAPI applications with best practices for project structure, async patterns, Pydantic models, dependency injection, database operations, and testing. Use when developing FastAPI backends, REST APIs, or Python async web services. license: Apache-2.0 metadata: author: zhanymkanov, xiaoland version: "1.0"
Developing a FastAPI Application
When to use this skill
Use this skill when:
- Starting a new FastAPI project
- Refactoring existing FastAPI applications
- Implementing REST APIs with Python
- Working with async/await patterns in web services
- Setting up database models and migrations
- Writing tests for FastAPI endpoints
- Configuring dependency injection patterns
- Optimizing API performance and code quality
Project Structure
Organize projects by domain rather than file type for better scalability:
fastapi-project/
├── app/
│ ├── schemas/ # data structure and constraints
│ ├── models/ # schema with behavior
│ ├── managers/ # domain orchestrator
│ ├── exceptions/ # business exception
│ ├── routes/ # domain orchestrator
│ ├── settings.py # application global settings
│ ├── engine.py # database engine
├── utils/
├── libs/
├── tests/
│ ├── conftest.py
│ ├── <by_domain>/test_<xxx>.py
├── migrations/
├── scripts/
├── docs/
├── .env
├── .env.example
├── logging.ini
├── pyproject.toml
└── run.py # FastAPI app
File Templates:
- route.py - Router module with endpoints
- schemas.py - Pydantic request/response schemas
- models.py - SQLAlchemy database models
- dependencies.py - Validation dependencies
- manager.py - Domain orchestrator/service
- exceptions.py - Module-specific exceptions
- run.py - Main application file
- settings.py - Global configuration
- engine.py - Database engine setup
Notes:
- Store all domain modules inside
app/folder - Each subfolder (
schemas/,models/,managers/,routes/) is organized by domain- e.g.,
app/schemas/posts.py,app/managers/posts_manager.py,app/routes/posts.py
- e.g.,
- Import from other packages with explicit module names
References
Read revelant references before you really start your task:
- API Best Practices
- Async Patterns
- Pydantic Best Practices
- Dependencies Guide
- Database Operations
- Testing
General Best Practices
- Use Ruff for fast linting and formatting:
ruff check --fix src
ruff format src
スコア
総合スコア
50/100
リポジトリの品質指標に基づく評価
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
レビュー
💬
レビュー機能は近日公開予定です