0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

FastAPIのディレクトリ構成

Posted at

公式ドキュメント
https://github.com/fastapi/fastapi
https://github.com/fastapi/full-stack-fastapi-template

/
└ src/...sourceの略(appの名前のものもある)
  ├ assets/
  ├ crud/
  ├ database/
  ├ routers/
  ├ schemas/
  ├ services/
  ├ init.py
  ├ dependencies.py
  ├ main.py
  └ models.py

ディレクトリ説明

名前 説明
assets 画像データなどを格納
crud DBのcrud操作に関する処理
database DB設定に関する処理
routers ルーティング後のエンドポイント
schemas データのスキーマ定義
services crud操作に関係のない関数

ファイル説明

名前 説明
init.py 何も書かなくて良い モジュール設定用
dependencies.py 依存性注入に関する記述
main.py エンドポイントに関する設定を行うFastAPIの実行ファイル
models.py DBモデル設計 ORM (Object Relational Mapper)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?