BTruer / fastapi-prod-starter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Production grade fastapi repo starter

Prereqs:

  1. pyenv
  2. pipenv
  3. docker

How to use

  1. Pick a python version (set to 3.7.0 by default) and update the following files to match that version: tox.ini, pyproject.toml, .pre-commit-config.yaml, .python-version, Pipfile, mypy.ini
  2. Install the python version you want pyenv install 3.7.0
  3. Point pipenv to the python version pipenv --python /Users/user/.pyenv/versions/3.7.0/bin/python3.7
  4. pipenv install --dev
  5. pipenv shell
  6. pre-commit install

Container: https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

The following tools have been installed:

  1. flake8 - linting tool for clean code
  2. flake8-docstrings - enforces doc strings
  3. black - auto code formatter
  4. pre-commit - runs scripts/tools before commiting anything
  5. mypy - static type checker for Python
  6. tox - automated testing
  7. pytest - testing framework

To change the version of Python you will need to change the python version references on all configuration files.

About

License:MIT License


Languages

Language:Python 96.1%Language:Dockerfile 3.9%