/cookiecutter-fastapi

Primary LanguagePythonMIT LicenseMIT

cookiecutter-fastapi

This is a fastapi cookiecutter template, which has the following features:

  • uses docker-compose for development (postgres, redis)
  • uses makefile for running commands
  • has a sample Dockerfile prepared
  • uses poetry
  • has a linting support
  • supports alembic migrations
  • includes authentication through the fastapi-users
  • includes admin through sqladmin package

Setup

  1. have python 3.11 ready
  2. install the cookiecutter package pip install cookiecutter
  3. have poetry package manager ready pip install poetry
  4. generate your cookiecutter gh:dionysio/cookiecutter-fastapi
  5. move to your project and install dependencies:
cd <project>
poetry install
  1. and you can finally run your project make run
  2. open http://127.0.0.1:8000