We are now ready to start defining a Python module containing a class definition equivalent to each MongoDB document described previously. Following the same order as the previous section, let's go collection by collection, starting with products. First, we need to determine what every single entity class needs and put this into a base class.
The reason why we create entity classes is to give us a programmatic way to work with database documents. Eventually, starting with the next chapter, we will show you how to perform important database operations that will make direct use of these classes.