Template repository for a FastAPI + Uvicorn application with routers. (See FastAPI - Bigger Applications)
Includes setup for strict typechecking with mypy and linting with flake8 + settings for the VSCode Python extension.
Uses Python 3.10
Create a virtual environment:
python -m venv venv
Active the virtual environment:
./venv/Scripts/activate
Install dependencies:
python -m pip install -r requirements.txt
Run Uvicorn server with hot reloads:
uvicorn app.main:app --reload
Access the docs at [http://127.0.0.1:8000/docs] or the alternative docs at [http://127.0.0.1:8000/redoc].
Run mypy for typechecks:
mypy -m app
Run flake8 for linting:
flake8