A software example

Grok is a Python framework that runs on top of Zope 3 and focuses on agile development. The Grok framework uses Adapters for making it possible for existing objects to conform to specific APIs without the need to modify them [j.mp/grokada].

The Python Traits package also uses the Adapter pattern for transforming an object that does not implement of a specific interface (or set of interfaces) to an object that does [j.mp/pytraitsad].

Get Mastering Python Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.