In the Lab how to create simple my_app.py and run it?

Could you please share the detailed steps of how to write code as per the tutorial section and make it run as a service that will automatically start.

I mean to ask about the below topic to try in the lab.

Hi @tvsubha

Can you please share which lab is this?

With python you can write the code within the said file and run it with python my_app.py.

This would do as described

from flask import Flask

app = Flask(__name__)

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

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

You would also have to pip install flask on the host that runs the service.