Skip to content

Project was implemented in accordance with the test assignment for the Avito internship as a backend developer

License

Notifications You must be signed in to change notification settings

IDilettant/paymaster

Repository files navigation

Paymaster

Maintainability Test Coverage Actions Status Updates Python 3 wemake-python-styleguide

Description

Paymaster is a completely asynchronous service that provides the ability to create a user wallet with a cash balance and interacting with it as part of the microservice architecture using the REST API request structure

Features

  • Create user account
  • Delete user account
  • Change user balance: replenishment and withdrawal
  • Transfer funds between user accounts
  • Get user account balance with the ability to convert the balance value into an optionally selectable currency
  • Get user account transactions history with the ability to sort by date and/or total and with paging pagination
  • Update currencies rates in background auto mode

A more detailed description of the documentation can be found in the automatically generated openapi file. Or in interactive documentation mode after deploying the application using the link like "http://{hostname}/openapi.json"

Usage

Copy repository to system.

$ git clone https://github.com/IDilettant/paymaster.git

Configuration

Check .env file and tweak configs if you need.

env purpose example
TRIGGER_TIME time for updating currency rates table 00:00
API_KEY key for currency rates source authentication f68e13y36190f4928a4cf279 (https://v6.exchangerate-api.com)
DSN PostgreSQL connection url postgresql://user:password@tcp(localhost:5432)/treasury

Deploy

Docker must be installed. Just execute from paymaster root directory:

$ make compose