This repository has been archived by the owner. It is now read-only.
❄️ frame of the restful api server created with flask (Not maintenance)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
.gitignore
LICENSE
README.md
apidoc.json Created apidoc for Frest Mar 17, 2017
app.py
frest.png
requirements.txt

README.md

Frest

license

Frest is the frame of the restful api server created with pallets/flask.

GOAL

Basic restful api server including login, sign up, sign out, modify account, writing, and etc..

Getting Started

Just modify app/config and python app.py runserver use it.

FEATURE

API

  • GET /api/v@/ Return environment, versions
  • POST /api/v@/auth Login
  • POST /api/v@/logout Sign out
  • GET /api/v@/users Get users with token and params: page(Default: 0), limit(Default: 10)
  • POST /api/v@/users Sign Up
  • GET /api/v@/users/<prefix(me or user_id)> Return user information
  • PUT /api/v@/users/<prefix(me or user_id)> Modify user information
  • DELETE /api/v@/users/<prefix(me or user_id)> Delete user
  • GET /api/v@/token?type=extension&token=<token> Token expire time extension
  • GET /api/v@/users/<prefix(me or user_id)>/login_histories Return Login histories with token and params: page(Default: 0), limit(Default: 10)

FUNCTION

  • Auto route loading app/routes
  • Decorating return values app/modules/frest/api
  • You can expire token with function app/models/user_token_model token_expire_all, token_expire_with_token

APIDOC

How to generate apidoc

//install
npm install apidoc -g

//run
apidoc -i ./ -o ./app/static/doc

//in directory ./app/static/doc, apidoc will be generated

TODO

  • User role development

License

Copyright (c) 2017 Hawl Kim

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.