https://github.com/jarrarshahid/oop
OOP is a comprehensive repository covering OOP principles, SOLID design patterns, real-world applications, and API development with Flask & FastAPI. It includes advanced concepts like metaclasses, multiple inheritance, and dependency injection, along with full-fledged projects using SQLite/PostgreSQL. Perfect for begginers and advanced programmers.
https://github.com/jarrarshahid/oop
advanced-python backend-development cli-tools design-patterns employee-management fastapi flask inventory-management-system object-oriented-programming object-oriented-programming-python oop python real-world-applications software-architecture solid-principles sqlalchemy sqlite todo-app
Last synced: 25 days ago
JSON representation
OOP is a comprehensive repository covering OOP principles, SOLID design patterns, real-world applications, and API development with Flask & FastAPI. It includes advanced concepts like metaclasses, multiple inheritance, and dependency injection, along with full-fledged projects using SQLite/PostgreSQL. Perfect for begginers and advanced programmers.
- Host: GitHub
- URL: https://github.com/jarrarshahid/oop
- Owner: JarrarShahid
- License: mit
- Created: 2025-02-27T10:27:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-27T14:54:21.000Z (about 1 year ago)
- Last Synced: 2025-03-27T15:49:50.693Z (about 1 year ago)
- Topics: advanced-python, backend-development, cli-tools, design-patterns, employee-management, fastapi, flask, inventory-management-system, object-oriented-programming, object-oriented-programming-python, oop, python, real-world-applications, software-architecture, solid-principles, sqlalchemy, sqlite, todo-app
- Language: Python
- Homepage:
- Size: 59.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# OOP ๐
A **comprehensive** repository showcasing **Object-Oriented Programming (OOP) in Python**, including **fundamental concepts, SOLID principles, design patterns, real-world applications, and advanced topics**.
## ๐ Features
โ **OOP Fundamentals** - Encapsulation, Inheritance, Polymorphism, and Abstraction
โ **SOLID Principles** - Best practices for writing maintainable OOP code
โ **Design Patterns** - Singleton, Factory, Observer, Strategy, and more
โ **Real-World Applications** - Bank management, E-commerce, Student management
โ **Advanced OOP Topics** - Metaclasses, Dependency Injection, Operator Overloading
โ **Mini Projects** - To-Do App, Employee Management, Inventory System
โ **API Development** - OOP with Flask & FastAPI
โ **Interactive Learning** - Jupyter Notebooks with in-depth explanations
โ **Automated Testing** - Unit tests with `pytest`
โ **CI/CD Pipeline** - GitHub Actions for continuous integration
---
## ๐ Folder Structure
```
OOP/
โโโ README.md # Overview of the repo and concepts covered
โโโ requirements.txt # List of dependencies
โโโ main.py # Entry point for OOP demonstration
โโโ .gitignore # Ignore unnecessary files
โ
โโโ basics/ # Fundamental OOP concepts
โ โโโ encapsulation.py
โ โโโ inheritance.py
โ โโโ polymorphism.py
โ โโโ abstraction.py
โ
โโโ solid_principles/ # SOLID principles in OOP
โ โโโ single_responsibility.py
โ โโโ open_closed.py
โ โโโ liskov_substitution.py
โ โโโ interface_segregation.py
โ โโโ dependency_inversion.py
โ
โโโ design_patterns/ # Common design patterns
โ โโโ singleton.py
โ โโโ factory.py
โ โโโ observer.py
โ โโโ strategy.py
โ โโโ adapter.py
โ โโโ command.py
โ โโโ prototype.py
โ โโโ mediator.py
โ โโโ composite.py
โ โโโ mvc_pattern.py
โ
โโโ real_world_examples/ # Practical implementations
โ โโโ bank_management.py
โ โโโ e_commerce.py
โ โโโ student_management.py
โ โโโ game_dev.py # OOP in game development (Pygame)
โ โโโ ml_pipeline.py # OOP in ML (Scikit-Learn)
โ โโโ gui_app.py # OOP in GUI development (Tkinter/PyQt)
โ
โโโ flask_api/ # OOP in API development with Flask
โ โโโ models.py
โ โโโ routes.py
โ โโโ app.py
โ
โโโ fastapi/ # OOP with FastAPI
โ โโโ models.py
โ โโโ routes.py
โ โโโ main.py
โ
โโโ advanced/ # Advanced OOP concepts
โ โโโ metaclasses.py
โ โโโ multiple_inheritance.py
โ โโโ operator_overloading.py
โ โโโ dependency_injection.py
โ
โโโ projects/ # Mini OOP-based projects
โ โโโ todo_app/
โ โโโ employee_management/
โ โโโ inventory_system/
โ
โโโ tests/ # Unit tests for OOP concepts
โ โโโ test_basics.py
โ โโโ test_design_patterns.py
โ โโโ test_real_world_examples.py
โ โโโ helpers.py # Reusable test utilities
โ
โโโ notebooks/ # Jupyter Notebooks for interactive learning
โ โโโ OOP_Introduction.ipynb
โ โโโ SOLID_Principles.ipynb
โ โโโ Design_Patterns.ipynb
โ
โโโ docs/ # Additional documentation & UML diagrams
โ โโโ OOP_Concepts.md
โ โโโ SOLID_Principles.md
โ โโโ Design_Patterns.md
โ โโโ UML_Diagrams/
โ
โโโ .github/workflows/ # GitHub Actions for CI/CD
โโโ ci.yml # Automated testing workflow
```
---
## ๐ฏ How to Use
### ๐ง Setup
1. Clone the repository:
```sh
git clone https://github.com/JarrarShahid/OOP.git
cd OOP
```
2. Create a virtual environment (optional but recommended):
```sh
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate
```
3. Install dependencies:
```sh
pip install -r requirements.txt
```
### ๐ Running the Project
- To explore OOP concepts, run:
```sh
python main.py
```
- To execute a specific example, run the corresponding Python script:
```sh
python basics/encapsulation.py
```
### ๐งช Running Tests
- Execute unit tests using `pytest`:
```sh
pytest tests/
```
---
## ๐ Resources
- [Python OOP Documentation](https://docs.python.org/3/tutorial/classes.html)
- [SOLID Principles Explained](https://en.wikipedia.org/wiki/SOLID)
- [Design Patterns in Python](https://refactoring.guru/design-patterns/python)
---
## ๐ License
This project is licensed under the **MIT License**. Feel free to use and modify it.
---
## โญ Contributing
Contributions are welcome! If you'd like to improve this project, please follow these steps:
1. Fork the repo
2. Create a new branch (`git checkout -b feature-branch`)
3. Commit your changes (`git commit -m "Added new feature"`)
4. Push to your fork and submit a **Pull Request**
---
## ๐ฏ Contact
If you have any questions, feel free to reach out:
๐ง Email: jarrarshahid@gmail.com
๐ GitHub: JarrarShahid
---
๐ฅ **This repo is the ultimate resource for mastering OOP in Python. Give it a star โญ if you find it useful!** ๐