Skip to content

Latest commit

 

History

History
35 lines (22 loc) · 805 Bytes

README.md

File metadata and controls

35 lines (22 loc) · 805 Bytes

FastApi

Requirements:

  • Docker CE/Desktop 20 or above

  • Python 3.11

  • pipx and poetry

Development:

  1. Prepare
  • Install dependencies: poetry install
  • Activate venv: poetry shell
  1. Install lib
  • production: poetry install <lib-name>
  • dev: poetry install -Gdev <lib-name>
  1. Run
  • Run in local:
    • start compose stack for local database: docker compose up -d
    • start local server: poetry run start
      • server's running in: localhost:8000
      • swagger: localhost:8000/docs
  1. Migration

    Make sure you're in venv shell: poetry shell

  • Generate new migration: alembic revision --autogenerate -m "<message here>"
  • Run migration: alembic upgrade head