Book Image

Building Web Applications with Flask

By : Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia
Book Image

Building Web Applications with Flask

By: Italo M Campelo Maia, Jack Stouffer, Gareth Dwyer, Italo Maia

Overview of this book

Table of Contents (17 chapters)
Building Web Applications with Flask
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

SQLAlchemy


SQLAlchemy is an amazing library for working with relational databases. It was made by the Pocoo Team, the same folks that brought you Flask, and is considered "The Facto" Python SQL library. It works with SQLite, Postgres, MySQL, Oracle, and all SQL databases, which comes with compatible drivers.

SQLite describes itself as a self-contained, serverless, zero-configuration, and transactional SQL database engine (https://sqlite.org/about.html). One of its main goals is to be a great embeddable database solution for applications and small devices, which it is! It is also very easy to use and that makes it perfect for our learning purposes.

Though all the examples will be given and tested with SQLite in mind, they should work in the other databases with little to no changes. Database-specific tips will be given from time to time whenever appropriate.

Note

Refer to http://www.w3schools.com/sql/default.asp for an extensive SQL reference.

Before our first example, should we review a few relational...