Flask

Revision as of 14:47, 13 June 2018 by Amanjosan2008 (talk | contribs) (Protected "Flask" ([Edit=Allow only logged in users] (indefinite) [Move=Allow only logged in users] (indefinite) [Delete=Allow only logged in users] (indefinite)))

Installation:

pip3 install flask

Hello World:

from flask import Flask
app = Flask(__name__)

@app.route('/')
def hello_world():
   return 'Hello World’

if __name__ == '__main__':
   app.run()

Access the above app from:

http://127.0.0.1:5000/