Home

Awesome

fastapi-sqlalchemy-postgres

High-performance Async REST API, in Python. FastAPI + SQLAlchemy + Uvicorn + PostgreSQL.

Get Started

Run Locally

  1. Clone this Repository.
  2. Run pipenv install from root. (Run pip install pipenv first, if necessary.)
  3. Rename .dist.env to .env. Fill in PostgreSQL connection vars.
  4. Generate DB Migrations: alembic revision --autogenerate. It will be applied when the application starts. You can trigger manually with alembic upgrade head.
  5. Run locally with uvicorn app.main:app --reload, or with the included Dockerfile / Docker-Compose file.

Run Locally with Docker-Compose WIP

  1. Clone this Repository.
  2. Generate a DB Migration: alembic revision --autogenerate.*
  3. Run locally using docker-compose. docker-compose -f docker-compose.local.yml -f docker-compose.yml up --build.

*app/settings/prestart.sh will run migrations for you before the app starts.

Build Your Application

Features

Core Dependencies

Additional Dependencies

TODO