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.txt
Apply migrations.
python manage.py migrate
Fetch data from the external database.
python manage.py load_data
Before running the server make sure that you have activated venv
.
source venv/bin/activate
To run the server, execute the following command:
python manage.py runserver
The API will be available at http://localhost:8000/api
You can always update the currency rated by running:
python manage.py load_data
If you wish to fetch the latest data on server start, you can use the run.sh
script:
./run.sh
You 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