O'Reilly logo

Building Web Applications with Python and Neo4j by Sumit Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Setting up web applications with Flask and Flask-RESTful

In this section, we will talk about the basics of developing web applications using Flask and Flask-RESTful.

Your first Flask application

As we discussed earlier, Flask is simple and straightforward. There are no complex rules or steps for developing web applications in Flask.

Perform the following steps to create your first web application using Flask:

  1. Create a module and name it FlaskWebApp.py.
  2. Edit FlaskWebApp.py and add the following code:
    from flask import Flask
    webapp = Flask(__name__)
    
    @webapp.route("/")
    def hello():
        return " Hello World!"
    
    if __name__ == '__main__':
        webapp.run(host='0.0.0.0',port=8999,debug=True)
  3. Next, open your console or command prompt and execute py FlaskWebApp.py. You ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required