Skip to content

jacohend/flask-restless-security

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

This is a starting point for a Flask website + API using:

Plus stubs for

  • Templates
  • Testing

Github user "graup" got the basic idea from Nic: http://stackoverflow.com/a/24258886/700283

Setup

  • Setup a postgres database, or edit config.py with your own db URI
  • Build docker image from dockerfile
  • Run docker container with 'docker run -e DB_USER=user -e DB_PASS=pass -e DB_HOST=host -e DB_NAME=name -e SERVER_ENV=Production|Development|Testing -e APP_NAME=app -e SECRET_KEY=key -e SECURITY_PASSWORD_SALT=salt '

Website

  • Access site at /. Not much there, just a basic example for logging in

Admin

  • Access admin at /admin

API auth

  • POST /api/v1/auth {'username': '', 'password': ''}
  • Returns JSON with {'access_token':''}
  • Then request from API using header 'Authorization: JWT $token'

Tests

  • Run tests using python test.py

About

A simple base for development of Flask, Flask-Restless, SQLAlchemy, JWT based REST APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 72.6%
  • HTML 24.9%
  • CSS 2.5%