Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gitsignore/wefill-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Wefill-API

This is the rest API used by the Wefill app.

Summary

Prerequisites

Wefill-API uses Python 2.7 / 3.5 / 3.6 coupled with Django web framework.

We recommend using Python's packet manager, pip to install packets :

pip install Django

The database depends on what you prefer. It can uses many DBMSs thanks to Django's database management.

In addition to that, Wefill-API requires a bunch of python packets :

pip install djangorestframework
pip install markdown # Markdown support for the browsable API.
pip install django-filter # Filtering support
pip install djangorestframework-jwt
pip install psycopg2 #used for PostegreSQL
pip install django-rest-swagger #api-doc

Deploying

Last steps ! To avoid versionning sensible data such as secret keys or database informations, a settings.py.dist file has been created. Copy it in the same directory cutting the .dist extension to enable it. Fill it with your own informations.

Finally navigate to the project directory with your favorite CLI and create the database :

python manage.py migrate

That's it ! You can now start calling the API after launching the server :

python manage.py runserver

Provided urls

To call the API, your urls should start with : http://127.0.0.1:8001/api/v1/.

Note : Every request but POST /users/ and POST /login/ must provide the authentification token given by the API, with that very form :

Authorization: JWT exempleofjwttoken

Either registering or loging in will grant the user a token.

Browse http://127.0.0.1:8000/api/docs/ to see a full list of callable urls.

About

Wefill is an educational project to order fuel online.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages