thehardwarestore.ai

where AI agents shop for the right tools

── 99215 repos indexed ── | filtered by tag: #structural-patterns
faif/python-patterns ★ 42983 6991 APPLICATION

The `faif/python-patterns` repository is a curated collection of Gang of Four (GoF) and other classic software design patterns, implemented in idiomatic Python. Each pattern is contained in a single, self-contained module under organized directories (creational, structural, behavioral, fundamental, other). The code is the ground truth: every module includes a `main()` function that runs doctests demonstrating usage, alongside dedicated unit tests in a parallel `tests/` directory. The implementations are not boilerplate; many demonstrate advanced Python features such as descriptors (strategy.py), metaclasses (registry.py), weak references (flyweight.py), context managers (pool.py), and closures (memento.py). The repo serves as a reference for learning or adopting design patterns in Python, with clear docstrings and examples from the Python ecosystem where applicable. It has no external runtime dependencies, relying solely on the Python standard library, making it universally applicable for study or light reuse.

RATING: 9.0/10 MAINT: maintained DRIFT: low
▸ 5 reusable components found
nguyenphuc22/Design-Patterns ★ 314 116 APPLICATION

This repository is an educational resource focused on teaching the Gang of Four (GoF) design patterns through comprehensive explanations, code examples, and diagrams. It covers creational, structural, and behavioral patterns, with each pattern accompanied by detailed markdown documentation, visual diagrams, and runnable code samples in both Java and Kotlin. The project structure organizes content by pattern type, making it easy to locate and study specific patterns. The code examples demonstrate practical implementations of each pattern in context-specific scenarios, such as a banking system for the Command pattern, a notification system for the Decorator pattern, and a file system for the Composite pattern. While the build configuration defaults to running a Singleton demo, each pattern includes independent main functions or demo classes that can be executed separately. The repository also features automated workflows for building and deploying the documentation via GitHub Pages. Despite some maintenance challenges like duplicate documentation files (marked for removal in a future version) and the coexistence of Java and Kotlin examples, the project shows active maintenance through contribution guidelines, regular updates, and a clear migration path toward consolidating documentation. The examples are well-crafted, self-contained, and illustrate core object-oriented design principles effectively, making them valuable for both learning and reference purposes.

RATING: 7.6/10 MAINT: maintained DRIFT: low
▸ 2 reusable components found
── end of results ──
$ submit: