Skip to content

Instantly share code, notes, and snippets.

@0atman
Created July 3, 2013 15:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save 0atman/5919669 to your computer and use it in GitHub Desktop.
Save 0atman/5919669 to your computer and use it in GitHub Desktop.
Simple flask-restful GET json stub
from flask import Flask
from flask.ext.restful import Resource, Api
app = Flask(__name__)
api = Api(app)
class SimpleRest(Resource):
def get(self):
return {
u'Description': u'I specialise in functional Python in massively-scalable devops environments.',
u'Name': u'Tristram Oaten, BSc. MSc.',
u'Technologies': [
u'javascript',
u'python',
u'linux',
u'postgres',
u'scala',
u'couchdb'
],
u'Twitter': u'@0atman'}
api.add_resource(SimpleRest, '/')
if __name__ == '__main__':
app.run(debug=True)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment