Chapter 5: Structuring FastAPI Applications
In the last four chapters, we looked at the basic steps involved in understanding FastAPI and creating a FastAPI application. The application that we have built so far is a single-file todo application that demonstrates the flexibility and power of FastAPI. The key takeaway from the preceding chapters is how easy it is to build an application using FastAPI. However, there is a need for proper structuring of an application with increased complexity and functionalities.
Structuring refers to the arrangement of application components in an organized format, which can be modular to improve the readability of the application’s code and content. An application with proper structuring enables faster development, faster debugging, and an overall increase in productivity.
By the end of this chapter, you will be equipped with the knowledge of what structuring is and how to structure your API. In this chapter, you’ll be covering...