Skip to content

Latest commit

 

History

History
52 lines (38 loc) · 1.89 KB

readme.md

File metadata and controls

52 lines (38 loc) · 1.89 KB

Async template on FastAPI and SQLAlchemy 1.4

GitHub issues GitHub forks GitHub stars GitHub license

Description

Production-ready dockerized async REST API on FastAPI with SQLAlchemy and PostgreSQL

Key Features

  • tests on pytest with automatic rollback after each test case
  • db session stored in Python's context variable
  • configs for mypy, pylint, isort and black
  • Alembic for DB migrations
  • CI with Github

After git clone run

task -l  # list of tasks with descriptions

Prepare virtual environment

python3 -m venv venv
source venv/bin/activate
poetry install

Poetry is python package manager.

Poetry resolve dependencies and conflicts in package and make it fast.

Basic usage

  • poetry lock lock dependencies
  • poetry update lock, update and install dependencies
  • poetry install for install dependencies from pyproject.toml
  • poetry add <package> for adding dependency with check on conflicts
  • poetry remove <package> for remove
  • poetry self update update poetry

Task is a task runner / build tool that aims to be simpler and easier to use than, for example, GNU Make.

Basic usage

  • task -l - list of tasks with descriptions
  • task -a - list of all tasks