As we have earlier learnt about django for WebDevelopment in Python. Now we will learn how to install Flask in Windows.
We have assumed that Python and PIP are installed and proper path is setup.
Open the Command Prompt and write command
pip install flask
Now we have to install Virtual Environment using :
pip install virtualenv
It will install virtual environment to work with
Now we have to create a file name app.py in a blank folder that contains:
from flask import Flask, redirect, url_for, request app = Flask(__name__) @app.route('/') def index(): return '<b>Your Flask installation is success</b>' if __name__ == '__main__': app.run(debug = True)
Then once again move to that folder in command prompt and run the python command
You will get screen like
Now Visit : http://127.0.0.1:5000/ in your browser you will get screen like: