• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 10 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Concise skeleton for development of Flask, Flask-Restless, SQLAlchemy, JWT based REST APIs.

Build Status

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

Plus stubs for

  • Templates
  • Testing

I got the basic idea from Nic: http://stackoverflow.com/a/24258886/700283

The goal here is simple code. You can read through everything in a short time and get a good idea of how you could put these pieces together.

Setup

  • Create and activate a vitualenv
  • Run pip install -r requirements.txt
  • Start server using python server.py

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