Virtual environments
Create an environment :
//In Windows
> mkdir myproject
> cd myproject
> py -3 -m venv venv
Activate the environment :
> venv\Scripts\activate
Install Flask :
pip install Flask
Hello World! in Flask :
//save as hello.py
from flask import Flask
app = Flask(__name__)
@app.route("/")
def hello_world():
return "<p>Hello, World!</p>"
Run the application:
flask --app hello run
Screenshots :