[2] Flask

Create your own Web server.

1. Installation

pip install flask

2. (Very basic) Use

2.1. Creating a minimalist Web service:


In [ ]:
from flask import Flask
app = Flask(__name__)

@app.route("/")
def hello():
    return "Hello World!"

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

2.2. Runnig a Web client:

Clik on the http://127.0.0.1:5000/ link.