Setting Up Flask First App

Updated: Jun 23, 2019

Introduction to Python Flask

Flask is a Python framework for creating web applications.

You can build following websites with Flask:

Blog Applications, Chat Applications, Data Visualisation, Dashboards, REST Applications, Admin Pages, Email-Services.


Setting Up Flask


Setting Up Flask First App

Installing Flask

To install flask all you need to do is just run this single command on your command prompt if you are using windows, terminal if you are using MacOS or Linux

Setting up Flask is pretty simple and quick. With pip package manager, all we need to do is: 

pip install flask


Once you're done with installing Flask, create a folder called FlaskApp. Navigate to the FlaskApp folder and create a file called app.py.


Import the flask module and create an app using Flask as shown:


from flask import Flask

app = Flask(__name__)


Now define the basic route / and its corresponding request handler:


@app.route("/")

def main():

return "Welcome!"


Next, check if the executed file is the main program and run the app:


if __name__ == "__main__":

app.run()


Save the changes and execute app.py:

python app.py


Point your browser to http://localhost:5000/ and you should have the welcome message.


If you like Codersarts blog and looking for Assignment help,Project help, Programming tutors help and suggestion you can send mail at contact@codersarts.com.

Please write your suggestion in comment section below if you find anything incorrect in this blog post.


#Python #Flask #CreatingaWebAppFromScratchUsingPythonFlask #IntroductiontoPythonFlask #HelloworldPython

Contact Us

Tel: (+91) 0120  4118730  

Time :   10 : 00  AM -  08 : 00 PM IST 

Registered address: G-69, Sector 63, 

 Noida - 201301, India

We Provide Services Across The different countries

USA    Australia   Canada   UK    UAE    Singapore   New Zealand    Malasia   India   Ireland   Germany

CodersArts is a Product by Sofstack Technology Solutions Pvt. Ltd.

  • CodersArts | Linkedin
  • Instagram