Chapter 2. First App, How Hard Could it Be?

After a full chapter without a single line of code, you need this, right? In this chapter, we will write our first app explained line by line; we will also cover how to set up our environment, what tools to use for development, and how to work with HTML in our app.

Hello World

The first app one writes when learning a new technology is usually a Hello World app, which consists of the minimum possible code necessary to start a simple application and show the text "Hello World!". Let's do exactly that using Flask.

This book is optimized for Python 2.x, so, that's the version I advise you to use from now on. All the examples and code are aimed at that Python version, which is the default in most Linux distributions. ...

Get Building Web Applications with Flask now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.