Let's get started by running a simplest Flask application.
Make sure you have activated your virtualenv tool as described in the previous section.
from flask import Flask app = Flask(__name__) @app.route('/') def hello(): return 'Hello, world!' if __name__ == '__main__': app.run()
$ python hello.py
* Running on http://127.0.0.1:5000/
This is a URL, which you can visit in your browser. When you do, your browser will display a plain page which says "Hello, world!" (without quotes). Note that the address
127.0.0.1 refers to localhost, such that Flask will only respond to ...