Getting Started With Flask

In this video tutorial, we will be showing you how to get started with Flask and build a web application. Flask is a python microenvironment designed to be lightweight and offers you the freedom to create web applications without limitations on the modules and packages you want to use and the methods and structure you want to follow.

Commands used: 
pip 3 install virtual env
virtualenv –python=python3 python-tutorial
source bin/activate
pip install flask

Add the following code to the file

# Import the Flask package
from flask import Flask

# Initialize Flask
app = Flask(__name__)

# Define the index route
def index():
return “Hello from Flask!”

# Run Flask if the __name__ variable is equal to __main__
if __name__ == “__main__”:

Now execute the file by running:


(flask_tutorial) Johns-MBP:flask_tutorial john$ python
* Serving Flask app “flask_tut” (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off<
* Running on (Press CTRL+C to quit)
All requests and response codes will be logged to the output from the running server in the terminal.

The related article for this video can be found here: ‎

For more information about this and other topics, visit us at or 

Check out our full line of applicable products here!

Video by: John Long

Duration: 6:26
Publisher: Liquid Web
You can watch this video also at the source.

Inxy Hosting CDN Marketplace