This project contains implementations of various design patterns in Python. Design patterns are reusable solutions to common problems encountered in software development.
- Python 3.x
- An IDE or text editor (e.g., PyCharm)
- Clone this repository:
git clone git@github.com:DPW2005/design_patterns.git cd design_patterns - Set up a virtual environment:
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
- Browse the different files to see the design pattern implementations.
- Run a specific file to test a pattern:
python src/test_menu.py
python src/run_test_menu_runner.py
creational/: Contains creational patterns (e.g., Singleton, Factory).structural/: Contains structural patterns (e.g., Adapter, Decorator).behavioral/: Contains behavioral patterns (e.g., Observer, Strategy).
Contributions are welcome! Please follow these steps:
- Fork the repository.
- Create a branch for your feature:
git checkout -b new-feature
- Make your changes and submit a pull request.