This project is a practical example of using design patterns and SOLID principles in Python, integrating the Stripe API. The goal is to iteratively refactor the code, applying best practices while focusing on clean and maintainable design.
- Demonstrate how to implement design patterns (Singleton, Factory, Strategy, etc.).
- Apply SOLID principles (Single Responsibility, Open/Closed, Liskov Substitution, etc.).
- Integrate a real API, like Stripe, to illustrate a practical use case.
- Gradually improve the code design through refactoring.
- Python 3.10+
- Stripe API: For payment processing.
- Virtual Environments:
venvfor dependency isolation. - Docker: More flexible
git clone simple-python-design-patterns-and-solid-principle.git
cd simple-python-design-patterns-and-solid-principle.git
python -m venv venv
source venv/bin/activate # Linux/Mac
venv\Scripts\activate pip install -r app/requirements.txtpython3.10 src/main.py