QuangVuong85 / flask-restful-boilerplate

flask-restful-boilerplate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Terminal commands

Install venv:

sudo apt-get install python3-pip
sudo pip3 install virtualenv
sudo pip3 install virtualenvwrapper

Note: make sure you have pip and virtualenv installed.

Initial installation: make install

To run test: make tests

To run application: make run

To run all commands at once : make all

Make sure to run the initial migration commands to update the database.

> python manage.py db init

> python manage.py db migrate --message 'initial database migration'

> python manage.py db upgrade

Viewing the app

Open the following url on your browser to view swagger documentation
http://127.0.0.1:5000/

Using Postman

Authorization header is in the following format:

Key: Authorization
Value: "token_generated_during_login"

For testing authorization, url for getting all user requires an admin token while url for getting a single
user by public_id requires just a regular authentication.

About

flask-restful-boilerplate


Languages

Language:Python 98.6%Language:Makefile 1.4%