Chapter 3. Creating Your Database
In Chapter 2, you designed the API architecture and set up your GitHub Codespace environment. In this chapter, you will create the database and the Python code to read from it.
Since you are creating a data API, the database chapter is important. This chapter will walk you through the process of designing your database structures, creating them in the SQLite database, creating Python code to read the database, and creating unit tests to verify all of these pieces work together.
If you are in a rush to see how this code works, you can use the files in the chapter3/complete folder, and come back later to follow the instructions step-by-step.
Components of Your API
In the previous chapter, Figure 2-2 showed the application architecture you are implementing. The API in that diagram is made up of several components. Figure 3-1 shows these components and the software you will ...
Get Hands-On APIs for AI and Data Science now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.