diff --git a/app.py b/app.py index f64c9e7..b3ba4e2 100644 --- a/app.py +++ b/app.py @@ -1,11 +1,57 @@ import os from flask import Flask +import time app = Flask(__name__) -@app.route('/') -def hello(): - return 'Hello World!' +hogwarts_students =[ + { + "id": 0, + "first_name": "Harry", + "last_name": "Potter", + "creation_time": time.strftime("%H:%M:%S", time.gmtime()), + "last_update_time": "", + "magic_skills": { + "Alchemy": "4", + "Illusion": "3", + "Summoning": "3", + "Invisibilty": "4", + }, + "desired_skills": { + "Summoning": "5", + "Invulnerability": "1", + "Omnipresent": "1", + "Invisibility": "5" + }, + "desired_course": "Alchemy advanced" + + }, + { + "id": 1, + "first_name": "Ron", + "last_name": "Weasley", + "creation_time": time.strftime("%H:%M:%S", time.gmtime()), + "last_update_time": "", + "magic_skills": { + "Alchemy": "3", + "Animation": "3", + "Healing": "3", + "Invisibility": "2", + }, + "desired_skills": { + "Summoning": "1", + "Invulnerability": "2", + "Illusion": "1", + "Invisibility": "3" + }, + "desired_course": "Dating with Magic" + } +] + +@app.route("/") +def index(): + return str(hogwarts_students) + if __name__ == '__main__': # Bind to PORT if defined, otherwise default to 5000. diff --git a/requirements.txt b/requirements.txt index 0382aa2..f48d8b1 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -Flask==0.9 -Jinja2==2.6 -Werkzeug==0.8.3 -wsgiref==0.1.2 +Flask==1.1.1 +Jinja2==2.10.3 +Werkzeug==0.16.0 \ No newline at end of file