Skip to content

Aayush7352/Python-Programming

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

18 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🐍 Python-Programming

Python License PRs Welcome Maintenance

A comprehensive, hands-on Python curriculum spanning 132 programs across 18 phases β€” from syntax basics to production-grade AI systems. Designed for learners, educators, and practitioners who want a structured end-to-end journey through modern Python development.

πŸ“‹ Table of Contents

🎯 Overview

Metric Count
Programs 132
Phases 18
Topics 130+
Python Version 3.13+
External Packages 30+

This repository is a progressive, project-driven curriculum that takes you from zero Python knowledge to building distributed AI inference platforms. Each file is self-contained, runnable, and includes practical examples with real-world relevance.

πŸ—Ί Curriculum Map

 Phase  1: Python Basics          β†’ 12 programs  (Hello World β†’ Virtual Environments)
 Phase  2: Data Structures        β†’  8 programs  (Lists β†’ collections Module)
 Phase  3: Strings                β†’  4 programs  (Manipulation β†’ Parsing)
 Phase  4: OOP                    β†’ 12 programs  (Classes β†’ Descriptors)
 Phase  5: Files                  β†’  6 programs  (Reading β†’ YAML Parsing)
 Phase  6: Exceptions             β†’  3 programs  (Handling β†’ Context Managers)
 Phase  7: Advanced Python        β†’  9 programs  (Decorators β†’ Monkey Patching)
 Phase  8: Concurrency            β†’  6 programs  (Threading β†’ Producer-Consumer)
 Phase  9: Databases              β†’  5 programs  (SQLite β†’ Redis)
 Phase 10: Web Development        β†’  6 programs  (Flask β†’ WebSockets)
 Phase 11: Data Structures & Algo β†’ 15 programs  (Linked List β†’ Greedy)
 Phase 12: Testing                β†’  4 programs  (unittest β†’ Integration Testing)
 Phase 13: DevOps                 β†’  4 programs  (Docker β†’ CI/CD)
 Phase 14: Machine Learning       β†’  6 programs  (NumPy β†’ Model Evaluation)
 Phase 15: Deep Learning          β†’  9 programs  (PyTorch β†’ Fine-tuning LLMs)
 Phase 16: AI Systems             β†’ 11 programs  (Tokenizers β†’ Inference Engine)
 Phase 17: System Design Projects β†’ 12 programs  (URL Shortener β†’ Distributed AI)

πŸš€ Getting Started

# Clone the repository
git clone https://github.com/<your-username>/Python-Programming.git
cd Python-Programming

# (Optional) Create a virtual environment
python -m venv venv
source venv/bin/activate   # On Windows: venv\Scripts\activate

# Run any program
python "Phase 1: Python Basics/01_hello_world.py"

πŸ“‹ Prerequisites

Some later phases require external packages. Each file has inline pip install instructions. You can install all optional dependencies at once:

pip install flask fastapi uvicorn sqlalchemy alembic psycopg2-binary redis \
            pyyaml pytest pytest-mock torch torchvision numpy pandas \
            scikit-learn matplotlib transformers datasets sentence-transformers \
            chromadb uvicorn docker

▢️ Usage

Every file is a standalone script with a main() function:

cd "Phase 1: Python Basics"
python 01_hello_world.py

Files in Phases 9+ may require running services (PostgreSQL, Redis, etc.) and gracefully degrade with setup instructions when those services are unavailable.

πŸ“– Phase Details

Phase 1: Python Basics

12 programs β€” Start here if you're new to Python. Covers syntax, data types, control flow, functions (01_hello_world.py β†’ 12_virtual_environments.py).

Phase 2: Data Structures

8 programs β€” Built-in collections: lists, tuples, sets, dicts, comprehensions, iterators, generators, and the collections module.

Phase 3: Strings

4 programs β€” String manipulation, regular expressions, text processing, and parsing techniques.

Phase 4: OOP

12 programs β€” Deep dive into object-oriented programming: classes, inheritance, polymorphism, encapsulation, abstraction, magic methods, dataclasses, properties, and descriptors.

Phase 5: Files

6 programs β€” File I/O across formats: plain text, CSV, JSON, XML, and YAML.

Phase 6: Exceptions

3 programs β€” Exception handling best practices, custom exceptions, and context managers.

Phase 7: Advanced Python

9 programs β€” Functional and metaprogramming: decorators, closures, lambdas, functools, itertools, contextlib, metaclasses, and monkey patching.

Phase 8: Concurrency

6 programs β€” Parallel and async programming: threading, multiprocessing, asyncio, coroutines, queues, and the producer-consumer pattern.

Phase 9: Databases

5 programs β€” SQLite, PostgreSQL, SQLAlchemy ORM, Alembic migrations, and Redis caching.

Phase 10: Web Development

6 programs β€” Web APIs with Flask and FastAPI, JWT authentication, REST design, and WebSocket communication.

Phase 11: Data Structures & Algorithms

15 programs (2 subdirectories) β€” Classic DS (linked lists, stacks, queues, heaps, tries, BSTs, AVL trees, graphs) and algorithms (BFS, DFS, Dijkstra, Bellman-Ford, DP, backtracking, greedy).

Phase 12: Testing

4 programs β€” unittest, pytest, mocking, and integration testing patterns.

Phase 13: DevOps

4 programs β€” Dockerfiles, structured logging, monitoring, and CI/CD pipeline examples.

Phase 14: Machine Learning

6 programs β€” NumPy, pandas, Matplotlib, scikit-learn, feature engineering, and model evaluation.

Phase 15: Deep Learning

9 programs β€” PyTorch fundamentals (tensors, autograd, neural networks), CNNs, RNNs, LSTMs, Transformers, and LLM fine-tuning.

Phase 16: AI Systems

11 programs β€” Production AI: tokenizers, attention mechanisms, multi-head attention, KV-cache, transformer blocks, state-space models, quantization, vector databases, RAG pipelines, model serving, and inference engines.

Phase 17: System Design Projects

12 programs β€” Capstone projects: URL shortener, chat app, search engine, recommendation system, distributed cache, task queue, workflow engine, agent frameworks, multi-agent systems, LLM serving, vector search, and distributed AI inference.

πŸ›  Tech Stack

Category Technologies
Languages Python 3.13+
Web Flask, FastAPI, Uvicorn, WebSockets
Databases SQLite, PostgreSQL, Redis, ChromaDB
ORMs SQLAlchemy, Alembic
ML/DL NumPy, pandas, scikit-learn, PyTorch, Transformers
Infrastructure Docker, YAML, Git
Testing unittest, pytest, pytest-mock

πŸ“ Project Structure

Python-Programming/
β”œβ”€β”€ Phase 1: Python Basics/        (12 programs)
β”œβ”€β”€ Phase 2: Data Structures/      ( 8 programs)
β”œβ”€β”€ Phase 3: Strings/              ( 4 programs)
β”œβ”€β”€ Phase 4: OOP/                  (12 programs)
β”œβ”€β”€ Phase 5: Files/                ( 6 programs)
β”œβ”€β”€ Phase 6: Exceptions/           ( 3 programs)
β”œβ”€β”€ Phase 7: Advanced Python/      ( 9 programs)
β”œβ”€β”€ Phase 8: Concurrency/          ( 6 programs)
β”œβ”€β”€ Phase 9: Databases/            ( 5 programs)
β”œβ”€β”€ Phase 10: Web Development/     ( 6 programs)
β”œβ”€β”€ Phase 11: Data Structures & Algorithms/
β”‚   β”œβ”€β”€ 01_Data_Structures/       ( 8 programs)
β”‚   └── 02_Algorithms/            ( 7 programs)
β”œβ”€β”€ Phase 12: Testing/             ( 4 programs)
β”œβ”€β”€ Phase 13: DevOps/              ( 4 programs)
β”œβ”€β”€ Phase 14: Machine Learning/    ( 6 programs)
β”œβ”€β”€ Phase 15: Deep Learning/       ( 9 programs)
β”œβ”€β”€ Phase 16: AI Systems/          (11 programs)
β”œβ”€β”€ Phase 17: System Design Projects/ (12 programs)
β”œβ”€β”€ README.md
β”œβ”€β”€ LICENSE
└── CODE_OF_CONDUCT.md

🀝 Contributing

Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

See CONTRIBUTING.md for detailed guidelines.

πŸ“„ License

Distributed under the MIT License. See LICENSE for more information.

⭐ Acknowledgements

  • Inspired by the comprehensive Python learning paths from real-world software engineering and AI engineering curricula.
  • Built with passion for the Python community.

⭐ Star this repo if you find it useful! ⭐

About

No description, website, or topics provided.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages