obasekiosa / cruise-apis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cruise

This is a simulation of a Cruise Excursion API with CRUD options, optimized using sql queries rather than ORM.

Instuctions

  • Clone repo
  • Navigate into the root directory and run pip install -r requirements.txt via the Terminal
  • Edit the DATABASE in the settings.py file
  • run python manage.py makemigrations then python manage.py migrate to move all data tables to your database.
  • Create a superuser python manage.py createsuperuser
  • python manage.py loaddata data.json to load default data into your db or you could proceed to testing the endpoints then add your own data
  • run python manage.py runserver
  • Test your endpoints.
    • Endpoints can be tested via the CLI or an API testing tool e.g POSTMAN
    • Get your access tokens via the http://127.0.0.1:8000/api/token/ url
    • Add access tokens to request headers
    • List of url endpoints can be found in the Cruise/urls.py and CruiseAPI/urls.py.
    • Testing can also be done via the API doc-page[ core api] (http://127.0.0.1:8000)

About

License:MIT License


Languages

Language:Python 99.7%Language:Procfile 0.3%