from flask import Flask app = Flask(__name__) #Decorators to add a tag around text on web page. def make_bold(function): def wrapper(): return "" + function() + "" return wrapper def make_emphasis(function): def wrapper(): return "" + function() + "" return wrapper def make_underlined(function): def wrapper(): return "" + function() + "" return wrapper @app.route('/') def hello_world(): #Rendering HTML Elements return '

Hello, World!

' \ '

This is a paragraph.

' \ '' #Different routes using the app.route decorator @app.route("/bye") @make_bold @make_emphasis @make_underlined def bye(): return "Bye!" #Creating variable paths and converting the path to a specified data type @app.route("/username//") def greet(name, number): return f"Hello there {name}, you are {number} years old!" if __name__ == "__main__": #Run the app in debug mode to auto-reload app.run(debug=True)