Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
bottle-like get/post/delete/put decorators for flask
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
dist
.gitignore
LICENSE
MANIFEST
README.md
flaskle.py
setup.py
test.py

README.md

What is?

This is a small monkey patch on flask.Flask() to add bottle-like decorators for get/post/delete/put

Instalation?

pip install flaskle

Usage

from flask import Flask
import flaskle

flaskle.patch()
app = Flask(__name__)

@app.get('/feature/')
def feature_get():
    # ... your 'get' view here
    return my_get_return

@app.post('/feature/')
def feature_post():
    # ...your 'post' view here
    return my_post_return

@app.put('/feature/')
def feature_put():
    # ...your 'put' view here
    return my_put_return

@app.delete('/feature/')
def feature_delete():
    # ...your 'delete' view here
    return my_delete_return

@app.get('/other/one/')
@app.post('/other/one/')
def get_and_post_view():
    # view code here
    return {'some': 'thing'}

if __name__ == '__main__':
    app.run()
Something went wrong with that request. Please try again.