Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/graup/flask-restless-security
Concise skeleton for development of Flask, Flask-Restless, SQLAlchemy, JWT based REST APIs.
https://github.com/graup/flask-restless-security
flask flask-security jwt python sqlalchemy
Last synced: 3 months ago
JSON representation
Concise skeleton for development of Flask, Flask-Restless, SQLAlchemy, JWT based REST APIs.
- Host: GitHub
- URL: https://github.com/graup/flask-restless-security
- Owner: graup
- License: mit
- Created: 2014-08-16T04:39:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2019-10-22T08:53:20.000Z (over 5 years ago)
- Last Synced: 2024-10-14T13:06:49.351Z (4 months ago)
- Topics: flask, flask-security, jwt, python, sqlalchemy
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 160
- Watchers: 13
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/graup/flask-restless-security.svg?branch=master)](https://travis-ci.org/graup/flask-restless-security)
This is a starting point for a [Flask](http://flask.pocoo.org/) website + API using:
- [Flask-Restless](https://flask-restless.readthedocs.org/en/latest/) (API)
- [Flask-Security](https://pythonhosted.org/Flask-Security/) (Authentication)
- [Flask-JWT](https://pythonhosted.org/Flask-JWT/) (API authentication)
- [Flask-Admin](http://flask-admin.readthedocs.org/en/latest/) (Admin views)
- [SQLAlchemy](http://www.sqlalchemy.org/) (ORM)Plus stubs for
- Templates
- TestingI got the basic idea from Nic:
http://stackoverflow.com/a/24258886/700283The 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`