Skip to content

Create FastAPI App

Create and manage FastAPI applications

Quick Tour

Follow these steps to set up a FastAPI project

Installation

This is a pip package. Thus, the only thing you need to do, is to run:

pip install create-fastapi-app

Usage

To create a new applications at a directory ~/my_fastapi_dir, run:

cfa create ~/my_fastapi_dir --auth=[none/self/backend]
cd ~/my_fastapi_dir

Then install the requirements (expects that you installed pipenv on your system):

pipenv shell
pipenv sync --dev

Initialize the database:

sh init_db.sh

Run the application:

python main.py

Done! You can view the interactivate documentation at localhost:8000/docs 😎