fastapi-templates
FastAPIプロジェクトテンプレートを素早く作成
非同期と依存性注入パターンを備えたクリーンなFastAPI構造が必要です。このスキルは、本番環境対応のAPIを開始するためのレイアウトとコード例を提供します。
Télécharger le ZIP du skill
Importer dans Claude
Allez dans Paramètres → Capacités → Skills → Importer un skill
Activez et commencez à utiliser
Tester
Utilisation de "fastapi-templates". FastAPIユーザーサービステンプレートを非同期パターンで計画する
Résultat attendu:
- api、core、models、schemas、services、repositoriesのフォルダレイアウト
- 非同期データベースセッションの依存関係とアプリケーションライフサイクルフロー
- ユーザーRepositoryとサービスの責務
- エンドポイントとテストセットアップの概要
Utilisation de "fastapi-templates". データベースセッションの依存性注入をどのように設定しますか?
Résultat attendu:
- SQLAlchemyのsessionmakerでAsyncSessionLocalを使用する
- try/except/finallyを含むget_db非同期ジェネレータ依存関係を作成する
- テストでテストデータベースセッションで依存関係をオーバーライドする
- 成功時にコミット、例外時にロールバック
Audit de sécurité
SûrThis is a documentation-only skill containing architectural guidance and code examples for FastAPI projects. All 41 static findings are FALSE POSITIVES: cryptographic algorithms (bcrypt, HS256) shown are industry-standard secure choices; backtick patterns are markdown code delimiters, not shell execution; environment variable references are Pydantic configuration definitions, not secret access. The skill has no executable code, network calls, or filesystem access capabilities.
Facteurs de risque
🌐 Accès réseau (2)
⚙️ Commandes externes (14)
🔑 Variables d’environnement (7)
Score de qualité
Ce que vous pouvez construire
新しいAPIのベースライン
新しいサービスのFastAPI構造を非同期、依存性注入、テストパターンで定義します。
MVP APIセットアップ
最初のFastAPI MVPのための明確なプロジェクトレイアウトとコアパターンを取得します。
チームアーキテクチャガイド
複数のAPI間でリポジトリとサービス層のパターンを標準化します。
Essayez ces prompts
各フォルダとファイルの目的についての簡潔なメモ付き、クリーンなFastAPIフォルダ構造を提供します。
依存性注入と安全なコミット処理を備えた最小の非同期データベースセッションセットアップを示します。
非同期CRUD用のベースリポジトリパターンと、それを使用するユーザーサービス層を起草します。
JWT認証フローとユーザーエンドポイント用の最小の非同期テスト戦略を概説します。
Bonnes pratiques
- ルート、データベース、バックグラウンドタスク全体で非同期を維持する
- 明確さのためにルート、サービス、リポジトリを分離する
- 一貫したリクエストとレスポンズデータにPydanticスキーマを使用する
Éviter
- ルートハンドラ内にビジネスロジックを配置する
- 非同期ルートでブロックするデータベースドライバーを使用する
- コアユーザーフローのテストをスキップする