Skeleton application to access api endpoints with JWT
- Python 3
Python 3.x virtual environment
mkvirtualenv --python=`which python3` venv_name
cd /path/to/project/
setvirtualenvproject
Installing the pip requirements
pip install -r requirements
Setting up PostgresSQL (if postgres)
psql
CREATE DATABASE adbname ENCODING 'UTF-8';
CREATE USER appuser WITH PASSWORD 'AC0mp13XPa55w0rd';
GRANT ALL PRIVILEGES ON DATABASE adbname to appuser;
DB Init & Migrations
flask db init
flask db migrate
flask db upgrade
Creating default Roles
flask create_roles
Creating the super user
flask create_super name name@email.com
flask run
http://localhost:5000
- /auth/user/new : Create new user (requires the JWT auth)
- /auth/user/list : List all users (requires the JWT auth)
- /auth/user/login : Login to generate a JWT
- /api/ : Create your API's here (requires the JWT auth)
Author: Sriram