Skip to content

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.

License

Notifications You must be signed in to change notification settings

JarrarShahid/OOP

Repository files navigation

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:
    git clone https://github.com/JarrarShahid/OOP.git
    cd OOP
  2. Create a virtual environment (optional but recommended):
    python -m venv venv
    source venv/bin/activate   # On Windows use: venv\Scripts\activate
  3. Install dependencies:
    pip install -r requirements.txt

🚀 Running the Project

  • To explore OOP concepts, run:
    python main.py
  • To execute a specific example, run the corresponding Python script:
    python basics/encapsulation.py

🧪 Running Tests

  • Execute unit tests using pytest:
    pytest tests/

📖 Resources


📜 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! 🚀

About

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.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published