We can kick-start our application development with a simple example, which gives you an idea of how we program in Python with a flask framework. In order to write this program, we need to perform the following steps:
routemethod which associates a URL and the function which handles it.
Here is an example which follows the preceding steps to make a simple application:
from flask import Flask app = Flask(__name__) @app.route("/") def home(): return "Hello Guest!" if __name__ == "__main__": app.run()
In the preceding lines of code, we have created a WSGI application instance ...