Created
April 6, 2015 13:14
-
-
Save ssherar/2341804d2556201b5efa to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from flask import Flask, render_template, request | |
import nikeplus | |
app = Flask(__name__) # creates the application body | |
@app.post("/nikeplus/activity") | |
def nike_activity(): | |
data = request.post.data | |
username = data["username"] | |
password = data["password"] | |
API = nikeplus.API(username, password, locale="en_GB") | |
# do something | |
return render_template("activity", activity["name"]) | |
if __name__ == "__main__": # if the file is called from `python file.py` instead of being imported | |
app.run(debug=True) # Will run on port 5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment