Creating a dynamic web application
The Hello World
program generated by PyCharm is a good starting point for new applications. It provides you with some nice cognitive prompting in case it’s been a while since you created the Flask application from scratch. Naturally, we’ll be wanting to replace Hello World
with something a tad more useful.
Let’s create a very simple application for cataloging new Python libraries! This kind of project is usually done with a database, but it doesn’t have to be. Our app is going to hold a list of Python libraries along with their description and a rating from 1-5 on how useful we think they are. To accomplish the database part, we’re going to simply use an in-memory array of lists. Using this approach prevents the need to do a deep dive on the database features of PyCharm, which isn’t coming until Chapter 11, Understanding Database Management with PyCharm. We’ll also exercise every excuse to cover...