Skip to content

Instantly share code, notes, and snippets.

@tsloughter
Created April 27, 2011 14:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsloughter/944373 to your computer and use it in GitHub Desktop.
Save tsloughter/944373 to your computer and use it in GitHub Desktop.
from flask import Flask
app = Flask(__name__)
@app.route("/lookup/<word>")
def lookup(word):
json = { 'definition' : internal_lookup(word) }
return json
@app.route("/add/<word>")
def add(word):
internal_add(word)
return true
if __name__ == "__main__":
app.run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment