An application interface that receives a string of comma separated points and calculates the closest points.
http://mfsafrica-karanu.herokuapp.com
API Endpoint | Description | Request |
---|---|---|
http://mfsafrica-karanu.herokuapp.com/points/ | Display a JSON object containing all comma separated points | GET |
http://mfsafrica-karanu.herokuapp.com/points/ | Create a new list of points | POST |
http://mfsafrica-karanu.herokuapp.com/points// | Display a JSON object of a specific point containing the calculation of the closest point | GET |
http://mfsafrica-karanu.herokuapp.com/points// | Edit a comma separated point | PUT |
http://mfsafrica-karanu.herokuapp.com/points// | Delete a comma separated point | DELETE |
- Python 3.9
- Heroku
- SQLite
- Django, Django Rest Framework
git clone git@github.com:newtonkiragu/mfsAfricaAssesment.git && cd mfsAfricaAssesment
python3.9 -m virtualenv virtual
source virtual/bin/activate
Create a .env
file and paste the following filling where appropriate:
SECRET_KEY='<Secret_key>'
DEBUG=True
DISABLE_COLLECTSTATIC=1
Install dependencies that will create an environment for the app to run
pip install -r requirements.txt
python3.9 manage.py migrate
python3.9 manage.py runserver
Open localhost:8000
To run the tests, run
python3.9 manage.py test
Contact Newton Karanu for further help/support
MIT
Copyright (c) 2021 Newton Karanu