Skip to content

Latest commit

 

History

History
99 lines (68 loc) · 3.25 KB

File metadata and controls

99 lines (68 loc) · 3.25 KB

🐍 code_python

A comprehensive collection of Python code examples and tutorials covering core concepts, object-oriented programming, concurrency, design patterns, and more.


📁 Repository Structure

Folder Description
Async_tutorial Asynchronous programming using asyncio, async/await patterns
Exception_handling Handling errors gracefully with try/except, custom exceptions
Files File I/O operations — reading, writing, and managing files
Garbage_collection Python memory management and garbage collection internals
Inheritance Class inheritance, method overriding, and MRO (Method Resolution Order)
Iterators_and_Generators Custom iterators, generator functions, and yield expressions
Lambda_expression Anonymous functions, map(), filter(), and reduce() usage
Pydantic_tutorial Data validation and settings management using Pydantic
Python_oops Object-Oriented Programming — classes, objects, encapsulation, polymorphism
SOLID SOLID design principles with Python examples
Thread_tutorial Multi-threading with the threading module
Typing_Generics Type hints, generics, and the typing module
absraction Abstraction using abstract base classes (ABC)

🚀 Getting Started

Prerequisites

  • Python 3.8 or higher
  • pip (Python package manager)

Clone the Repository

git clone https://github.com/imashwini09/code_python.git
cd code_python

Install Dependencies

Some modules (like Pydantic) may require additional packages:

pip install pydantic

Run a Script

Navigate to any topic folder and run the desired Python file:

cd Async_tutorial
python <filename>.py

📚 Topics Covered

  • OOP Concepts — Classes, Objects, Encapsulation, Inheritance, Polymorphism, Abstraction
  • Design Principles — SOLID principles in Python
  • Concurrency — Threading and Async/Await patterns
  • Functional Programming — Lambda expressions, iterators, generators
  • Type Safety — Type hints, generics, and Pydantic data validation
  • File Handling — Reading and writing files
  • Memory Management — Python garbage collection
  • Error Handling — Exception handling best practices

🛠️ Tech Stack

  • Language: Python 3.x
  • Libraries: Pydantic, asyncio, threading (standard library)
  • CI/CD: GitHub Actions (.github/workflows)

🤝 Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request if you'd like to add examples or improve existing ones.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/new-topic)
  3. Commit your changes (git commit -m 'Add new topic examples')
  4. Push to the branch (git push origin feature/new-topic)
  5. Open a Pull Request

📄 License

This project is open source. Feel free to use and learn from the code.


Made with ❤️ by imashwini09