Building the API
In the previous chapter, we built a backend that connects to the database, manages user sessions, and sends emails. Now, we will add a specific API to the backend that tracks the member’s to-do’s. This will require an API that allows members, sessions, and to-dos to be managed.
In this chapter, you’ll learn how to build a RESTful API, which is a very popular style of API and one you’ll likely use and come across in your career. You’ll also build an API to manage members and authenticate their actions, which could be used in any other app with minimal changes. Finally, we will also build an API to track the to-dos, which, again, could be adapted for other uses.
We’ll build the API using a RESTful style as it works very well with web apps and can be expressed very easily with Quart. A RESTful API is where the functionality is grouped by resource with each function being an action acting on the resource. For example, the...