Python Classes Design Patterns Data Behavior and Properties Dependency Injection Encapsulation
Well-designed classes stay small by being primarily either data-focused (structured information) or behavior-focused (grouped operations), expose derived values through properties, receive collaborators through dependency injection rather than constructing them, and are used only when multiple instances are needed. Abstractions such as protocols or abstract base classes decouple a class from concrete dependencies, and encapsulation hides internal state behind a controlled interface. This belongs to object-oriented design in Python, applying the single-responsibility principle, loose coupling, and the language's own conventions (properties, dunder methods, name mangling, modules, callables, caching, and partial application).