The Database
Explore how to create and access a SQLite database and implement a Flask REST server for backend support. Understand database initialization, test data population, and Python modules managing CRUD operations to support frontend web applications.
Let’s switch gears and move over to the server application and get a basic Flask REST service up and running. The back-end server isn’t our main focus, but at least we’ll try and point out some of the interesting code bits anyway.
Using SQLite as the database
We’ll be using a SQLite database. SQLite is a serverless, file-based database. It’s quick to set up and is included in the Python standard library, so we don’t need to install any extra libraries to use it.
Creating and accessing a database
We’ll open up a new connection anytime we need to read a database or write operations, and we won’t worry about maintaining a database connection ...