Book Image

Flask Blueprints

By : Joel Perras
Book Image

Flask Blueprints

By: Joel Perras

Overview of this book

Table of Contents (14 chapters)

Chapter 6. Hublot – Flask CLI Tools

Often when administering a web application, there are tasks that we like to accomplish without having to create an entire administrative web interface; even though this may be accomplished relatively easily with tools such as Flask-Admin. Many developers first turn to a shell scripting language. Bash is near universal on most modern Linux operating systems, favored by system administrators, and is powerful enough to script any administrative task that may be required.

While the venerable Bash script is most definitely always an option, it would be nice to write a Python-based script that could utilize some of the application-specific data handling that we have crafted for our web application. In doing so, we can avoid duplicating a fair amount of energy and effort that was put in the painstaking process of creating, testing, and deploying the data models and domain logic that is the core of any web application. This is where Flask-Script comes in.

Note

At...