The BaseRequestHandler and BaseResponseFormatter ABCs

Without a concrete implementation derived from these classes, there's really not much to them. They use the same standard property structure that has been in play throughout this book for their properties, with typical type checking. The only new concept that they present is a combination of abstraction (which is nothing new) and the utilization of Python's __call__ magic method.

We'll look at these classes (indirectly, at least) when the concrete implementations derived from them are created for the hms_sys Artisan Gateway Service, in the next chapter.

When a class has a __call__ method, instances of that class can be called as if they were functions, with the required arguments defined ...

Get Hands-On Software Engineering with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.