Skip to content

Intro test for kiwi.com: Currency converter made into server API and CLI application

Notifications You must be signed in to change notification settings

lesnek/CurrencyConverter

Repository files navigation

Currency converter

Build Status

Intro test for kiwi.com: Currency converter made into server API and CLI application

Currency CLI application

Installation

install python requirements

pip3 install -r requirements.txt

Usage

For simple convert

./currency_convert.py --amount [amount] --input_currency [currency symbol] --output_currency [currency symbol]

For example convert Euros to US dollars

./currency_convert.py --amount 100 --input_currency EUR --output_currency USD

If you didn't specify --output_currency, you'll get convertition into all currencies from European Bank API

Currency server application

Installation

docker build -t currencyconverter .
docker run -p 5000:5000 currencyconverter

Usage

Server is on address localhost:5000, you can try:

localhost:5000/currency_converter?amount=200&input_currency=USD&output_currency=EUR

Testing

Testing of application is provided by pytests

python3 -m pytest tests/

About

Intro test for kiwi.com: Currency converter made into server API and CLI application

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published