- Install PostgreSQL
You can set your DB host/user/name via pgAdmin
- Install requirements via pip or poetry
pip install -r requirements.txt
poetry install
- Create
.env
file in project root dir - Fill environment variables
BD_USER=USER_NAME_FOR_BD
BD_PASS=PASSWORD
BD_HOST=HOST_NAME
BD_PORT=HOST_PORT
BD_NAME=NAME_OF_BD
- Run migration script for data population (table creation and data filling)
alembic upgrade head
You can drop table after
alembic downgrade base
fastapi dev application/application.py
U`ll see output like this with clickable URLs:
╭────────── FastAPI CLI - Development mode ───────────╮
│ │
│ Serving at: http://127.0.0.1:8000 │
│ │
│ API docs: http://127.0.0.1:8000/docs │
│ │
│ Running in development mode, for production use: │
│ │
│ fastapi run │
│ │
╰─────────────────────────────────────────────────────╯
- add endpoints for inserting/deleting users from DB
add API docsdone in v0.4.2 (descriptions to DTO)- async tests with pytest
- check all setup ways via requirements and poetry