Storage System
Explore the concept of storage systems within clean architecture by implementing a repository pattern in Python. Understand how this layer interacts with internal components, exposes specific methods, and separates data access concerns. This lesson guides you through creating a simple in-memory repository, preparing you for integrating real databases later.
We'll cover the following...
When we developed the use case, we assumed that it will receive an object that contains data and exposes a list method. This object is generally nicknamed “repository,” since it’s the source of information for the use case. However, it has nothing to do with the Git repository, and we need to be careful not to confuse the two.
The storage lives in the fourth layer of clean architecture, the external systems layer. The elements in this layer are accessed by internal elements through an interface, which exposes a given set of methods. In this case, only the list method is exposed. It’s worth noting that the level of abstraction provided by a repository in clean architecture is higher than that provided by an ...