Book Image

Flask By Example

By : Gareth Dwyer
Book Image

Flask By Example

By: Gareth Dwyer

Overview of this book

This book will take you on a journey from learning about web development using Flask to building fully functional web applications. In the first major project, we develop a dynamic Headlines application that displays the latest news headlines along with up-to-date currency and weather information. In project two, we build a Crime Map application that is backed by a MySQL database, allowing users to submit information on and the location of crimes in order to plot danger zones and other crime trends within an area. In the final project, we combine Flask with more modern technologies, such as Twitter's Bootstrap and the NoSQL database MongoDB, to create a Waiter Caller application that allows restaurant patrons to easily call a waiter to their table. This pragmatic tutorial will keep you engaged as you learn the crux of Flask by working on challenging real-world applications.
Table of Contents (20 chapters)
Flask By Example
Credits
About the Author
Acknowledgements
About the Reviewers
www.PacktPub.com
Preface
Index

Installing and configuring MySQL on our VPS


Installing and configuring MySQL is an extremely common task. You can, therefore, find it in prebuilt images or in scripts that build entire stacks for you. A common stack is called the LAMP stack, which stands for Linux, Apache, MySQL, and PHP, and many VPS providers provide a one-click LAMP stack image.

As we will use Linux and have already installed Apache manually, after installing MySQL, we'll be very close to the traditional LAMP stack; we will just use the P for Python instead of PHP. In keeping with our goal of "education first", we'll install MySQL manually, and configure it through the command line instead of installing a GUI control panel. If you've used MySQL before, feel free to set it up as you see fit.

MySQL and Git

Note

Keep in mind that neither our setup of MySQL nor the data we store in it is part of our Git repository. Be careful as any mistakes made at a database level, including misconfiguration or deleting data, will be harder...