Skip to content

App exposing endpoint for currencies conversion.

Notifications You must be signed in to change notification settings

pixerius/currencies

Repository files navigation

Currencies

App exposing endpoint for currencies conversion. Uses exchangeratesapi.io for getting current currency exchange rates.

Tech stack

  • Django and Django REST Framework - for out of the box validation and API setup
  • requests - for integration with external API
  • pytest - for writing and running tests in elegant way

App setup

Install Docker and run:

docker-compose up

API usage

Example endpoint call:

Notice excluded trailing slash!

POST http://localhost:8000/convert

{
  "currency_1": "PLN",
  "currency_2": "EUR",
  "amount": 100.5
}

Running tests

Full test suite can be run with docker-compose run web pytest. To exclude tests testing integration with external API run:

docker-compose run web pytest -m 'not external'

About

App exposing endpoint for currencies conversion.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published