GET /api/v1/wallets/{wallet_uuid}— получить баланс кошелькаPOST /api/v1/wallets/{wallet_uuid}/operation— пополнить или снять средства
docker compose up --buildДокументация Swagger: http://localhost:8000/docs
Порт можно изменить через переменную окружения API_PORT (по умолчанию: 8000).
С хост-машины:
docker compose up -d
TEST_DB_HOST=localhost .venv/bin/pytest -vВнутри Docker-контейнера:
docker compose exec api sh -c "uv sync --frozen --extra dev && pytest -v"Смотри файл .env.example, где приведены доступные переменные.
| Переменная | По умолчанию | Описание |
|---|---|---|
POSTGRES_USER |
wallet_user |
Пользователь PostgreSQL |
POSTGRES_PASSWORD |
wallet_pass |
Пароль PostgreSQL |
POSTGRES_DB |
wallet_db |
Имя базы данных PostgreSQL |
POSTGRES_HOST |
db |
Хост PostgreSQL |
POSTGRES_PORT |
5432 |
Порт PostgreSQL |
API_PORT |
8000 |
Внешний порт API-сервера |
GET /api/v1/wallets/{wallet_uuid}— get wallet balancePOST /api/v1/wallets/{wallet_uuid}/operation— deposit or withdraw funds
docker compose up --buildSwagger docs: http://localhost:8000/docs
The port can be changed via the API_PORT environment variable (default: 8000).
From the host machine:
docker compose up -d
TEST_DB_HOST=localhost .venv/bin/pytest -vInside the Docker container:
docker compose exec api sh -c "uv sync --frozen --extra dev && pytest -v"See .env.example for the required variables.
| Variable | Default | Description |
|---|---|---|
POSTGRES_USER |
wallet_user |
PostgreSQL user |
POSTGRES_PASSWORD |
wallet_pass |
PostgreSQL password |
POSTGRES_DB |
wallet_db |
PostgreSQL database name |
POSTGRES_HOST |
db |
PostgreSQL host |
POSTGRES_PORT |
5432 |
PostgreSQL port |
API_PORT |
8000 |
External port for the API server |