Getting Started with Flask
A short introduction to Flask for beginners.
This page aims to help beginners getting started with Flask, a popular Python web framework. For newcomers, Flask is a lightweight web application framework designed to make getting started quick and easy, with the ability to scale up to complex applications.
How to getting started with Flask
The quickest setup is to install Python3, a code editor like VsCode or Atom, and (optionally) GIT the popular command-line versioning tool.
Once all tools are installed and accessible in the terminal, we can code and start a simple Flask application:
Step #1 - Install Flask using PIP
$ pip install FlaskStep 2 - Create a new file
app.pywith following content:
from flask import Flask
app = Flask(__name__)
@app.route('/')
def hello_world():
return 'Hello from Flask!'
if __name__ == '__main__':
app.run() Step #3 - Start the app
$ python3 app.pyBy visiting the http://127.0.0.1:5000/ in the browser, we should see the Hello World message served by Flask.
Resources
Flask - official website
A curated list with Flask Apps and dashboards provided by AppSeed
Ask for support in case of any issues
Last updated
Was this helpful?