All Projects → RefactoringGuru → Design Patterns Python

RefactoringGuru / Design Patterns Python

Licence: other
Design Pattern Examples in Python

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Design Patterns Python

Generic Repository
Generic implementation of Repository pattern in C# .NET
Stars: ✭ 115 (-23.33%)
Mutual labels:  design-patterns
Ui Ux
📝 Curated list for UI/UX Designers
Stars: ✭ 125 (-16.67%)
Mutual labels:  design-patterns
React Bits
✨ React patterns, techniques, tips and tricks ✨
Stars: ✭ 11,572 (+7614.67%)
Mutual labels:  design-patterns
Android Readthefuckingsourcecode
😜 记录日常的开发技巧,开发中遇到的技术重点、难点,各个知识点的总结,优质面试题等等。持续更新...
Stars: ✭ 1,665 (+1010%)
Mutual labels:  design-patterns
Androidofferkiller
💪 Help you get a better offer.
Stars: ✭ 1,669 (+1012.67%)
Mutual labels:  design-patterns
Designpatterns
Design patterns for C++ example.
Stars: ✭ 126 (-16%)
Mutual labels:  design-patterns
Brazilian Portuguese
Brazilian portuguese translation [WIP]
Stars: ✭ 111 (-26%)
Mutual labels:  design-patterns
Laravel Api Templates
Laravel API starter kit collection using different structures.
Stars: ✭ 149 (-0.67%)
Mutual labels:  design-patterns
Low Level Design Primer
Dedicated Resources for the Low-Level System Design. Learn how to design and implement large-scale systems. Prep for the system design interview.
Stars: ✭ 2,706 (+1704%)
Mutual labels:  design-patterns
Nice Knowledge System
📚不积跬步无以至千里,每天进步一点点,Passion,Self-regulation,Love and Share
Stars: ✭ 137 (-8.67%)
Mutual labels:  design-patterns
Live News Viper
A simple project to demonstrate VIPER design pattern.
Stars: ✭ 119 (-20.67%)
Mutual labels:  design-patterns
Ios Design Patterns
Learning ground for iOS Design Pattern included with sample projects for MVC, MVP, MVVM, and VIPER
Stars: ✭ 120 (-20%)
Mutual labels:  design-patterns
Js designpatterns
No description or website provided.
Stars: ✭ 1,680 (+1020%)
Mutual labels:  design-patterns
Androidtrainingdemo
android training demo
Stars: ✭ 116 (-22.67%)
Mutual labels:  design-patterns
Php Patterns
A minimal and conceptual PHP 5.4+ pattern collection that *will* cover design patterns (not only GoF's), anti-patterns, closure patterns, refactoring patterns
Stars: ✭ 147 (-2%)
Mutual labels:  design-patterns
Programming Principles
Categorized overview of programming principles & design patterns
Stars: ✭ 1,735 (+1056.67%)
Mutual labels:  design-patterns
Tachyons
Functional css for humans
Stars: ✭ 11,057 (+7271.33%)
Mutual labels:  design-patterns
Design Patterns In Ruby
GoF design patterns in Ruby
Stars: ✭ 1,969 (+1212.67%)
Mutual labels:  design-patterns
Designpatternsincsharp
Samples associated with Pluralsight design patterns in c# courses.
Stars: ✭ 149 (-0.67%)
Mutual labels:  design-patterns
Important Java Concepts
🚀 Complete Java - A to Z ║ 📚 Notes and Programs of all Important Concepts of Java - OOPS, Data Structures, Algorithms, Design Patterns & Development + Kotlin + Android 🔥
Stars: ✭ 135 (-10%)
Mutual labels:  design-patterns

Design Patterns in Python

This repository is part of the Refactoring.Guru project.

It contains Python examples for all classic GoF design patterns.

Each pattern includes two examples:

  • [x] Conceptual examples show the internal structure of patterns, including detailed comments.

  • [ ] RealWorld examples show how patterns can be used in real-world Python applications.

Requirements

These examples require Python 3.7 and newer.

All examples can be launched via the command line, using the Python executable as follows:

python src/Path-to-example/main.py

For the best experience, I recommend working with examples with these IDEs:

FAQ

1. What is the Client Code?

Client means client of classes, defined as part of a pattern, which is merely a caller of the given methods or a user of the given classes. In other words, it's the part of your application's code that uses the pattern's classes.

2. I don't understand the roles you're referring to in RealWorld examples.

Take a look at the conceptual example first. There you'll find detailed descriptions of each class in a pattern, its role, and connection to other classes.

Contributor's Guide

I appreciate any help, whether it's a simple fix of a typo or a whole new example. Just make a fork, make your change and submit a pull request.

Here's a style guide which might help you to keep your changes consistent with the rest of the project's code:

  1. All code should match the PEP 8 coding style guide

  2. Try to hard-wrap the code at 80th's character. It helps to list the code on the website without scrollbars.

  3. Aim to put all code within one file. Yes, I realize that it's not how it supposed to be done in production. However, it helps people to understand examples better, since all code fits into one screen.

  4. Comments may or may not have language tags in them, such as this:

    """
    EN: All products families have the same varieties (MacOS/Windows).
    
    This is a MacOS variant of a button.
    
    RU: Все семейства продуктов имеют одни и те же вариации (MacOS/Windows).
    
    Это вариант кнопки под MacOS.
    """
    

    This notation helps to keep the code in one place while allowing the website to generates separate versions of examples for all listed languages. Don't be scared and ignore the non-English part of such comments. If you want to change something in a comment like this, just do it. Even if you do it wrong, we'll tell you how to fix it during the Pull Request.

License

This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

Creative Commons License

Credits

Authors: Alexey Pyltsyn (@lex111) and Alexander Shvets (@neochief)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].