Skip to content

Instantly share code, notes, and snippets.

@singingwolfboy
Created April 27, 2016 17:35
Show Gist options
  • Save singingwolfboy/a0428f15ea47ad53a2094c54f46cf3aa to your computer and use it in GitHub Desktop.
Save singingwolfboy/a0428f15ea47ad53a2094c54f46cf3aa to your computer and use it in GitHub Desktop.
from flask import Flask, request
app = Flask(__name__)
@app.route("/", methods=["POST"])
def base():
if request.form.get("arg1"):
return option1()
elif request.form.get("arg2"):
return option2()
else:
return option3()
def option1():
return "option1"
def option2():
return "option2"
def option3():
return "option3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment