Simple REST API for viewing currency exchange rates fetched from Yahoo! Finance.
Follow the steps below to set up the project.
Install dependencies.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txtApply migrations.
python manage.py migrateFetch data from the external database.
python manage.py load_dataBefore running the server make sure that you have activated venv.
source venv/bin/activateTo run the server, execute the following command:
python manage.py runserverThe API will be available at http://localhost:8000/api
You can always update the currency rated by running:
python manage.py load_dataIf you wish to fetch the latest data on server start, you can use the run.sh
script:
./run.shYou can access the project's documentation at the following URLs:
http://localhost:8000/api/swagger.json: JSON view of Swaggerhttp://localhost:8000/api/swagger.yaml: YAML view of Swaggerhttp://localhost:8000/api/swagger/: Swagger UIhttp://localhost:8000/api/redoc/: Redoc