Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Test task. REST API for wallet management with deposit, withdrawal, and balance retrieval under high-load conditions.

Notifications You must be signed in to change notification settings

kaschenkkko/MinWalletAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Minimal Wallet API

Python FastAPI PostgreSQL Docker Redis Pytest

Техническое задание проекта:

Напишите приложение, которое по REST принимает запрос вида:

GET api/v1/wallets/{WALLET_UUID}
POST api/v1/wallets/{WALLET_UUID}/operation
{
    operationType: DEPOSIT or WITHDRAW,
    amount: 1000
}

Запуск проекта:

  • Клонируйте репозиторий.
  • Перейдите в папку docker.
  • Создайте файл .env с переменными окружения:
    DB_HOST=db
    DB_PORT=5432
    DB_NAME=postgres
    POSTGRES_USER=postgres
    POSTGRES_PASSWORD=password
    
    TEST_DB_HOST=test_db
    
    REDIS_HOST=redis
    REDIS_PORT=6379
    REDIS_DB=0
    
  • Поочередно выполните следующие команды:
    docker-compose up -d --build db test_db liquibase redis
    
    docker-compose up -d --build backend tests
    
  • Для повторного запуска тестов выполните команду:
    docker-compose run --rm tests
    
  • Документация к API будет доступна по url-адресу localhost:8000/redoc

About

Test task. REST API for wallet management with deposit, withdrawal, and balance retrieval under high-load conditions.

Topics

Resources

Stars

Watchers

Forks

Languages