Skip to content

Latest commit

 

History

History
134 lines (86 loc) · 4.85 KB

File metadata and controls

134 lines (86 loc) · 4.85 KB

Structural Design Patterns in Python

Structural design patterns explain how to assemble objects and classes into larger structures while keeping these structures flexible and efficient.

This repository contains implementations of the following structural patterns in Python:


Adapter

The Adapter pattern allows incompatible interfaces to work together by converting the interface of one class into another interface the client expects.

Implementation Files

Test Files


Composite

The Composite pattern lets you compose objects into tree structures to represent part-whole hierarchies. It allows clients to treat individual objects and compositions uniformly.

Implementation Files

Test Files


Proxy

The Proxy pattern provides a surrogate or placeholder for another object, controlling access to it.

Implementation Files

Test Files


Decorator

The Decorator pattern lets you attach additional responsibilities to objects dynamically. Decorators provide a flexible alternative to subclassing for extending functionality.

Implementation Files

Test Files


Facade

The Facade pattern provides a simplified interface to a complex subsystem.

Implementation Files

Test Files


Bridge

The Bridge pattern decouples an abstraction from its implementation so the two can vary independently.

Implementation Files

Test Files


Conclusion

This repository demonstrates the use of structural design patterns in Python with clear examples and separated test files. Each pattern is structured in its own folder with dedicated test coverage to ensure correct behavior and maintainability.