Building a Python Flask application — Tutorial 01

mkdir myproject
cd myproject
python3 -m venv venv
. venv/bin/activate
from flask import Flaskapp = Flask(__name__)@app.route('/')
def hello_world():
return 'Hello World!'
$ export FLASK_APP=app.py
$ flask run
http://127.0.0.1:5000/

--

--

Senior Software Engineer at Spades | LinkedIn: https://www.linkedin.com/in/sashini-hettiarachchi/

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store