Web server ========== Use the small Python micro framework call Flask to create a web server. This can be used as a starting point to control devices from a web site. A minimal web server ~~~~~~~~~~~~~~~~~~~~ .. code:: Python ## # Flask quick start # # To run 'sudo python ', then open browser to IP address shown from flask import Flask, render_template_string, redirect # Create the Flask application app = Flask(__name__) # Create a route @app.get("/") def index(): page_template = """ Hello

Hello world

""" return render_template_string(page_template) @app.get("/hello/") def say_hello(name): # Send a message to the console print(f"Hello from {name}") return f'Hello from {name}' if __name__ == "__main__": app.run(debug=True, host="0.0.0.0", port=80) Add a button and a link .. code:: Python