A comprehensive collection of Python code examples and tutorials covering core concepts, object-oriented programming, concurrency, design patterns, and more.
| 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) |
- Python 3.8 or higher
- pip (Python package manager)
git clone https://github.com/imashwini09/code_python.git
cd code_pythonSome modules (like Pydantic) may require additional packages:
pip install pydanticNavigate to any topic folder and run the desired Python file:
cd Async_tutorial
python <filename>.py- 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
- Language: Python 3.x
- Libraries: Pydantic, asyncio, threading (standard library)
- CI/CD: GitHub Actions (
.github/workflows)
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.
- Fork the repository
- Create your feature branch (
git checkout -b feature/new-topic) - Commit your changes (
git commit -m 'Add new topic examples') - Push to the branch (
git push origin feature/new-topic) - Open a Pull Request
This project is open source. Feel free to use and learn from the code.
Made with ❤️ by imashwini09