Skip to content

Latest commit

 

History

History
30 lines (26 loc) · 1.32 KB

README.md

File metadata and controls

30 lines (26 loc) · 1.32 KB

Cookiecutter FastAPI Starter Kit

An opinionated starter kit for quickly building FastAPI services with MySQL, SQLAlchemy, Alembic.

Features

  • FastAPI for service creation
  • Uvicorn ASGI server for local development, Mangum for deploying to AWS Lambda
  • SQLAlchemy & Alembic for ORM/database migrations
  • Default database dialect is MySQL but easily configurable to use Postgres, etc.
  • Uses AWS Cognito for Auth - decodes JWT tokens from Cognito. Easily configured to decode tokens generated elsewhere.

Installation

  1. Install poetry, used for managing dependencies and virtual environments.

  2. Install cookiecutter on your machine:

    $ pip install cookiecutter
    
  3. Run cookiecutter to clone the project to your current director:

    $ cookiecutter https://github.com/rwhitten577/fast-api-starter-kit.git
    
  4. Follow prompts to name your project. git_repo_name should be what your future repo will be (using dashes), and project_name will be used to name your Python package (using underscores).

    git_repo_name [example-repo-name-using-dashes]: your-repo-name-here
    project_name [example_project_name_using_underscores]: your_project_name
    
  5. CD to your new project and install dependencies with poetry install.

  6. Run tests with pytest.