- JWT-authentication
- user credentials validator (email, password, name, phone)
- reset password with email verification provide
- change password
- create user balance in different currency, user can have only one balance in different currencies
- top up user balance
- withdraw money from balance
- watch user balance
- watch all transactions for balance
- transfer money between users
- tracking prices for currencies
- integration with external api to get information about currencies, responses get asynchronously with
aiohttp
,aiodns
andorjson
- add tracking for currency prices
- install dependencies with
poetry
orpip
- all features test with
pytest
, coverage about 90%
- get api key from
https://freecurrencyapi.com
- 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
OR make 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>"
-
formatting & linting run in
github actions
-
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
- all tests run in
github actions
pytest .
OR pytest ./tests
OR run nox
- run coverage
coverage run -m pytest
OR in nox