Skip to content

Latest commit

 

History

History
41 lines (28 loc) · 662 Bytes

File metadata and controls

41 lines (28 loc) · 662 Bytes

Python API template project

First time set up

# install python 3.12
curl -sSL https://install.python-poetry.org | python3.12 -

# install poetry
python3.12 -m pip install --user poetry

Install dependecies

poetry install

Run the app

poetry run uvicorn src.main:app --port 4001 --reload

Format code

poetry run ruff check src --fix && poetry run ruff format src

Lint code

poetry run mypy src && poetry run ruff check src && poetry run ruff format src --check

Run tests

poetry run coverage run --source=src -m pytest && poetry run coverage report --show-missing