- JWT-authentication
- update profile with phone or name/ new email/phone/name, in registration user has only email and password, then can extend profile
- activate profile with email verification
- delete profile
- create/delete product if user is authenticated
- get products with or without filters and ordering
- rate product with from 1 to 5 stars
- get all ratings/avg rating for product
- delete rating
- get all ratings from users for product
- get average rating for product
- logging with loguru
- all features tested with pytest
- in env.example all variables used in project, change it to .env, several variables that are common, already define as example, secret variables is empty
docker compose up --build
OR make build
- first time
docker compose up
OR make up
- run without building, also you can prove -d flag to run as daemon
docker compose down && docker network prune --force
OR make down
- connect to postgres
docker exec -it postgres psql -U postgres
- run docker containers
- connect to docker container
docker exec -it fastapi bash
- apply migrations in fastapi container
alembic upgrade head
- create new migrations in fastapi container
alembic revision --autogenerate -m "<migration name>"
-
run ufmt:
ufmt format .
-
run black:
black --config=configs/.black.toml app
-
run ruff:
ruff check --config=configs/.ruff.toml --fix app
-
run flake8:
flake8 --config=configs/.flake8 app
-
OR
nox
in root
pytest .
ORpytest ./tests
OR runnox