スキル一覧に戻る
ahmed6ww

fastapi-code-structure

by ahmed6ww

1🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: fastapi-code-structure description: Enforce enterprise-grade project structure (Dispatch style), dependency injection patterns, and async concurrency rules for FastAPI. version: 2.0.0 allowed-tools: "Read,Write"

FastAPI Enterprise Standards

1. Directory Structure

Do not structure by file type (routers/, models/). Structure by Domain Component. Refer to the standard layout: Read({baseDir}/assets/project_layout.txt) [9].

2. Concurrency Rules

  • Async Safety: Never put blocking I/O (synchronous DB calls, heavy calculation) inside async def routes. This blocks the event loop [10].
  • Remediation: If blocking code is necessary, define the route as def (sync) so FastAPI runs it in a threadpool [11].

3. Dependency Injection

Use dependencies for data validation against the DB, not just Pydantic validation. Decouple dependencies to maximize caching within the request scope [12]. File: assets/project_layout.txt src/ auth/ # Domain Component router.py # Endpoints service.py # Business Logic models.py # SQLAlchemy Models schemas.py # Pydantic Models dependencies.py # Component-specific DI billing/ # Domain Component router.py service.py config.py # Split BaseSettings main.py # App Factory


スコア

総合スコア

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

レビュー

💬

レビュー機能は近日公開予定です