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
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 Flask
Step 2 - Create a new file
app.pywith following content:
from flask import Flaskapp = Flask(__name__)@app.route('/')def hello_world():return 'Hello from Flask!'if __name__ == '__main__':app.run()
Step #3 - Start the app
$ python3 app.py
By visiting the
http://127.0.0.1:5000/ in the browser, we should see the
Hello World message served by Flask.
Flask - official website
Ask for support in case of any issues