Backend setup for development - vagechirkov/FARM-GLOBE GitHub Wiki

Setup Poetry in the virtual environment:

mkdir backend
cd backend

export VENV_PATH=venv
python3 -m venv $VENV_PATH
$VENV_PATH/bin/pip install -U pip setuptools
$VENV_PATH/bin/pip install poetry

Create python project using Poetry:

poetry new app
cd app

# add basic dependencies
poetry add fastapi uvicorn websockets

# add dev dependencies
poetry add --group dev black flake8 pytest

See more info about Poetry basic usage here.

Run the server:

uvicorn app.main:app --reload