mcpField
F
fastapi-backend-template

fastapi-backend-template

github.com/rebyteai-template開発17238 回インストール19 週間前に更新
リポジトリ

fastapi-backend-template について

Python プロジェクト向けの FastAPI バックエンドテンプレートで、PostgreSQL、非同期 SQLAlchemy 2.0、Alembic、Docker を組み合わせています。API の構築とデータベースマイグレーションを始めるための土台になります。

主な機能

  1. 01FastAPI アプリケーションの基盤
  2. 02PostgreSQL データベース設定
  3. 03非同期 SQLAlchemy 2.0 の統合
  4. 04Alembic マイグレーション対応
  5. 05Docker セットアップの案内

活用シーン

  1. 01Python API プロジェクトを開始
  2. 02PostgreSQL を使う API を構築
  3. 03マイグレーションでスキーマ変更を管理

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/rebyteai-template/rebyte-skills --skill fastapi-backend-template

インストール後、Claude Code で/fastapi-backend-templateを入力して読み込まれたか確認します。

詳細

FastAPI バックエンドテンプレート

PostgreSQL、非同期 SQLAlchemy 2.0、Alembic マイグレーション、Docker を使用した FastAPI。

技術スタック

  • フレームワーク: FastAPI
  • 言語: Python
  • ORM: SQLAlchemy 2.0(非同期)
  • マイグレーション: Alembic
  • データベース: PostgreSQL

前提条件

  • Python 3.11+
  • Docker(推奨)
  • PostgreSQL

セットアップ

1. テンプレートをクローンする
git clone --depth 1 https://github.com/Aeternalis-Ingenium/FastAPI-Backend-Template.git .

ディレクトリが空でない場合:

git clone --depth 1 https://github.com/Aeternalis-Ingenium/FastAPI-Backend-Template.git _temp_template
mv _temp_template/* _temp_template/.* . 2>/dev/null || true
rm -rf _temp_template
2. Git 履歴を削除する(任意)
rm -rf .git
git init
3. 仮想環境をセットアップする
python -m venv venv
source venv/bin/activate  # or venv\Scripts\activate on Windows
pip install -r requirements.txt
4. データベースをセットアップする

PostgreSQL を設定し、Alembic マイグレーションを実行します。

開発

uvicorn main:app --reload

コメント