Skip to main content
MockAttempt App Icon

Install MockAttempt App

Launch full-screen from your iPhone / iPad Home Screen

  1. Step 1: Tap the Safari Share icon โ†‘ at the bottom of your screen.
  2. Step 2: Scroll down and tap โ€œAdd to Home Screenโ€, then tap Add.
Python Backend, Django & FastAPI Engineering ๐Ÿ›ก๏ธ Get Placement or 100% Fees Refund* ≥90% AI Mock Gate ๐Ÿ“… Weekend-Only Batch (Satโ€“Sun โ€ข 2h/Day) ๐Ÿ‘จโ€๐Ÿ’ป 100% Working IT Professional Trainers Code: PBCP
Python Backend Developer โ€“ Industry-Ready Career Program Official Course Logo

Python Backend Developer โ€“ Industry-Ready Career Program 24 Weeks (6 Months) โ€ข Beginner to Job-Ready Live Weekend Cohort • 24 Modules (610 Topics) • Python 3.12 (Core & Advanced), Python OOP & Dataclasses, Decorators, Generators & Iterators, Threading, Multiprocessing & Asyncio, Python DSA (120+ Problems) • 100% Placement Guarantee*

Python Backend Developer Career Program โ€” Master Core & Advanced Python 3.12, OOP, 120+ DSA, PostgreSQL/SQL, SQLAlchemy 2.0, Django & DRF, FastAPI, JWT Security, Redis, Celery, RabbitMQ/Kafka, Pytest & Docker across 24 weekly modules and 6 mandatory projects.

โ˜…โ˜…โ˜…โ˜…โ˜… 4.95/5 Verified Cohort Rating โ€ข โœ“ Attend 1st Weekend Class Free โ€ข โœ“ Dual QR/Barcode Credentials (MAA + MAA-INT)
24 Modules
610 Live Topics
1220 Hands-On Labs
610 Mock Tests
610 AI Interviews
24 + 1 Module + Client
Python 3.12 (Core & Advanced) Logo Python 3.12 (Core & Advanced) Python OOP & Dataclasses Logo Python OOP & Dataclasses Decorators, Generators & Iterators Logo Decorators, Generators & Iterators Threading, Multiprocessing & Asyncio Logo Threading, Multiprocessing & Asyncio Python DSA (120+ Problems) Logo Python DSA (120+ Problems) Git & GitHub PR Workflow Logo Git & GitHub PR Workflow PostgreSQL 16 & Complete SQL Logo PostgreSQL 16 & Complete SQL SQLite & MySQL Fundamentals Logo SQLite & MySQL Fundamentals +18 More Tools โ†“
Already Enrolled in PBCP Candidates Already Enrolled in Python Backend Career Program (PBCP)
Weekend-Only Cohort (Satโ€“Sun โ€ข 2h/Day)

Sneha Nair

โœ“ Enrolled

๐Ÿ“ Bengaluru, India โ€ข Junior Dev โ†’ Django DRF & FastAPI

Python Backend Career Program Logo Enrolled: Python Backend Career Program (PBCP)

๐Ÿ“… Weekend Satโ€“Sun (10 AMโ€“12 PM IST)

ID: MAA-PBCP-307 Enrolled โ€ข 2d ago

Pooja Patel

โœ“ Enrolled

๐Ÿ“ Sydney, Australia โ€ข Data Analyst โ†’ Async Python Backend

Python Backend Career Program Logo Enrolled: Python Backend Career Program (PBCP)

๐Ÿ“… Weekend Satโ€“Sun (9โ€“11 AM IST โ€ข AU Afternoon)

ID: MAA-PBCP-308 Enrolled โ€ข 5d ago

Kavya Menon

โœ“ Enrolled

๐Ÿ“ Kochi, India โ€ข MCA Graduate โ†’ PostgreSQL, Celery & Docker

Python Backend Career Program Logo Enrolled: Python Backend Career Program (PBCP)

๐Ÿ“… Weekend Satโ€“Sun (6โ€“8 PM IST)

ID: MAA-PBCP-309 Enrolled โ€ข This Week
Python Backend Developer โ€“ Industry-Ready Career Program Logo PBCP โ€ข Satโ€“Sun Live
Free 1st Demo
All-Inclusive Fee (Incl. 18% GST โ€ข 0% Salary Cut)
$160 USD All-Incl.

Net: $136 + 18% GST ($24 ) โ€ข ~$1 /Hr

โšก 3 ร— $53 (0% Installments)

Pay $160 One-Time or in 3 Easy 0% Installments of $53 (All-Inclusive โ€” 0% Interest, No Salary Cut)

Attend 1st Weekend Class Free & Get Roadmap:

โœ“ Live English Classes (24 Weeks (6 Months) โ€ข Beginner to Job-Ready) โ€ข โœ“ Instant Syllabus PDF

๐Ÿ›ก๏ธ Get Placement โ€” Or 100% Fees Refund* โ€ข Weekend-Only Live Batch

100+ Job Openings in 6 Months With Working IT Professional Trainers โ€” Or 100% Tuition Refund*

Full Legal Terms โ†’
STEP 01 โ€ข WEEKEND LIVE + REPOS

Weekend Live Classes & 24 Real Repos

Attend Satโ€“Sun (2h/day) live sessions with Working IT Professionals (โ‰ฅ85% attendance) and ship 100% original GitHub repositories.

STEP 02 โ€ข โ‰ฅ90% MASTERY GATE

Score โ‰ฅ90% in Mocks & AI Vivas (Unlimited Retries)

Clear โ‰ฅ90% in every Topic Mock Test & Spoken MockAttempt AI Interview with unlimited free re-attempts whenever below 90%.

STEP 03 โ€ข PLACEMENT OR 100% REFUND*

100+ Openings & Online AI Assessment Coaching

Get 100+ curated IT openings in 6 months + trainer coaching for employer Online AI Assessments (OA) โ€” or 100% net tuition refund*.

๐Ÿ” Transparent Distinction: Unconditional Career Support vs. Conditional 6-Month 100% Net Tuition Refund* ($136 )

1. Placement & Career Support (Every Graduate): All graduates receive ATS resume engineering, GitHub portfolio verification, mock technical/HR interviews, and ongoing access to curated hiring drives. 2. 6-Month 100% Net Tuition Fee Refund* Covenant: Activated when you complete (a) ≥85% live weekend attendance, (b) 100% original GitHub module repos & Live Client Project, (c) ≥90% in all 610 Topic Mocks & 610 Spoken AI Interviews (unlimited free retries included), and (d) apply to ≥95% of our 100+ curated IT openings & attend 100% of scheduled interviews within 180 days of graduation. Read our full Placement Guarantee Policy & Fee Refund Policy.

Structured Month-by-Month Progression

6-Month Learning Roadmap (24 Weekly Modules)

Every month concludes with measurable coding competency, a portfolio repository deliverable, and continuous DSA progression.

โš™๏ธ Recommended LTS Baseline: Python 3.12, PostgreSQL 16 (primary RDBMS), SQLAlchemy 2.0, Alembic, Django 5.x, Django REST Framework 3.15+, FastAPI, Pydantic v2, Uvicorn & Gunicorn, Redis 7, Celery 5, RabbitMQ 3 / Apache Kafka (KRaft), Pytest 8, Ruff, and Docker Compose. Trainers verify package compatibility before every cohort.
Month 1 Weeks 1โ€“4

Complete Core and Advanced Python

Python 3.12 fundamentals, control statements, strings, lists, tuples, sets, dictionaries, functions, modules, packages, exception handling, logging, complete Object-Oriented Programming (OOP), dataclasses, and CSV/JSON/pathlib file handling.

Outcome: Write structured, modular Python 3.12 programs and build file-backed object-oriented console applications.

Deliverable: Mini-Project 1: Python Employee Management System built with OOP, file persistence, custom exceptions, and structured logging.

DSA Focus: Mathematical reasoning, loop invariants, string/list indexing, dictionary hashing, and pattern logic in Python.

Month 2 Weeks 5โ€“8

Advanced Python, DSA and Git

Iterators, generators, decorators, closures, context managers, comprehensions, type hints, CPython memory/GC/GIL internals, threading, multiprocessing, asyncio, Data Structures & Algorithms in Python, and collaborative Git/GitHub PR workflows.

Outcome: Solve algorithmic coding problems, reason about Python memory/concurrency, and write maintainable Python code in Git feature branches.

Deliverable: Mini-Project 2: Python Inventory Management System with OOP, search/filtering, file persistence, logging, and GitHub feature branches.

DSA Focus: Big-O complexity, arrays, strings, hashing, two pointers, sliding window, prefix sums, binary search, sorting, recursion, backtracking, linked lists, stacks, and queues.

Month 3 Weeks 9โ€“12

Database, SQL and ORM

Relational database architecture, PostgreSQL 16 (plus SQLite & MySQL fundamentals), complete SQL queries, joins, subqueries, CTEs, window functions, B-Tree indexing, ACID transactions, 3NF normalization, psycopg 3, SQLAlchemy 2.0 ORM, Alembic migrations, and MongoDB NoSQL fundamentals.

Outcome: Design normalized relational schemas, optimize complex SQL queries, and integrate Python backends with PostgreSQL and MongoDB.

Deliverable: Major Project 3: Database-Driven Employee Management Backend using Python, PostgreSQL, SQLAlchemy 2.0, Alembic migrations, and Git.

DSA Focus: Hash table design, LRU caches, set intersections, tree fundamentals, binary search trees, and tree traversals.

Month 4 Weeks 13โ€“16

Django and Django REST Framework

Django 5 MTV architecture (with Flask & FastAPI comparison), models, ORM QuerySet optimization, Django REST Framework serializers, ViewSets, routers, filtering, pagination, SimpleJWT authentication, RBAC permissions, security headers, resume uploads, Swagger/OpenAPI, Redis caching, Celery tasks, and DRF APIClient tests.

Outcome: Build, secure, document, optimize, and test complete database-driven REST API applications with Django & DRF.

Deliverable: Major Project 4: Job Portal Backend using Django REST Framework, PostgreSQL, SimpleJWT, RBAC, Resume Upload, Swagger/OpenAPI, and Automated Tests.

DSA Focus: Binary trees, BST validation/LCA, min/max heaps (`heapq`), recursion trees, and backtracking combinations.

Month 5 Weeks 17โ€“20

FastAPI, Microservices and Backend Engineering

FastAPI & Uvicorn ASGI development, Pydantic v2 validation, `Depends` dependency injection, modular Async SQLAlchemy 2.0 + Alembic, OAuth2/JWT RBAC, microservices boundaries, Saga/Circuit Breakers/Idempotency, Redis caching & locks, Celery + Beat, RabbitMQ exchanges/DLQs, and Apache Kafka event streaming.

Outcome: Develop high-performance asynchronous FastAPI services and resilient, event-driven microservices backends.

Deliverable: Major Project 5: E-Commerce Microservices Backend (User, Product, Inventory, Order, Payment & Notification services with FastAPI, PostgreSQL, Redis & RabbitMQ/Kafka).

DSA Focus: Graph representations, BFS/DFS shortest paths, topological sort, greedy interval scheduling, and dynamic programming (memoization & tabulation).

Month 6 Weeks 21โ€“24

Testing, Security, Docker, Deployment and Placement Preparation

Unit & integration testing with `unittest`, `pytest`, fixtures, parametrization, `unittest.mock`, Coverage.py, Ruff/Black/mypy quality gates, Linux CLI, multi-stage Dockerfiles, Docker Compose, Nginx, Gunicorn + Uvicorn, GitHub Actions CI/CD, AWS EC2/S3/IAM/RDS fundamentals, 12 backend machine-coding drills, and the Final Enterprise Capstone.

Outcome: Build, test, containerize, deploy, and confidently defend a production-style Python backend platform in technical interviews.

Deliverable: Final Industry Capstone: Enterprise Job Portal Backend System (12 backend modules with FastAPI, DRF fundamentals, PostgreSQL, Redis, Celery, RabbitMQ/Kafka, Pytest, Docker Compose & GitHub Actions).

DSA Focus: Bit manipulation, timed 120-problem Python DSA revision, answer-space binary search, DP walkthroughs, and backend machine-coding rounds.

โšก Continuous 6-Month Coding Track โ€ข Separate Problem Tracking

120 Curated Python DSA Problems Across 20 Core Areas

Practised continuously from Month 1 to Month 6 (Easy โ†’ Medium โ†’ Selected Hard) with constraints, sample I/O, Big-O analysis, and Python 3.12 reference solutions and test cases inside the Student Coding Lab.

Complexity

6 Problems โ€ข M1

Arrays

6 Problems โ€ข M1

Strings

6 Problems โ€ข M1

Hashing

6 Problems โ€ข M2

Two Pointers

6 Problems โ€ข M2

Sliding Window

6 Problems โ€ข M2

Prefix Sum

6 Problems โ€ข M2

Searching

6 Problems โ€ข M2

Sorting

6 Problems โ€ข M2

Recursion

6 Problems โ€ข M2

Backtracking

6 Problems โ€ข M2

Linked Lists

6 Problems โ€ข M2

Stack

6 Problems โ€ข M2

Queue

6 Problems โ€ข M2

Trees

6 Problems โ€ข M4

Heaps

6 Problems โ€ข M4

Graphs

6 Problems โ€ข M5

Greedy

6 Problems โ€ข M5

Dynamic Programming

6 Problems โ€ข M5

Bit Manipulation

6 Problems โ€ข M1

Structured Weekly Delivery

Recommended Weekly Training & Practice Plan

Trainer-led concept sessions 10 hrs/week
Live coding demonstrations 3 hrs/week
Guided practical sessions 3 hrs/week
Assignments and independent practice 4 hrs/week
DSA and interview preparation 3 hrs/week
Assessment and doubt resolution 2 hrs/week
Academic Passing Threshold: Minimum 70% in theoretical assessments, 70% in coding/practical assessments, 70% in project evaluations, 100% mandatory assignment submission, and live code defense.

โœ“ Included in This 6-Month Program

  • โœ“Complete Core Python 3.12
  • โœ“Advanced Python (Decorators, Generators, Typing, Asyncio & Concurrency)
  • โœ“Complete Python OOP, Dataclasses & File Handling
  • โœ“Continuous 6-Month Python DSA (120 Curated Problems)
  • โœ“PostgreSQL 16 and Complete SQL (plus SQLite & MySQL Fundamentals)
  • โœ“SQLAlchemy 2.0 ORM, Core & Alembic Migrations (plus MongoDB Fundamentals)
  • โœ“Django 5 Backend Application Development (with Flask Comparison)
  • โœ“Django REST Framework (Serializers, ViewSets, SimpleJWT, RBAC & OpenAPI)
  • โœ“FastAPI & Pydantic v2 Modern Async API Development
  • โœ“REST APIs, JWT Authentication & OAuth 2.0 Fundamentals
  • โœ“Microservices Fundamentals (Boundaries, Saga, Circuit Breakers & Idempotency)
  • โœ“Redis 7 Caching & Celery Background Task Queues
  • โœ“RabbitMQ & Apache Kafka Event-Driven Fundamentals
  • โœ“Automated Testing with Pytest, unittest, Mocking, Ruff, Black & mypy
  • โœ“Docker, Docker Compose, Linux CLI, Nginx, Gunicorn/Uvicorn, GitHub Actions CI/CD & AWS Fundamentals
  • โœ“Git & GitHub Professional Feature-Branch PR Workflow + 6 Mandatory Portfolio Projects

โœ• Not Part of Core 6-Month Syllabus

Published transparently so students compare scope honestly before enrolling:

  • โ€”Java & Spring Boot development (covered in our dedicated JBCP Java Backend Career Program)
  • โ€”React or Angular frontend SPA specialization (covered in our dedicated FDCP Frontend Career Program)
  • โ€”Flutter or Native Android mobile app development
  • โ€”Machine Learning, Deep Learning, or Data Science specialization
  • โ€”Advanced AI / LLM model-training engineering
  • โ€”Advanced Data Engineering (Spark/Airflow lakehouse specialization)
  • โ€”Advanced Kubernetes cluster administration (CKA) or full-time DevOps/SRE specialization
  • โ€”Advanced Cloud Architecture certification tracks or specialized QA UI-automation tracks
๐Ÿ“ Test Yourself Live โ€ข PBCP OA Question Topic: Introduction to Programming โ†’

In Core Python 3.12, what is the primary production engineering use case of 'Introduction to Programming'?

โœ“ Correct Answer: A

'Introduction to Programming' is used in production Core Python 3.12 specifically for: Breaking complex backend business rules (like tiered utility billing) into deterministic input -> process -> output steps before coding.

2 Free Timed 50-MCQ Exams / Topic / Day Practice 610 PBCP Mocks โ†’
๐ŸŽ™๏ธ MockAttempt-AI v2.5 Viva 2 Free / Topic / Day

Rehearse Spoken PBCP Technical Interviews Aloud

Practice L1/L2 engineering questions across all 610 PBCP topics. Our AI Interviewer speaks questions aloud and scores your spoken answer across Technical Depth, Clarity, Edge Cases & Confidence.

100% Studentโ€“Trainer Syllabus & Next-Topic Sequence Transparency

Detailed Module & Topic-Wise Syllabus Inspector โ€” Zero-to-Expert Subtopics

Every module and topic lists its exact technical subtopics, hands-on code labs, Mock Tests, MockAttempt AI interviews, and explicit What Topic Is Next โ†’ progression so enrolled students and trainers always stay synchronized from Day 1 to Expert mastery.

Download Syllabus PDF
๐Ÿ’Ž Why This Curriculum Justifies Every Rupee โ€ข Zero-to-Expert Guarantee

Job-Guaranteed* Zero-to-Expert Career Engineering Track (24 Modules โ€ข 610 Live Topics โ€ข 4880+ Subtopics)

Engineered to take a learner from Day-1 scratch to Senior/Production-ready expertise across 600 guided hours (~โ‚น25/hr), 24 real GitHub repositories, โ‰ฅ90% Mock + AI Viva gates, and 100+ curated IT job openings in 6 months (or 100% net tuition refund*).

4,880+ Technical Subtopics ~$1 / Guided Hour ~$1 / Live Topic
Modules 1โ€“4 102 Topics โ€ข 816 Subtopics

Month 1 โ€“ Complete Core and Advanced Python (Weeks 1โ€“4)

Modules 5โ€“8 118 Topics โ€ข 944 Subtopics

Month 2 โ€“ Advanced Python, DSA and Git (Weeks 5โ€“8)

Modules 9โ€“12 96 Topics โ€ข 768 Subtopics

Month 3 โ€“ Database, SQL and ORM (Weeks 9โ€“12)

Modules 13โ€“16 99 Topics โ€ข 792 Subtopics

Month 4 โ€“ Django and Django REST Framework (Weeks 13โ€“16)

Modules 17โ€“20 101 Topics โ€ข 808 Subtopics

Month 5 โ€“ FastAPI, Microservices and Backend Engineering (Weeks 17โ€“20)

Modules 21โ€“24 94 Topics โ€ข 752 Subtopics

Month 6 โ€“ Testing, Security, Docker, Deployment and Placement Preparation (Weeks 21โ€“24)

Module Learning & Hands-On Objectives

โœ“ Install Python 3.12 cleanly on Windows and Linux, configure VS Code/PyCharm, and execute code in REPL and script modes.
โœ“ Declare variables and apply `int`, `float`, `complex`, `bool`, `str`, and explicit type conversions safely.
โœ“ Evaluate expressions accurately using arithmetic, comparison, logical, bitwise, membership (`in`), identity (`is`), and precedence rules.
โœ“ Control program flow with `if`/`elif`/`else`, nested branches, `for`/`while` loops, `range()`, and `break`/`continue`/`pass`.
โœ“ Diagnose `SyntaxError`, `IndentationError`, `TypeError`, and `ValueError` while building 7 practical CLI programs.
Guide โ†’

Programming concepts, step-by-step algorithms, flowcharts, dry-running, and structured problem-solving

Subtopics Covered (8):
  • Programming concepts
  • Step-by-step algorithms
  • Flowcharts
โ†’ What Topic Is Next: Next Topic 1.2: Python Introduction
Guide โ†’

Python history, readability philosophy (PEP 8 / Zen of Python), backend/API/automation/data applications, and the Python 3 ecosystem

Subtopics Covered (8):
  • Python history
  • Readability philosophy (PEP 8 / Zen of Python)
  • Backend/API/automation/data applications
โ†’ What Topic Is Next: Next Topic 1.3: Python Installation
Guide โ†’

Installing Python 3.12 on Windows (`PATH` & `py` launcher) and Linux (`apt`/`pyenv`), verifying `python3` and `pip`

Subtopics Covered (8):
  • Installing Python 3.12 on Windows (`PATH` & `py` launcher)
  • Linux (`apt`/`pyenv`)
  • Verifying `python3`
โ†’ What Topic Is Next: Next Topic 1.4: Environment Setup
Guide โ†’

Configuring VS Code (Python + Pylance + Ruff extensions), PyCharm, integrated terminal, and selecting the workspace interpreter

Subtopics Covered (8):
  • Configuring VS Code (Python + Pylance + Ruff extensions)
  • PyCharm
  • Integrated terminal
โ†’ What Topic Is Next: Next Topic 1.5: Python Execution
Guide โ†’

Interactive REPL mode vs `.py` script mode, source -> bytecode (`.pyc` in `__pycache__`) -> Python Virtual Machine (PVM) execution flow

Subtopics Covered (8):
  • Interactive REPL mode vs `.py` script mode
  • Source -> bytecode (`.pyc` in `__pycache__`) -> Python Virtual Machine (PVM) execution flow
  • Production Edge-Case & Pitfall Guard (Python Execution)
โ†’ What Topic Is Next: Next Topic 1.6: Python Syntax
Guide โ†’

4-space block indentation rules (PEP 8), logical vs physical lines, docstrings, and meaningful single-line `#` comments

Subtopics Covered (8):
  • 4-space block indentation rules (PEP 8)
  • Logical vs physical lines
  • Docstrings
โ†’ What Topic Is Next: Next Topic 1.7: Variables
Guide โ†’

Dynamic variable binding, object references, `snake_case` naming rules, multiple assignment, and tuple swapping `a, b = b, a`

Subtopics Covered (8):
  • Dynamic variable binding
  • Object references
  • `snake_case` naming rules
โ†’ What Topic Is Next: Next Topic 1.8: Data Types
Guide โ†’

Built-in scalar types (`int` arbitrary precision, `float` IEEE-754, `complex`, `bool`, `str`, `NoneType`) and `type()` / `isinstance()`

Subtopics Covered (8):
  • Built-in scalar types (`int` arbitrary precision
  • `float` IEEE-754
  • `complex`
โ†’ What Topic Is Next: Next Topic 1.9: Type Conversion
Guide โ†’

Implicit numeric promotion (`int` -> `float`) vs explicit constructors (`int()`, `float()`, `str()`, `bool()`) and truthiness rules

Subtopics Covered (8):
  • Implicit numeric promotion (`int` -> `float`) vs explicit constructors (`int()`
  • `float()`
  • `str()`
โ†’ What Topic Is Next: Next Topic 1.10: Input and Output
Guide โ†’

Reading console text via `input()`, `print()` (`sep`, `end`, `flush`), and formatted f-string numeric/alignment specifiers

Subtopics Covered (8):
  • Reading console text via `input()`
  • `print()` (`sep`
  • `end`
โ†’ What Topic Is Next: Next Topic 1.11: Operators
Guide โ†’

Arithmetic (`+`, `-`, `*`, `/` true division, `//` floor division, `%` modulo, `**` power), comparison, logical (`and`, `or`, `not`), and augmented assignment

Subtopics Covered (8):
  • Arithmetic (`+`
  • `-`
  • `*`
โ†’ What Topic Is Next: Next Topic 1.12: Bitwise Operators
Guide โ†’

Bitwise AND (`&`), OR (`|`), XOR (`^`), NOT (`~`), left shift (`<<`), and right shift (`>>`) on integers

Subtopics Covered (8):
  • Bitwise
  • (`&`)
  • OR (`|`)
โ†’ What Topic Is Next: Next Topic 1.13: Membership Operators
Guide โ†’

`in` and `not in` across strings, lists, tuples, sets, and dictionary keys, plus `O(1)` `set` vs `O(n)` `list` lookup cost

Subtopics Covered (8):
  • `in`
  • `not in` across strings
  • Lists
โ†’ What Topic Is Next: Next Topic 1.14: Identity Operators
Guide โ†’

`is` and `is not`, `id()` memory address checks, singleton `None` checks (`x is None`), vs `==` value comparison

Subtopics Covered (8):
  • `is`
  • `is not`
  • `id()` memory address checks
โ†’ What Topic Is Next: Next Topic 1.15: Operator Precedence
Guide โ†’

Python evaluation order (`**`, unary `-`, `* / // %`, `+ -`, shifts, bitwise, comparisons, `not`, `and`, `or`) and chained comparisons (`0 <= score <= 100`)

Subtopics Covered (8):
  • Python evaluation order (`**`
  • Unary `-`
  • `* / // %`
โ†’ What Topic Is Next: Next Topic 1.16: Conditional Statements
Guide โ†’

`if`, `elif`, `else` branching, mutually exclusive grade/slab ladders, and concise conditional expressions (`x if cond else y`)

Subtopics Covered (8):
  • `if`
  • `elif`
  • `else` branching
โ†’ What Topic Is Next: Next Topic 1.17: Nested Conditions
Guide โ†’

Multi-criteria decision trees vs early-return guard clauses to flatten deeply indented nested `if` blocks

Subtopics Covered (8):
  • Multi-criteria decision trees vs early-return guard clauses to flatten deeply indented nested `if` blocks
  • Production Edge-Case & Pitfall Guard (Nested Conditions)
  • Hands-On Python Implementation & Verification (Nested Conditions)
โ†’ What Topic Is Next: Next Topic 1.18: Loops
Guide โ†’

Definite iteration with `for` over iterables and indefinite condition-driven `while` loops (including loop `else`)

Subtopics Covered (8):
  • Definite iteration with `for` over iterables
  • Indefinite condition-driven `while` loops (including loop `else`)
  • Production Edge-Case & Pitfall Guard (Loops)
โ†’ What Topic Is Next: Next Topic 1.19: Loop Control Statements
Guide โ†’

Exiting early with `break`, skipping iterations with `continue`, placeholder `pass`, and `for ... else` search patterns

Subtopics Covered (8):
  • Exiting early with `break`
  • Skipping iterations with `continue`
  • Placeholder `pass`
โ†’ What Topic Is Next: Next Topic 1.20: Range Function
Guide โ†’

`range(stop)`, `range(start, stop)`, `range(start, stop, step)`, negative reverse steps, `O(1)` lazy memory footprint, and `enumerate()`

Subtopics Covered (8):
  • `range(stop)`
  • `range(start
  • Stop)`
โ†’ What Topic Is Next: Next Topic 1.21: Pattern Programming
Guide โ†’

Nested row/column loop invariants for right triangles, pyramids, Floydโ€™s number triangle, and character patterns

Subtopics Covered (8):
  • Nested row/column loop invariants for right triangles
  • Pyramids
  • Floydโ€™s number triangle
โ†’ What Topic Is Next: Next Topic 1.22: Basic Debugging
Guide โ†’

Reading Python tracebacks bottom-up, distinguishing `SyntaxError` vs `NameError`/`TypeError`/`ValueError`/`ZeroDivisionError`, and strategic state inspection

Subtopics Covered (8):
  • Reading Python tracebacks bottom-up
  • Distinguishing `SyntaxError` vs `NameError`/`TypeError`/`ValueError`/`ZeroDivisionError`
  • Strategic state inspection
โ†’ What Topic Is Next: Module 1 Capstone (Week 1 Lab Build: 7-in-1 Python CLI Utility Suite) โ†’ Next Topic 2.1: Strings

Build a PEP 8 compliant Python 3.12 command-line utility suite combining Calculator, Simple Interest Calculator, Tiered Electricity Bill Calculator, Student Grade Calculator, O(sqrt(n)) Prime Checker, Armstrong Checker, and Number Guessing Game with input validation.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Manipulate and validate text cleanly using string slicing, searching, transformation methods, and f-strings.
โœ“ Build and transform dynamic sequences with `list` methods, sorting keys, and readable list comprehensions.
โœ“ Leverage immutable `tuple` records, `O(1)` `set` algebra (`|`, `&`, `-`), and `dict` hash tables (`get`, `setdefault`, comprehensions).
โœ“ Model real backend payloads using nested lists/dicts while preventing aliasing bugs via `copy()` vs `copy.deepcopy()`.
โœ“ Select the optimal collection (`list` vs `tuple` vs `set` vs `dict`) based on mutability and Big-O lookup cost.
Guide โ†’

Unicode UTF-8 string literals, raw strings `r"..."`, multiline strings, positive `0..n-1` and negative `-1..-n` indexing

Subtopics Covered (8):
  • Unicode UTF-8 string literals
  • Raw strings `r"..."`
  • Multiline strings
โ†’ What Topic Is Next: Next Topic 2.2: String Slicing
Guide โ†’

Slice notation `s[start:stop:step]`, omitting bounds, negative steps `s[::-1]` reversal, and out-of-range slice safety

Subtopics Covered (8):
  • Slice notation `s[start:stop:step]`
  • Omitting bounds
  • Negative steps `s[::-1]` reversal
โ†’ What Topic Is Next: Next Topic 2.3: String Methods
Guide โ†’

`upper()`, `lower()`, `casefold()`, `strip()`/`lstrip()`/`rstrip()`, `removeprefix()`, `removesuffix()`, `split()`, and `" ".join()`

Subtopics Covered (8):
  • `upper()`
  • `lower()`
  • `casefold()`
โ†’ What Topic Is Next: Next Topic 2.4: String Searching
Guide โ†’

`find()` / `rfind()` (`-1` on miss) vs `index()` / `rindex()` (`ValueError` on miss) and non-overlapping `count()`

Subtopics Covered (8):
  • `find()` / `rfind()` (`-1` on miss) vs `index()` / `rindex()` (`ValueError` on miss)
  • Non-overlapping `count()`
  • Production Edge-Case & Pitfall Guard (String Searching)
โ†’ What Topic Is Next: Next Topic 2.5: String Validation
Guide โ†’

`startswith()` (accepting a tuple of prefixes!), `endswith()`, `isdigit()`, `isalpha()`, `isalnum()`, and `isspace()`

Subtopics Covered (8):
  • `startswith()` (accepting a tuple of prefixes!)
  • `endswith()`
  • `isdigit()`
โ†’ What Topic Is Next: Next Topic 2.6: String Formatting
Guide โ†’

Modern f-strings `f"{expr}"`, debug `f"{var=}"`, numeric formatting `:.2f`, `:,`, ISO dates, vs `.format()` templates

Subtopics Covered (8):
  • Modern f-strings `f"{expr}"`
  • Debug `f"{var=}"`
  • Numeric formatting `:.2f`
โ†’ What Topic Is Next: Next Topic 2.7: String Immutability
Guide โ†’

Why `str` objects cannot be mutated in-place, `O(n^2)` loop `+=` concatenation penalty vs `O(n)` `"".join(parts)` buffer building

Subtopics Covered (8):
  • Why `str` objects cannot be mutated in-place
  • `O(n^2)` loop `+=` concatenation penalty vs `O(n)` `"".join(parts)` buffer building
  • Production Edge-Case & Pitfall Guard (String Immutability)
โ†’ What Topic Is Next: Next Topic 2.8: Lists
Guide โ†’

Dynamic array internals of `list`, literal/constructor creation, indexing, slicing, slice assignment, and `len()`/`min()`/`max()`/`sum()`

Subtopics Covered (8):
  • Dynamic array internals of `list`
  • Literal/constructor creation
  • Indexing
โ†’ What Topic Is Next: Next Topic 2.9: List Operations
Guide โ†’

`append()` (`O(1)` amortized), `extend()`, `insert(0, x)` (`O(n)` shift!), and `remove(val)` (`ValueError` if missing)

Subtopics Covered (8):
  • `append()` (`O(1)` amortized)
  • `extend()`
  • `insert(0
โ†’ What Topic Is Next: Next Topic 2.10: List Methods
Guide โ†’

`pop()` (`O(1)` tail vs `O(n)` index), `clear()`, in-place `sort(key=..., reverse=...)` vs non-mutating `sorted()`, and `reverse()`

Subtopics Covered (8):
  • `pop()` (`O(1)` tail vs `O(n)` index)
  • `clear()`
  • In-place `sort(key=...
โ†’ What Topic Is Next: Next Topic 2.11: List Comprehension
Guide โ†’

`[expr for x in iterable if cond]`, conditional transformations, flattening 2D matrices, and readability limits

Subtopics Covered (8):
  • `[expr for x in iterable if cond]`
  • Conditional transformations
  • Flattening 2D matrices
โ†’ What Topic Is Next: Next Topic 2.12: Tuples
Guide โ†’

Immutable fixed-structure `tuple` records, single-element trailing comma `(42,)`, tuple packing/unpacking, and hashability as `dict` keys

Subtopics Covered (8):
  • Immutable fixed-structure `tuple` records
  • Single-element trailing comma `(42
  • Tuple packing/unpacking
โ†’ What Topic Is Next: Next Topic 2.13: Tuple Methods
Guide โ†’

`.count(value)`, `.index(value)`, memory efficiency of tuples vs lists (`sys.getsizeof`), and immutability of slot bindings

Subtopics Covered (8):
  • `.count(value)`
  • `.index(value)`
  • Memory efficiency of tuples vs lists (`sys.getsizeof`)
โ†’ What Topic Is Next: Next Topic 2.14: Sets
Guide โ†’

Hash-table backed `set` and immutable `frozenset`, `set()` empty set creation (NOT `{}`!), `O(1)` membership and deduplication

Subtopics Covered (8):
  • Hash-table backed `set`
  • Immutable `frozenset`
  • `set()` empty set creation (NOT `{}`!)
โ†’ What Topic Is Next: Next Topic 2.15: Set Operations
Guide โ†’

Union (`|` / `.union()`), intersection (`&` / `.intersection()`), difference (`-`), symmetric difference (`^`), and subset/superset (`<=`, `>=`, `isdisjoint`)

Subtopics Covered (8):
  • Union (`|` / `.union()`)
  • Intersection (`&` / `.intersection()`)
  • Difference (`-`)
โ†’ What Topic Is Next: Next Topic 2.16: Set Methods
Guide โ†’

`add()`, `update()`, `discard()` (no error if missing) vs `remove()` (`KeyError` if missing), and `pop()`

Subtopics Covered (8):
  • `add()`
  • `update()`
  • `discard()` (no error if missing) vs `remove()` (`KeyError` if missing)
โ†’ What Topic Is Next: Next Topic 2.17: Dictionaries
Guide โ†’

Insertion-ordered hash map (`dict`, guaranteed since Python 3.7+), hashable keys, `O(1)` read/write/delete, and `del` / `in`

Subtopics Covered (8):
  • Insertion-ordered hash map (`dict`
  • Guaranteed since Python 3.7+)
  • Hashable keys
โ†’ What Topic Is Next: Next Topic 2.18: Dictionary Methods
Guide โ†’

`.keys()`, `.values()`, `.items()` dynamic views, `.get(k, default)`, `.pop(k, default)`, `.setdefault()`, and `|` / `|=` merge operators

Subtopics Covered (8):
  • `.keys()`
  • `.values()`
  • `.items()` dynamic views
โ†’ What Topic Is Next: Next Topic 2.19: Dictionary Comprehension
Guide โ†’

`{k_expr: v_expr for item in iterable if cond}`, inverting unique maps, and filtering sensitive keys from logs

Subtopics Covered (8):
  • `{k_expr: v_expr for item in iterable if cond}`
  • Inverting unique maps
  • Filtering sensitive keys from logs
โ†’ What Topic Is Next: Next Topic 2.20: Nested Collections
Guide โ†’

Lists of dictionaries, dictionaries of lists/dicts, safe chained `.get()` navigation, and grouping records by category/department

Subtopics Covered (8):
  • Lists of dictionaries
  • Dictionaries of lists/dicts
  • Safe chained `.get()` navigation
โ†’ What Topic Is Next: Next Topic 2.21: Mutable and Immutable Objects
Guide โ†’

Immutable (`int`, `float`, `bool`, `str`, `tuple`, `frozenset`) vs mutable (`list`, `dict`, `set`) types, hashability, and pass-by-object-reference

Subtopics Covered (8):
  • Immutable (`int`
  • `float`
  • `bool`
โ†’ What Topic Is Next: Next Topic 2.22: Shallow Copy
Guide โ†’

`list.copy()`, `dict.copy()`, `s[:]`, and `copy.copy()` โ€” duplicating the outer container while sharing nested inner object references

Subtopics Covered (8):
  • `list.copy()`
  • `dict.copy()`
  • `s[:]`
โ†’ What Topic Is Next: Next Topic 2.23: Deep Copy
Guide โ†’

`copy.deepcopy()`, recursive cloning of nested graphs, memoization of cyclic references, and memory/CPU trade-offs

Subtopics Covered (8):
  • `copy.deepcopy()`
  • Recursive cloning of nested graphs
  • Memoization of cyclic references
โ†’ What Topic Is Next: Next Topic 2.24: Collection Use Cases
Guide โ†’

Decision matrix: `list` (ordered mutable sequence), `tuple` (immutable fixed record), `set` (`O(1)` unique membership), `dict` (`O(1)` keyed lookup)

Subtopics Covered (8):
  • Decision matrix: `list` (ordered mutable sequence)
  • `tuple` (immutable fixed record)
  • `set` (`O(1)` unique membership)
โ†’ What Topic Is Next: Module 2 Capstone (Week 2 Lab Build: Collections-Driven Academic, Cart & Word Analytics Pack) โ†’ Next Topic 3.1: Functions

Build 6 collection-powered Python modules: Student Marks Manager, Employee Record Manager, Shopping Cart, Case-Insensitive Word Frequency Counter, Order-Preserving Deduplicator, and O(1) Dict/Set Inventory Lookup.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Write single-responsibility functions using positional, keyword, keyword-only, safe default (`None`), and `*args`/`**kwargs` parameters.
โœ“ Apply LEGB variable scope rules, recursion with explicit base cases, and functional transformations cleanly.
โœ“ Organize multi-file applications into Python modules and packages guarded by `if __name__ == "__main__":`.
โœ“ Handle failures predictably with specific `try`/`except`/`else`/`finally` blocks, exception chaining (`raise ... from e`), and custom domain exceptions.
โœ“ Debug state interactively via `breakpoint()`/`pdb` and replace raw `print()` calls with structured `logging` levels and handlers.
Guide โ†’

`def` declaration, docstrings (PEP 257), single-responsibility design, invocation, and implicit `None` return

Subtopics Covered (8):
  • `def` declaration
  • Docstrings (PEP 257)
  • Single-responsibility design
โ†’ What Topic Is Next: Next Topic 3.2: Function Parameters
Guide โ†’

Positional arguments, keyword arguments, positional-only (`/`) and keyword-only (`*`) parameter markers

Subtopics Covered (8):
  • Positional arguments
  • Keyword arguments
  • Positional-only (`/`)
โ†’ What Topic Is Next: Next Topic 3.3: Default Parameters
Guide โ†’

Default parameter evaluation at `def` definition time (ONCE!) and the `None` sentinel pattern for mutable defaults

Subtopics Covered (8):
  • Default parameter evaluation at `def` definition time (ONCE!)
  • The `None` sentinel pattern for mutable defaults
  • Production Edge-Case & Pitfall Guard (Default Parameters)
โ†’ What Topic Is Next: Next Topic 3.4: Variable Arguments
Guide โ†’

Variadic positional `*args` (packed as `tuple`), variadic keyword `**kwargs` (packed as `dict`), and call-site `*` / `**` unpacking

Subtopics Covered (8):
  • Variadic positional `*args` (packed as `tuple`)
  • Variadic keyword `**kwargs` (packed as `dict`)
  • Call-site `*` / `**` unpacking
โ†’ What Topic Is Next: Next Topic 3.5: Return Statements
Guide โ†’

Early-return guard clauses, returning multiple values via tuple packing/unpacking, and consistent return types

Subtopics Covered (8):
  • Early-return guard clauses
  • Returning multiple values via tuple packing/unpacking
  • Consistent return types
โ†’ What Topic Is Next: Next Topic 3.6: Variable Scope (LEGB)
Guide โ†’

Local -> Enclosing -> Global -> Built-in (LEGB) name resolution, `global` vs `nonlocal`, and why mutable global state hurts concurrency

Subtopics Covered (8):
  • Local -> Enclosing -> Global -> Built-in (LEGB) name resolution
  • `global` vs `nonlocal`
  • Why mutable global state hurts concurrency
โ†’ What Topic Is Next: Next Topic 3.7: Lambda Functions
Guide โ†’

Single-expression anonymous `lambda params: expr` functions for inline sort keys and callbacks vs named `def` functions

Subtopics Covered (8):
  • Single-expression anonymous `lambda params: expr` functions for inline sort keys
  • Callbacks vs named `def` functions
  • Production Edge-Case & Pitfall Guard (Lambda Functions)
โ†’ What Topic Is Next: Next Topic 3.8: Recursion
Guide โ†’

Base case + progress toward base case, call stack frames, `sys.getrecursionlimit()` (~1000 in CPython, no tail-call optimization!)

Subtopics Covered (8):
  • Base case + progress toward base case
  • Call stack frames
  • `sys.getrecursionlimit()` (~1000 in CPython
โ†’ What Topic Is Next: Next Topic 3.9: Higher-Order Functions
Guide โ†’

First-class functions passed as arguments (strategy/validator callbacks) and returned from factory functions

Subtopics Covered (8):
  • First-class functions passed as arguments (strategy/validator callbacks)
  • Returned from factory functions
  • Production Edge-Case & Pitfall Guard (Higher-Order Functions)
โ†’ What Topic Is Next: Next Topic 3.10: map() Function
Guide โ†’

Lazy iterator `map(func, *iterables)` transformation vs list/generator comprehensions

Subtopics Covered (8):
  • Lazy iterator `map(func
  • *iterables)` transformation vs list/generator comprehensions
  • Production Edge-Case & Pitfall Guard (map() Function)
โ†’ What Topic Is Next: Next Topic 3.11: filter() Function
Guide โ†’

Lazy predicate filtering `filter(pred, iterable)`, `filter(None, iterable)` truthy filtering, vs comprehensions

Subtopics Covered (8):
  • Lazy predicate filtering `filter(pred
  • Iterable)`
  • `filter(None
โ†’ What Topic Is Next: Next Topic 3.12: functools.reduce()
Guide โ†’

`functools.reduce(fn, iterable, initializer)` cumulative folding vs Pythonic built-ins (`sum`, `min`, `max`, `all`, `any`, `math.prod`)

Subtopics Covered (8):
  • `functools.reduce(fn
  • Iterable
  • Initializer)` cumulative folding vs Pythonic built-ins (`sum`
โ†’ What Topic Is Next: Next Topic 3.13: Python Modules
Guide โ†’

Creating reusable `.py` modules, module namespace isolation, `sys.modules` import cache, and avoiding circular imports

Subtopics Covered (8):
  • Creating reusable `.py` modules
  • Module namespace isolation
  • `sys.modules` import cache
โ†’ What Topic Is Next: Next Topic 3.14: Python Packages
Guide โ†’

Multi-directory package hierarchy (`banking/models/`, `banking/services/`), `__init__.py`, `__all__`, and explicit package exports

Subtopics Covered (8):
  • Multi-directory package hierarchy (`banking/models/`
  • `banking/services/`)
  • `__init__.py`
โ†’ What Topic Is Next: Next Topic 3.15: Import System
Guide โ†’

Absolute imports (`from app.services.auth import verify`), explicit relative imports, `sys.path`, and why `from mod import *` is banned

Subtopics Covered (8):
  • Absolute imports (`from app.services.auth import verify`)
  • Explicit relative imports
  • `sys.path`
โ†’ What Topic Is Next: Next Topic 3.16: Main Execution Guard (__name__)
Guide โ†’

How Python sets `__name__ == "__main__"` on direct execution vs module path on `import`, protecting CLI entrypoints

Subtopics Covered (8):
  • How Python sets `__name__ == "__main__"` on direct execution vs module path on `import`
  • Protecting CLI entrypoints
  • Production Edge-Case & Pitfall Guard (Main Execution Guard (__name__))
โ†’ What Topic Is Next: Next Topic 3.17: Python Standard Library
Guide โ†’

Practical backend usage of `os`, `sys`, `math`, `random`/`secrets`, and timezone-aware `datetime` (`datetime.now(timezone.utc)`)

Subtopics Covered (8):
  • Practical backend usage of `os`
  • `sys`
  • `math`
โ†’ What Topic Is Next: Next Topic 3.18: Exception Handling
Guide โ†’

`try` and `except SpecificError as exc:` blocks, exception hierarchy (`BaseException` vs `Exception`), and preserving error context

Subtopics Covered (8):
  • `try`
  • `except SpecificError as exc:` blocks
  • Exception hierarchy (`BaseException` vs `Exception`)
โ†’ What Topic Is Next: Next Topic 3.19: Multiple Exceptions
Guide โ†’

Handling distinct failure modes with separate `except` clauses vs grouped tuples `except (ConnectionError, TimeoutError) as exc:`

Subtopics Covered (8):
  • Handling distinct failure modes with separate `except` clauses vs grouped tuples `except (ConnectionError
  • TimeoutError) as exc:`
  • Production Edge-Case & Pitfall Guard (Multiple Exceptions)
โ†’ What Topic Is Next: Next Topic 3.20: else and finally Clauses
Guide โ†’

Why `try ... except ... else ... finally` keeps the `try` scope narrow (`else` runs only if no exception; `finally` runs ALWAYS)

Subtopics Covered (8):
  • Why `try ... except ... else ... finally` keeps the `try` scope narrow (`else` runs only if no exception
  • `finally` runs ALWAYS)
  • Production Edge-Case & Pitfall Guard (else and finally Clauses)
โ†’ What Topic Is Next: Next Topic 3.21: Raising Exceptions (raise)
Guide โ†’

Validating invariants with `raise ValueError(...)`, re-raising active exceptions via bare `raise`, and chaining `raise DomainError(...) from exc`

Subtopics Covered (8):
  • Validating invariants with `raise ValueError(...)`
  • Re-raising active exceptions via bare `raise`
  • Chaining `raise DomainError(...) from exc`
โ†’ What Topic Is Next: Next Topic 3.22: Custom Exceptions
Guide โ†’

Designing a project base exception (`BankingError(Exception)`) and rich domain subclasses (`InsufficientFundsError`, `AccountNotFoundError`) with attributes

Subtopics Covered (8):
  • Designing a project base exception (`BankingError(Exception)`)
  • Rich domain subclasses (`InsufficientFundsError`
  • `AccountNotFoundError`) with attributes
โ†’ What Topic Is Next: Next Topic 3.23: Assertions
Guide โ†’

`assert condition, message` for internal developer invariants vs explicit `if ...: raise ValueError(...)` for runtime user validation

Subtopics Covered (8):
  • `assert condition
  • Message` for internal developer invariants vs explicit `if ...: raise ValueError(...)` for runtime user validation
  • Production Edge-Case & Pitfall Guard (Assertions)
โ†’ What Topic Is Next: Next Topic 3.24: Debugging with pdb
Guide โ†’

Python 3.7+ `breakpoint()`, `pdb` commands (`n` next, `s` step, `c` continue, `l` list, `p` print, `w` where stack), and post-mortem debugging

Subtopics Covered (8):
  • Python 3.7+ `breakpoint()`
  • `pdb` commands (`n` next
  • `s` step
โ†’ What Topic Is Next: Next Topic 3.25: Application Logging
Guide โ†’

`logging` module (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`), `getLogger(__name__)`, formatters, `StreamHandler` + `RotatingFileHandler`, and `logger.exception...

Subtopics Covered (8):
  • `logging` module (`DEBUG`
  • `INFO`
  • `WARNING`
โ†’ What Topic Is Next: Module 3 Capstone (Week 3 Lab Build: Modular Logged Banking & Calculator Package) โ†’ Next Topic 4.1: OOP Introduction

Architect a multi-package Python Banking & Calculator application (`models`, `services`, `exceptions`, `cli`) featuring keyword-only parameters, custom `InsufficientFundsError` exceptions, `if __name__ == "__main__":` guards, and rotating file + console `logging`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Model clean domain entities using classes, `__init__`, instance vs class attributes, `@classmethod` factories, `@staticmethod`, `@property`, and `@dataclass`.
โœ“ Apply encapsulation, single/multiple/multilevel/hierarchical inheritance, C3 Method Resolution Order (MRO), polymorphism, duck typing, and `abc.ABC` contracts.
โœ“ Prefer composition and aggregation over brittle deep inheritance hierarchies and implement Pythonic dunder methods (`__repr__`, `__str__`, `__eq__`, `__len__`).
โœ“ Read and persist UTF-8 text, CSV, and JSON files safely using `with` context managers and cross-platform `pathlib.Path` APIs.
โœ“ Deliver Mini-Project 1: a complete OOP, file-backed, logged, exception-safe Python Employee Management System.
Guide โ†’

Procedural vs object-oriented design, coupling data + behavior, and the 4 OOP pillars in Python backend architecture

Subtopics Covered (8):
  • Procedural vs object-oriented design
  • Coupling data + behavior
  • The 4 OOP pillars in Python backend architecture
โ†’ What Topic Is Next: Next Topic 4.2: Classes
Guide โ†’

`class` statement, `CapWords` (`PascalCase`) PEP 8 naming, class namespace dictionary (`__dict__`), and docstrings

Subtopics Covered (8):
  • `class` statement
  • `CapWords` (`PascalCase`) PEP 8 naming
  • Class namespace dictionary (`__dict__`)
โ†’ What Topic Is Next: Next Topic 4.3: Objects
Guide โ†’

Class instantiation `obj = ClassName(...)`, unique object identity (`id(obj)`), `isinstance()`, and attribute lookup order

Subtopics Covered (8):
  • Class instantiation `obj = ClassName(...)`
  • Unique object identity (`id(obj)`)
  • `isinstance()`
โ†’ What Topic Is Next: Next Topic 4.4: Constructors (__init__)
Guide โ†’

Object initialization via `__init__(self, ...)` (vs `__new__` allocator), validating invariants at construction time

Subtopics Covered (8):
  • Object initialization via `__init__(self
  • ...)` (vs `__new__` allocator)
  • Validating invariants at construction time
โ†’ What Topic Is Next: Next Topic 4.5: self Instance Reference
Guide โ†’

How Python binds `instance.method(x)` to `Class.method(instance, x)` and why explicit `self` is first parameter

Subtopics Covered (8):
  • How Python binds `instance.method(x)` to `Class.method(instance
  • X)`
  • Why explicit `self` is first parameter
โ†’ What Topic Is Next: Next Topic 4.6: Instance Variables
Guide โ†’

Object-specific attributes bound on `self.attr` inside `__init__`, dynamic attribute storage in `obj.__dict__`

Subtopics Covered (8):
  • Object-specific attributes bound on `self.attr` inside `__init__`
  • Dynamic attribute storage in `obj.__dict__`
  • Production Edge-Case & Pitfall Guard (Instance Variables)
โ†’ What Topic Is Next: Next Topic 4.7: Class Variables
Guide โ†’

Class-level attributes shared across all instances (`company_name`, constants), lookup fallback `obj.__dict__` -> `cls.__dict__`, and mutable class attribute danger

Subtopics Covered (8):
  • Class-level attributes shared across all instances (`company_name`
  • Constants)
  • Lookup fallback `obj.__dict__` -> `cls.__dict__`
โ†’ What Topic Is Next: Next Topic 4.8: Instance Methods
Guide โ†’

Behavior operating on `self` state, mutator vs query methods, and calling sibling methods via `self.`

Subtopics Covered (8):
  • Behavior operating on `self` state
  • Mutator vs query methods
  • Calling sibling methods via `self.`
โ†’ What Topic Is Next: Next Topic 4.9: Class Methods (@classmethod)
Guide โ†’

`@classmethod` decorator, `cls` class binding (subclass-aware!), and named alternative constructors (`from_dict`, `from_csv_row`)

Subtopics Covered (8):
  • `@classmethod` decorator
  • `cls` class binding (subclass-aware!)
  • Named alternative constructors (`from_dict`
โ†’ What Topic Is Next: Next Topic 4.10: Static Methods (@staticmethod)
Guide โ†’

`@staticmethod` decorator for namespace-grouped pure helper functions requiring neither `self` nor `cls`

Subtopics Covered (8):
  • `@staticmethod` decorator for namespace-grouped pure helper functions requiring neither `self` nor `cls`
  • Production Edge-Case & Pitfall Guard (Static Methods (@staticmethod))
  • Hands-On Python Implementation & Verification (Static Methods (@staticmethod))
โ†’ What Topic Is Next: Next Topic 4.11: Encapsulation
Guide โ†’

Public attributes, `_protected` convention, `__private` name mangling (`_ClassName__attr`), and invariant protection

Subtopics Covered (8):
  • Public attributes
  • `_protected` convention
  • `__private` name mangling (`_ClassName__attr`)
โ†’ What Topic Is Next: Next Topic 4.12: Single Inheritance
Guide โ†’

Deriving specialized `class Sub(Base):` (`is-a` relationship), `super().__init__(...)`, and extending base behavior

Subtopics Covered (8):
  • Deriving specialized `class Sub(Base):` (`is-a` relationship)
  • `super().__init__(...)`
  • Extending base behavior
โ†’ What Topic Is Next: Next Topic 4.13: Multiple Inheritance
Guide โ†’

Inheriting from multiple bases `class View(AuthMixin, AuditMixin, BaseView):` and cooperative `super()` mixin design

Subtopics Covered (8):
  • Inheriting from multiple bases `class View(AuthMixin
  • AuditMixin
  • BaseView):`
โ†’ What Topic Is Next: Next Topic 4.14: Multilevel Inheritance
Guide โ†’

Chained `GrandParent -> Parent -> Child` hierarchies (`Exception -> BankingError -> InsufficientFundsError`) and keeping depth shallow

Subtopics Covered (8):
  • Chained `GrandParent -> Parent -> Child` hierarchies (`Exception -> BankingError -> InsufficientFundsError`)
  • Keeping depth shallow
  • Production Edge-Case & Pitfall Guard (Multilevel Inheritance)
โ†’ What Topic Is Next: Next Topic 4.15: Hierarchical Inheritance
Guide โ†’

Multiple sibling subclasses (`SavingsAccount`, `CurrentAccount`, `SalaryAccount`) sharing one common parent (`Account`)

Subtopics Covered (8):
  • Multiple sibling subclasses (`SavingsAccount`
  • `CurrentAccount`
  • `SalaryAccount`) sharing one common parent (`Account`)
โ†’ What Topic Is Next: Next Topic 4.16: Polymorphism and Duck Typing
Guide โ†’

Method overriding across subtypes and Pythonic duck typing ("if it implements `.send()`, treat it as a sender")

Subtopics Covered (8):
  • Method overriding across subtypes
  • Pythonic duck typing ("if it implements `.send()`
  • Treat it as a sender")
โ†’ What Topic Is Next: Next Topic 4.17: Abstraction
Guide โ†’

Separating WHAT a repository/gateway contract promises from HOW PostgreSQL, Redis, or JSON files implement it

Subtopics Covered (8):
  • Separating WHAT a repository/gateway contract promises from HOW PostgreSQL
  • Redis
  • Or JSON files implement it
โ†’ What Topic Is Next: Next Topic 4.18: abc Module (Abstract Base Classes)
Guide โ†’

`from abc import ABC, abstractmethod`, preventing instantiation of incomplete subclasses at instantiation time

Subtopics Covered (8):
  • `from abc import ABC
  • Abstractmethod`
  • Preventing instantiation of incomplete subclasses at instantiation time
โ†’ What Topic Is Next: Next Topic 4.19: Composition
Guide โ†’

Strong `has-a` ownership (`Order` owns `OrderLine` items; `EmployeeService` composes a `Repository` + `Logger`) โ€” "favor composition over inheritance"

Subtopics Covered (8):
  • Strong `has-a` ownership (`Order` owns `OrderLine` items
  • `EmployeeService` composes a `Repository` + `Logger`) โ€” "favor composition over inheritance"
  • Production Edge-Case & Pitfall Guard (Composition)
โ†’ What Topic Is Next: Next Topic 4.20: Aggregation
Guide โ†’

Loose `has-a` relationship where child objects (`Employee`) have an independent lifecycle from the container (`Department`)

Subtopics Covered (8):
  • Loose `has-a` relationship where child objects (`Employee`) have an independent lifecycle from the container (`Department`)
  • Production Edge-Case & Pitfall Guard (Aggregation)
  • Hands-On Python Implementation & Verification (Aggregation)
โ†’ What Topic Is Next: Next Topic 4.21: Method Resolution Order (MRO)
Guide โ†’

C3 Linearization algorithm, inspecting `ClassName.mro()` / `__mro__`, and how `super()` follows MRO in diamond hierarchies

Subtopics Covered (8):
  • C3 Linearization algorithm
  • Inspecting `ClassName.mro()` / `__mro__`
  • How `super()` follows MRO in diamond hierarchies
โ†’ What Topic Is Next: Next Topic 4.22: Magic / Dunder Methods (__str__, __repr__, __len__, __eq__)
Guide โ†’

Unambiguous developer `__repr__` vs user-friendly `__str__`, container `__len__`, value equality `__eq__` (returning `NotImplemented` on foreign types), and `__lt__`

Subtopics Covered (8):
  • Unambiguous developer `__repr__` vs user-friendly `__str__`
  • Container `__len__`
  • Value equality `__eq__` (returning `NotImplemented` on foreign types)
โ†’ What Topic Is Next: Next Topic 4.23: Properties (@property and Setters)
Guide โ†’

`@property` computed getters, `@attr.setter` validation mutators, and read-only attributes without breaking `obj.attr` caller syntax

Subtopics Covered (8):
  • `@property` computed getters
  • `@attr.setter` validation mutators
  • Read-only attributes without breaking `obj.attr` caller syntax
โ†’ What Topic Is Next: Next Topic 4.24: Dataclasses (@dataclass)
Guide โ†’

`from dataclasses import dataclass, asdict`, auto-generated `__init__`, `__repr__`, `__eq__`, type annotations, and `__post_init__` validation

Subtopics Covered (8):
  • `from dataclasses import dataclass
  • Asdict`
  • Auto-generated `__init__`
โ†’ What Topic Is Next: Next Topic 4.25: File Handling (open, read, write, append)
Guide โ†’

`open(path, mode, encoding="utf-8")`, `.read()`, `.readline()`, `.readlines()`, line-by-line lazy iteration `for line in f:`, and `.write()`

Subtopics Covered (8):
  • `open(path
  • Mode
  • Encoding="utf-8")`
โ†’ What Topic Is Next: Next Topic 4.26: File Modes (r, w, a, x and Binary)
Guide โ†’

Read `r`, truncate-write `w`, append `a`, exclusive-create `x` (`FileExistsError`), binary `rb`/`wb` for images/PDFs

Subtopics Covered (8):
  • Read `r`
  • Truncate-write `w`
  • Append `a`
โ†’ What Topic Is Next: Next Topic 4.27: Context Managers (with Statement)
Guide โ†’

`with open(...) as f:` deterministic `__enter__` / `__exit__` cleanup even when exceptions are raised mid-block

Subtopics Covered (8):
  • `with open(...) as f:` deterministic `__enter__` / `__exit__` cleanup even when exceptions are raised mid-block
  • Production Edge-Case & Pitfall Guard (Context Managers (with Statement))
  • Hands-On Python Implementation & Verification (Context Managers (with Statement))
โ†’ What Topic Is Next: Next Topic 4.28: CSV Reading and Writing
Guide โ†’

`csv.reader`, `csv.writer`, `csv.DictReader`, `csv.DictWriter`, `writeheader()`, and `newline=""` requirement

Subtopics Covered (8):
  • `csv.reader`
  • `csv.writer`
  • `csv.DictReader`
โ†’ What Topic Is Next: Next Topic 4.29: JSON Serialization and Deserialization
Guide โ†’

`json.dumps()` / `json.dump(..., indent=2)` and `json.loads()` / `json.load()`, `json.JSONDecodeError`, and custom serializers

Subtopics Covered (8):
  • `json.dumps()` / `json.dump(...
  • Indent=2)`
  • `json.loads()` / `json.load()`
โ†’ What Topic Is Next: Next Topic 4.30: Pickle Object Serialization Fundamentals
Guide โ†’

Binary Python object serialization (`pickle.dumps`/`loads`), Python-only format limitations, and arbitrary code execution security risks

Subtopics Covered (8):
  • Binary Python object serialization (`pickle.dumps`/`loads`)
  • Python-only format limitations
  • Arbitrary code execution security risks
โ†’ What Topic Is Next: Next Topic 4.31: pathlib File and Path Management
Guide โ†’

`from pathlib import Path`, `/` path joining, `.resolve()`, `.exists()`, `.is_file()`, `.mkdir(parents=True, exist_ok=True)`, `.glob()`, `.read_text()` / `.write_tex...

Subtopics Covered (8):
  • `from pathlib import Path`
  • `/` path joining
  • `.resolve()`
โ†’ What Topic Is Next: Module 4 Capstone (Project 1: Python Employee Management System) โ†’ Next Topic 5.1: Iterables

Design and build a modular, object-oriented, file-backed Python 3.12 Employee Management Console Application supporting complete CRUD, search, JSON/CSV persistence, custom exception handling, and structured application logging.

โ€ข Multi-package OOP Python 3.12 project (`models`, `repositories`, `services`, `exceptions`, `cli`)
โ€ข Custom `EmployeeError`, `DuplicateEmployeeError`, `EmployeeNotFoundError`, and `InvalidEmployeeDataError` hierarchy
โ€ข UTF-8 JSON storage + CSV payroll export using `pathlib` and `with` context managers
โ€ข Configured `logging` (`console` + `logs/app.log`) and comprehensive `README.md`

Module Learning & Hands-On Objectives

โœ“ Build lazy `O(1)`-memory streaming pipelines with custom iterators, `yield` generators, and generator expressions.
โœ“ Author `functools.wraps`-preserving decorators, parameterized/nested decorators, closures, and `@contextmanager` utilities.
โœ“ Write strictly typed Python 3.12 APIs using annotations, `TypeVar` generics, structural `Protocol`s, frozen/slotted `@dataclass`, and `Enum`s.
โœ“ Solve real data-processing problems with `Counter`, `defaultdict`, `deque`, `lru_cache`, `itertools`, and compiled `re` regexes.
โœ“ Configure reproducible projects with `venv`, `os.environ` 12-factor config, `pyproject.toml`, `pip`/`requirements.txt`, and `Poetry`.
Guide โ†’

Objects implementing `__iter__` (or sequence `__getitem__`), reusable multi-pass containers (`list`, `dict`) vs single-pass streams

Subtopics Covered (8):
  • Objects implementing `__iter__` (or sequence `__getitem__`)
  • Reusable multi-pass containers (`list`
  • `dict`) vs single-pass streams
โ†’ What Topic Is Next: Next Topic 5.2: Iterators
Guide โ†’

Stateful Iterator Protocol (`__iter__` returning `self` + `__next__` raising `StopIteration` when exhausted)

Subtopics Covered (8):
  • Stateful Iterator Protocol (`__iter__` returning `self` + `__next__` raising `StopIteration` when exhausted)
  • Production Edge-Case & Pitfall Guard (Iterators)
  • Hands-On Python Implementation & Verification (Iterators)
โ†’ What Topic Is Next: Next Topic 5.3: iter() and next()
Guide โ†’

Manual iteration via `it = iter(obj)` and `next(it, default)` sentinel handling without `StopIteration` crashes

Subtopics Covered (8):
  • Manual iteration via `it = iter(obj)`
  • `next(it
  • Default)` sentinel handling without `StopIteration` crashes
โ†’ What Topic Is Next: Next Topic 5.4: Generators (yield)
Guide โ†’

Generator functions pausing frame state at `yield`, `yield from` delegation, and `O(1)` memory streaming

Subtopics Covered (8):
  • Generator functions pausing frame state at `yield`
  • `yield from` delegation
  • `O(1)` memory streaming
โ†’ What Topic Is Next: Next Topic 5.5: Generator Expressions
Guide โ†’

Lazy `(expr for x in iterable if cond)` parenthesized expressions passed directly into `sum()`, `any()`, `all()`, `max()`

Subtopics Covered (8):
  • Lazy `(expr for x in iterable if cond)` parenthesized expressions passed directly into `sum()`
  • `any()`
  • `all()`
โ†’ What Topic Is Next: Next Topic 5.6: Function Decorators
Guide โ†’

`@decorator` syntactic sugar (`fn = decorator(fn)`), preserving `__name__`/`__doc__` metadata with `@functools.wraps(fn)`

Subtopics Covered (8):
  • `@decorator` syntactic sugar (`fn = decorator(fn)`)
  • Preserving `__name__`/`__doc__` metadata with `@functools.wraps(fn)`
  • Production Edge-Case & Pitfall Guard (Function Decorators)
โ†’ What Topic Is Next: Next Topic 5.7: Nested Decorators
Guide โ†’

Parameterized decorator factories (`@retry(max_attempts=3)`) and bottom-up composition order of stacked `@d1` / `@d2` decorators

Subtopics Covered (8):
  • Parameterized decorator factories (`@retry(max_attempts=3)`)
  • Bottom-up composition order of stacked `@d1` / `@d2` decorators
  • Production Edge-Case & Pitfall Guard (Nested Decorators)
โ†’ What Topic Is Next: Next Topic 5.8: Closures
Guide โ†’

Lexical scope capture (`__closure__` cell objects) and late-binding loop variable pitfalls in closures

Subtopics Covered (8):
  • Lexical scope capture (`__closure__` cell objects)
  • Late-binding loop variable pitfalls in closures
  • Production Edge-Case & Pitfall Guard (Closures)
โ†’ What Topic Is Next: Next Topic 5.9: Custom Context Managers (__enter__ and __exit__)
Guide โ†’

Class-based context manager protocol (`__enter__` resource acquisition, `__exit__(exc_type, exc_val, tb)` cleanup/rollback)

Subtopics Covered (8):
  • Class-based context manager protocol (`__enter__` resource acquisition
  • `__exit__(exc_type
  • Exc_val
โ†’ What Topic Is Next: Next Topic 5.10: contextlib (@contextmanager)
Guide โ†’

`from contextlib import contextmanager, suppress, ExitStack` generator-based context managers (`try: yield resource finally: cleanup()`)

Subtopics Covered (8):
  • `from contextlib import contextmanager
  • Suppress
  • ExitStack` generator-based context managers (`try: yield resource finally: cleanup()`)
โ†’ What Topic Is Next: Next Topic 5.11: Advanced Comprehensions
Guide โ†’

Set comprehensions `{...}`, dict comprehensions `{k: v ...}`, and nested comprehensions with filtering

Subtopics Covered (8):
  • Set comprehensions `{...}`
  • Dict comprehensions `{k: v ...}`
  • Nested comprehensions with filtering
โ†’ What Topic Is Next: Next Topic 5.12: Extended Iterable Unpacking
Guide โ†’

Starred target unpacking `first, *middle, last = seq`, nested tuple unpacking, and `{**d1, **d2}` / `[*a, *b]` literals

Subtopics Covered (8):
  • Starred target unpacking `first
  • *middle
  • Last = seq`
โ†’ What Topic Is Next: Next Topic 5.13: Walrus Operator (:=)
Guide โ†’

Assignment expressions `if (m := pattern.search(line)):` and `while (chunk := f.read(8192)):` avoiding duplicate calls

Subtopics Covered (8):
  • Assignment expressions `if (m := pattern.search(line)):`
  • `while (chunk := f.read(8192)):` avoiding duplicate calls
  • Production Edge-Case & Pitfall Guard (Walrus Operator (:=))
โ†’ What Topic Is Next: Next Topic 5.14: Structural Pattern Matching (match and case)
Guide โ†’

Python 3.10+ `match subject:` with sequence, mapping (`case {"type": "paid", "amount": amt}:`), class, OR (`|`), guard (`if`), and wildcard (`case _:`) patterns

Subtopics Covered (8):
  • Python 3.10+ `match subject:` with sequence
  • Mapping (`case {"type": "paid"
  • "amount": amt}:`)
โ†’ What Topic Is Next: Next Topic 5.15: Type Hints and Annotations
Guide โ†’

PEP 484/585/604 modern Python 3.12 syntax (`list[str]`, `dict[str, int]`, `str | None`), return `-> None`, and runtime `__annotations__`

Subtopics Covered (8):
  • PEP 484/585/604 modern Python 3.12 syntax (`list[str]`
  • `dict[str
  • Int]`
โ†’ What Topic Is Next: Next Topic 5.16: typing Module (List, Dict, Optional, Union, Callable)
Guide โ†’

`Any` vs `object`, `Literal`, `TypedDict`, `Final`, `Collections.abc.Callable`, and legacy `Optional`/`Union`/`List` in older codebases

Subtopics Covered (8):
  • `Any` vs `object`
  • `Literal`
  • `TypedDict`
โ†’ What Topic Is Next: Next Topic 5.17: Generic Typing (TypeVar and Generic)
Guide โ†’

Python 3.12 PEP 695 generic syntax `class Page[T]:` and `def first[T](items: list[T]) -> T:` (plus `TypeVar`/`Generic[T]`)

Subtopics Covered (8):
  • Python 3.12 PEP 695 generic syntax `class Page[T]:`
  • `def first[T](items: list[T]) -> T:` (plus `TypeVar`/`Generic[T]`)
  • Production Edge-Case & Pitfall Guard (Generic Typing (TypeVar and Generic))
โ†’ What Topic Is Next: Next Topic 5.18: Protocols (Structural Subtyping)
Guide โ†’

`from typing import Protocol, runtime_checkable` โ€” static duck typing without forcing nominal `ABC` inheritance

Subtopics Covered (8):
  • `from typing import Protocol
  • Runtime_checkable` โ€” static duck typing without forcing nominal `ABC` inheritance
  • Production Edge-Case & Pitfall Guard (Protocols (Structural Subtyping))
โ†’ What Topic Is Next: Next Topic 5.19: Advanced Dataclasses (field, frozen, slots)
Guide โ†’

`@dataclass(frozen=True, slots=True, kw_only=True)`, `field(default_factory=..., repr=False)`, and `replace()` immutable updates

Subtopics Covered (8):
  • `@dataclass(frozen=True
  • Slots=True
  • Kw_only=True)`
โ†’ What Topic Is Next: Next Topic 5.20: Enums (Enum and IntEnum)
Guide โ†’

`from enum import Enum, IntEnum, StrEnum, auto` for type-safe finite states (`ApplicationStatus`, `UserRole`)

Subtopics Covered (8):
  • `from enum import Enum
  • IntEnum
  • StrEnum
โ†’ What Topic Is Next: Next Topic 5.21: collections Module (Counter, defaultdict, namedtuple, deque)
Guide โ†’

`Counter.most_common()`, `defaultdict(list)` grouping, `namedtuple` lightweight records, and `deque(maxlen=N)` `O(1)` double-ended queues

Subtopics Covered (8):
  • `Counter.most_common()`
  • `defaultdict(list)` grouping
  • `namedtuple` lightweight records
โ†’ What Topic Is Next: Next Topic 5.22: functools (partial, lru_cache, wraps)
Guide โ†’

`@lru_cache(maxsize=256)` / `@cache` memoization, `cache_info()`, `partial()` argument pre-binding, and `@wraps`

Subtopics Covered (8):
  • `@lru_cache(maxsize=256)` / `@cache` memoization
  • `cache_info()`
  • `partial()` argument pre-binding
โ†’ What Topic Is Next: Next Topic 5.23: itertools (chain, combinations, permutations, groupby)
Guide โ†’

`itertools.chain.from_iterable`, `islice`, `batched` (Python 3.12!), `combinations`, `permutations`, and `groupby`

Subtopics Covered (8):
  • `itertools.chain.from_iterable`
  • `islice`
  • `batched` (Python 3.12!)
โ†’ What Topic Is Next: Next Topic 5.24: Regular Expressions (re Module)
Guide โ†’

`re.compile()`, raw patterns `r"..."`, `search` vs `match` vs `fullmatch`, `findall`, `sub`, named groups `(?P<id>...)`, and ReDoS awareness

Subtopics Covered (8):
  • `re.compile()`
  • Raw patterns `r"..."`
  • `search` vs `match` vs `fullmatch`
โ†’ What Topic Is Next: Next Topic 5.25: Environment Variables (os.environ)
Guide โ†’

`os.environ.get("KEY", default)` vs mandatory `os.environ["SECRET_KEY"]` fail-fast startup validation, `.env` loading via `python-dotenv`

Subtopics Covered (8):
  • `os.environ.get("KEY"
  • Default)` vs mandatory `os.environ["SECRET_KEY"]` fail-fast startup validation
  • `.env` loading via `python-dotenv`
โ†’ What Topic Is Next: Next Topic 5.26: Application Configuration Management
Guide โ†’

Layered `BaseConfig` -> `DevConfig` / `TestConfig` / `ProdConfig` dataclasses, `.env.example` templates, and feature flags

Subtopics Covered (8):
  • Layered `BaseConfig` -> `DevConfig` / `TestConfig` / `ProdConfig` dataclasses
  • `.env.example` templates
  • Feature flags
โ†’ What Topic Is Next: Next Topic 5.27: Python Packaging (pyproject.toml)
Guide โ†’

Modern PEP 621 `pyproject.toml` metadata, `src/` vs flat layout, editable installs `pip install -e .`, and tool config (`[tool.pytest]`, `[tool.ruff]`)

Subtopics Covered (8):
  • Modern PEP 621 `pyproject.toml` metadata
  • `src/` vs flat layout
  • Editable installs `pip install -e .`
โ†’ What Topic Is Next: Next Topic 5.28: Virtual Environments (venv)
Guide โ†’

`python -m venv .venv`, activation on Windows (`.venv\Scripts\activate`) and Linux (`source .venv/bin/activate`), site-packages isolation

Subtopics Covered (8):
  • `python -m venv .venv`
  • Activation on Windows (`.venv\Scripts\activate`)
  • Linux (`source .venv/bin/activate`)
โ†’ What Topic Is Next: Next Topic 5.29: Dependency Management (pip, requirements.txt and Poetry)
Guide โ†’

Pinned deterministic `requirements.txt` vs `requirements-dev.txt`, semantic version constraints, and `Poetry` (`poetry.lock`) fundamentals

Subtopics Covered (8):
  • Pinned deterministic `requirements.txt` vs `requirements-dev.txt`
  • Semantic version constraints
  • `Poetry` (`poetry.lock`) fundamentals
โ†’ What Topic Is Next: Module 5 Capstone (Week 5 Lab Build: Streaming Log Analyzer & Typed Config Engine) โ†’ Next Topic 6.1: Python Execution Model

Create an O(1)-memory generator log-analytics pipeline using `@functools.wraps` timing/retry decorators, custom `@contextmanager` timers, `StrEnum` levels, frozen `@dataclass(slots=True)` DTOs, `re.fullmatch` validators, and `pyproject.toml` packaging.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Explain CPython bytecode execution, `PyObject` reference counting (`sys.getrefcount`), cyclic `gc` generations, and the GIL.
โœ“ Execute concurrent I/O safely with `threading`, `Lock`/`RLock`, and `ThreadPoolExecutor` while preventing race conditions and deadlocks.
โœ“ Bypass the GIL for CPU-bound workloads using `multiprocessing`, `ProcessPoolExecutor`, and `Queue`/`Pipe` IPC.
โœ“ Write non-blocking `asyncio` coroutines using `async`/`await`, `create_task`, `gather`, `async with`, async generators, and `httpx.AsyncClient`.
โœ“ Select accurately between `asyncio` (high-concurrency I/O), `ThreadPoolExecutor` (blocking I/O libraries), and `ProcessPoolExecutor` (CPU-bound work).
Guide โ†’

Source parsing -> AST -> code objects -> bytecode evaluation loop on the Python Virtual Machine stack frame

Subtopics Covered (8):
  • Source parsing -> AST -> code objects -> bytecode evaluation loop on the Python Virtual Machine stack frame
  • Production Edge-Case & Pitfall Guard (Python Execution Model)
  • Hands-On Python Implementation & Verification (Python Execution Model)
โ†’ What Topic Is Next: Next Topic 6.2: CPython Runtime Architecture
Guide โ†’

CPython reference interpreter vs PyPy/Cython, C extension ABI, and why NumPy/psycopg release the GIL in C code

Subtopics Covered (8):
  • CPython reference interpreter vs PyPy/Cython
  • C extension ABI
  • Why NumPy/psycopg release the GIL in C code
โ†’ What Topic Is Next: Next Topic 6.3: Python Bytecode Compilation (dis)
Guide โ†’

Inspecting stack-machine opcodes (`LOAD_FAST`, `BINARY_OP`, `RETURN_VALUE`), `.pyc` caching, and Python 3.11+ adaptive specializing interpreter

Subtopics Covered (8):
  • Inspecting stack-machine opcodes (`LOAD_FAST`
  • `BINARY_OP`
  • `RETURN_VALUE`)
โ†’ What Topic Is Next: Next Topic 6.4: Memory Allocation in Python
Guide โ†’

Private CPython heap, `PyObject` header (`ob_refcnt` + `ob_type`), `pymalloc` small-object arenas, and `tracemalloc` profiling

Subtopics Covered (8):
  • Private CPython heap
  • `PyObject` header (`ob_refcnt` + `ob_type`)
  • `pymalloc` small-object arenas
โ†’ What Topic Is Next: Next Topic 6.5: Reference Counting
Guide โ†’

Immediate deterministic deallocation when `ob_refcnt` drops to `0`, inspecting `sys.getrefcount()`, and strong vs `weakref` references

Subtopics Covered (8):
  • Immediate deterministic deallocation when `ob_refcnt` drops to `0`
  • Inspecting `sys.getrefcount()`
  • Strong vs `weakref` references
โ†’ What Topic Is Next: Next Topic 6.6: Cyclic Garbage Collection (gc)
Guide โ†’

Why reference cycles (`a.peer = b; b.peer = a`) never hit refcount `0`, generational `gc` (Gen 0/1/2), and `gc.collect()`

Subtopics Covered (8):
  • Why reference cycles (`a.peer = b
  • B.peer = a`) never hit refcount `0`
  • Generational `gc` (Gen 0/1/2)
โ†’ What Topic Is Next: Next Topic 6.7: Mutable Object References in Memory
Guide โ†’

Shared references across containers, in-place mutation (`+=` on `list` calls `__iadd__`) vs rebinding (`+=` on `tuple`/`str` creates new object)

Subtopics Covered (8):
  • Shared references across containers
  • In-place mutation (`+=` on `list` calls `__iadd__`) vs rebinding (`+=` on `tuple`/`str` creates new object)
  • Production Edge-Case & Pitfall Guard (Mutable Object References in Memory)
โ†’ What Topic Is Next: Next Topic 6.8: Shallow vs Deep Copying in Memory
Guide โ†’

Memory graph topology of alias (`=`), shallow copy (`copy.copy`), and deep copy (`copy.deepcopy`) on nested state

Subtopics Covered (8):
  • Memory graph topology of alias (`=`)
  • Shallow copy (`copy.copy`)
  • Deep copy (`copy.deepcopy`) on nested state
โ†’ What Topic Is Next: Next Topic 6.9: Global Interpreter Lock (GIL)
Guide โ†’

What the CPython GIL protects, why CPU-bound Python bytecode runs 1 thread at a time per process, and why I/O releases the GIL

Subtopics Covered (8):
  • What the CPython GIL protects
  • Why CPU-bound Python bytecode runs 1 thread at a time per process
  • Why I/O releases the GIL
โ†’ What Topic Is Next: Next Topic 6.10: Threading Fundamentals
Guide โ†’

OS threads inside a single shared-memory process, main thread vs daemon threads, and preemptive context switching

Subtopics Covered (8):
  • OS threads inside a single shared-memory process
  • Main thread vs daemon threads
  • Preemptive context switching
โ†’ What Topic Is Next: Next Topic 6.11: Creating and Managing Threads
Guide โ†’

`threading.Thread(target=..., args=...)`, `.start()`, `.join(timeout=...)`, and collecting results via thread-safe `queue.Queue`

Subtopics Covered (8):
  • `threading.Thread(target=...
  • Args=...)`
  • `.start()`
โ†’ What Topic Is Next: Next Topic 6.12: Thread Synchronization (Lock and RLock)
Guide โ†’

Mutual exclusion with `threading.Lock()` (`with lock:`), re-entrant `RLock()` when a locked method calls another locked method on `self`

Subtopics Covered (8):
  • Mutual exclusion with `threading.Lock()` (`with lock:`)
  • Re-entrant `RLock()` when a locked method calls another locked method on `self`
  • Production Edge-Case & Pitfall Guard (Thread Synchronization (Lock and RLock))
โ†’ What Topic Is Next: Next Topic 6.13: Race Conditions
Guide โ†’

Check-then-act (`if balance >= amt: balance -= amt`) and read-modify-write (`counter += 1` is multiple bytecodes!) non-atomicity

Subtopics Covered (8):
  • Check-then-act (`if balance >= amt: balance -= amt`)
  • Read-modify-write (`counter += 1` is multiple bytecodes!) non-atomicity
  • Production Edge-Case & Pitfall Guard (Race Conditions)
โ†’ What Topic Is Next: Next Topic 6.14: Deadlocks and Prevention
Guide โ†’

Circular lock wait (`Thread 1 locks A -> waits B`, `Thread 2 locks B -> waits A`) and prevention via canonical lock ordering (`id` sort) & timeouts

Subtopics Covered (8):
  • Circular lock wait (`Thread 1 locks A -> waits B`
  • `Thread 2 locks B -> waits A`)
  • Prevention via canonical lock ordering (`id` sort) & timeouts
โ†’ What Topic Is Next: Next Topic 6.15: Thread Pools (ThreadPoolExecutor)
Guide โ†’

`from concurrent.futures import ThreadPoolExecutor, as_completed`, `executor.submit()`, `executor.map()`, `Future.result(timeout=...)`

Subtopics Covered (8):
  • `from concurrent.futures import ThreadPoolExecutor
  • As_completed`
  • `executor.submit()`
โ†’ What Topic Is Next: Next Topic 6.16: Multiprocessing (Process-Based Parallelism)
Guide โ†’

Separate OS processes, separate Python heaps + separate GILs for true multi-core CPU parallelism, `spawn` vs `fork` start methods

Subtopics Covered (8):
  • Separate OS processes
  • Separate Python heaps + separate GILs for true multi-core CPU parallelism
  • `spawn` vs `fork` start methods
โ†’ What Topic Is Next: Next Topic 6.17: Process Pools (ProcessPoolExecutor)
Guide โ†’

`concurrent.futures.ProcessPoolExecutor` unified `Future` API, pickling overhead vs chunk size (`chunksize`), and CPU core sizing

Subtopics Covered (8):
  • `concurrent.futures.ProcessPoolExecutor` unified `Future` API
  • Pickling overhead vs chunk size (`chunksize`)
  • CPU core sizing
โ†’ What Topic Is Next: Next Topic 6.18: Inter-Process Communication (Queue and Pipe)
Guide โ†’

Why separate processes do NOT share global variables, passing messages safely via `multiprocessing.Queue` and two-endpoint `Pipe`

Subtopics Covered (8):
  • Why separate processes do NOT share global variables
  • Passing messages safely via `multiprocessing.Queue`
  • Two-endpoint `Pipe`
โ†’ What Topic Is Next: Next Topic 6.19: Threading vs Multiprocessing Comparison
Guide โ†’

Memory footprint, startup latency, GIL impact, crash isolation, and state-sharing trade-offs between threads and processes

Subtopics Covered (8):
  • Memory footprint
  • Startup latency
  • GIL impact
โ†’ What Topic Is Next: Next Topic 6.20: Asynchronous Programming Model
Guide โ†’

Cooperative single-threaded multitasking vs preemptive OS threads, non-blocking sockets (`epoll`/`IOCP`), and why blocking the loop freezes all requests

Subtopics Covered (8):
  • Cooperative single-threaded multitasking vs preemptive OS threads
  • Non-blocking sockets (`epoll`/`IOCP`)
  • Why blocking the loop freezes all requests
โ†’ What Topic Is Next: Next Topic 6.21: Coroutines with async and await
Guide โ†’

`async def` coroutine functions, coroutine objects (do nothing until awaited!), and `await` suspension points

Subtopics Covered (8):
  • `async def` coroutine functions
  • Coroutine objects (do nothing until awaited!)
  • `await` suspension points
โ†’ What Topic Is Next: Next Topic 6.22: Asyncio Event Loop
Guide โ†’

`asyncio.run()` lifecycle, ready queue vs I/O selector callbacks, `asyncio.get_running_loop()`, and `asyncio.to_thread()` for legacy sync calls

Subtopics Covered (8):
  • `asyncio.run()` lifecycle
  • Ready queue vs I/O selector callbacks
  • `asyncio.get_running_loop()`
โ†’ What Topic Is Next: Next Topic 6.23: asyncio Core Module
Guide โ†’

`asyncio.sleep`, `asyncio.wait_for(coro, timeout=...)`, `asyncio.Semaphore` concurrency throttling, and `asyncio.Queue`

Subtopics Covered (8):
  • `asyncio.sleep`
  • `asyncio.wait_for(coro
  • Timeout=...)`
โ†’ What Topic Is Next: Next Topic 6.24: Concurrent Tasks (asyncio.create_task)
Guide โ†’

Scheduling coroutines eagerly on the loop with `asyncio.create_task()`, task cancellation (`task.cancel()`), and Python 3.11+ `asyncio.TaskGroup`

Subtopics Covered (8):
  • Scheduling coroutines eagerly on the loop with `asyncio.create_task()`
  • Task cancellation (`task.cancel()`)
  • Python 3.11+ `asyncio.TaskGroup`
โ†’ What Topic Is Next: Next Topic 6.25: Parallel Awaitables (asyncio.gather)
Guide โ†’

`await asyncio.gather(*aws, return_exceptions=True)` result ordering and partial failure handling across concurrent calls

Subtopics Covered (8):
  • `await asyncio.gather(*aws
  • Return_exceptions=True)` result ordering
  • Partial failure handling across concurrent calls
โ†’ What Topic Is Next: Next Topic 6.26: Async Context Managers (async with)
Guide โ†’

`__aenter__` and `__aexit__` protocol and `@contextlib.asynccontextmanager` for async DB sessions and HTTP client pools

Subtopics Covered (8):
  • `__aenter__`
  • `__aexit__` protocol
  • `@contextlib.asynccontextmanager` for async DB sessions
โ†’ What Topic Is Next: Next Topic 6.27: Async Iterators (__aiter__ and async for)
Guide โ†’

`__aiter__` and `async def __anext__` (`StopAsyncIteration`) consumed via `async for item in stream:`

Subtopics Covered (8):
  • `__aiter__`
  • `async def __anext__` (`StopAsyncIteration`) consumed via `async for item in stream:`
  • Production Edge-Case & Pitfall Guard (Async Iterators (__aiter__ and async for))
โ†’ What Topic Is Next: Next Topic 6.28: Async Generators
Guide โ†’

`async def` containing `yield`, async generator comprehensions, and `contextlib.aclosing()` deterministic cleanup

Subtopics Covered (8):
  • `async def` containing `yield`
  • Async generator comprehensions
  • `contextlib.aclosing()` deterministic cleanup
โ†’ What Topic Is Next: Next Topic 6.29: Async HTTP Requests (httpx)
Guide โ†’

Using `httpx.AsyncClient(timeout=...)`, connection pooling, `raise_for_status()`, and concurrent outbound REST API calls

Subtopics Covered (8):
  • Using `httpx.AsyncClient(timeout=...)`
  • Connection pooling
  • `raise_for_status()`
โ†’ What Topic Is Next: Next Topic 6.30: Choosing the Right Concurrency Model
Guide โ†’

Architecture decision matrix: `asyncio` vs `ThreadPoolExecutor` vs `ProcessPoolExecutor` vs Celery/Kafka distributed queues

Subtopics Covered (8):
  • Architecture decision matrix: `asyncio` vs `ThreadPoolExecutor` vs `ProcessPoolExecutor` vs Celery/Kafka distributed queues
  • Production Edge-Case & Pitfall Guard (Choosing the Right Concurrency Model)
  • Hands-On Python Implementation & Verification (Choosing the Right Concurrency Model)
โ†’ What Topic Is Next: Module 6 Capstone (Week 6 Lab Build: Concurrency Benchmark & Async HTTP Aggregator) โ†’ Next Topic 7.1: DSA Introduction

Benchmark CPU-bound prime counting (`ProcessPoolExecutor`) vs blocking I/O (`ThreadPoolExecutor` + deadlock-free `Lock` ordering) vs non-blocking `asyncio.TaskGroup` + `Semaphore`-throttled `httpx.AsyncClient` API aggregation.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Analyze exact worst-case and amortized Time and Space Complexity (`O(1)`, `O(log n)`, `O(n)`, `O(n log n)`, `O(n^2)`) of Python code.
โœ“ Solve array, string, hashing, two-pointer, sliding-window, prefix-sum, and `bisect` binary-search problems cleanly.
โœ“ Implement and apply linked lists, monotonic stacks, `collections.deque` queues, binary trees, BSTs, and `heapq` priority queues.
โœ“ Traverse graphs with BFS/DFS and apply recursion, backtracking, greedy choice, memoized/tabulated DP, and bitwise tricks.
โœ“ Maintain continuous weekly progress toward the 100โ€“150 Python DSA problem target in the MockAttempt Coding Lab.
Guide โ†’

Why algorithmic efficiency matters in backend APIs (10ms vs 30s timeout on 100k rows) and structured interview problem-solving

Subtopics Covered (8):
  • Why algorithmic efficiency matters in backend APIs (10ms vs 30s timeout on 100k rows)
  • Structured interview problem-solving
  • Production Edge-Case & Pitfall Guard (DSA Introduction)
โ†’ What Topic Is Next: Next Topic 7.2: Time Complexity Analysis
Guide โ†’

Counting dominant operations across single loops, nested loops, halving loops, and hidden Python library costs (`x in list` is `O(n)`!)

Subtopics Covered (8):
  • Counting dominant operations across single loops
  • Nested loops
  • Halving loops
โ†’ What Topic Is Next: Next Topic 7.3: Space Complexity Analysis
Guide โ†’

Auxiliary memory vs input memory, recursion call-stack depth `O(h)`, slice copy allocations `arr[i:j]`, and in-place `O(1)` algorithms

Subtopics Covered (8):
  • Auxiliary memory vs input memory
  • Recursion call-stack depth `O(h)`
  • Slice copy allocations `arr[i:j]`
โ†’ What Topic Is Next: Next Topic 7.4: Big O Notation (O(1), O(log n), O(n), O(n log n), O(n^2))
Guide โ†’

Asymptotic growth hierarchy, dropping constants/lower-order terms, best/average/worst cases, and amortized `O(1)` `list.append`

Subtopics Covered (8):
  • Asymptotic growth hierarchy
  • Dropping constants/lower-order terms
  • Best/average/worst cases
โ†’ What Topic Is Next: Next Topic 7.5: Dynamic Arrays in Python Lists
Guide โ†’

Over-allocated C pointer array backing Python `list`, `O(1)` indexing & tail `append`/`pop`, `O(n)` middle `insert`/`pop(i)`

Subtopics Covered (8):
  • Over-allocated C pointer array backing Python `list`
  • `O(1)` indexing & tail `append`/`pop`
  • `O(n)` middle `insert`/`pop(i)`
โ†’ What Topic Is Next: Next Topic 7.6: Array Traversal and In-Place Manipulation
Guide โ†’

Single-pass read/write index pointers, Dutch National Flag 3-way partition (`0, 1, 2`), and cyclic index placement

Subtopics Covered (8):
  • Single-pass read/write index pointers
  • Dutch National Flag 3-way partition (`0
  • 2`)
โ†’ What Topic Is Next: Next Topic 7.7: String Problem-Solving Patterns
Guide โ†’

Character frequency arrays (`ord(c) - ord("a")`) / `Counter`, two-pointer palindrome checks, anagram grouping, and center expansion

Subtopics Covered (8):
  • Character frequency arrays (`ord(c) - ord("a")`) / `Counter`
  • Two-pointer palindrome checks
  • Anagram grouping
โ†’ What Topic Is Next: Next Topic 7.8: Hashing with Python Dictionaries
Guide โ†’

Complement lookup (`target - x` in `seen`), index mapping, frequency counting, and `OrderedDict` `O(1)` LRU cache design

Subtopics Covered (8):
  • Complement lookup (`target - x` in `seen`)
  • Index mapping
  • Frequency counting
โ†’ What Topic Is Next: Next Topic 7.9: Set-Based Lookup and Deduplication
Guide โ†’

`O(1)` `set` existence checks, sequence-start detection (`x - 1 not in num_set`), and cycle/duplicate detection

Subtopics Covered (8):
  • `O(1)` `set` existence checks
  • Sequence-start detection (`x - 1 not in num_set`)
  • Cycle/duplicate detection
โ†’ What Topic Is Next: Next Topic 7.10: Two-Pointer Technique
Guide โ†’

Converging opposite-end pointers (`l = 0, r = n - 1`) on sorted arrays, Container With Most Water, 3Sum, and Trapping Rain Water

Subtopics Covered (8):
  • Converging opposite-end pointers (`l = 0
  • R = n - 1`) on sorted arrays
  • Container With Most Water
โ†’ What Topic Is Next: Next Topic 7.11: Sliding Window (Fixed and Variable)
Guide โ†’

Fixed-size `k` rolling window and variable `[l..r]` window expanding `r` and shrinking `l` while invariant is violated

Subtopics Covered (8):
  • Fixed-size `k` rolling window
  • Variable `[l..r]` window expanding `r`
  • Shrinking `l` while invariant is violated
โ†’ What Topic Is Next: Next Topic 7.12: Prefix Sums and Range Queries
Guide โ†’

`pref[i + 1] = pref[i] + nums[i]` for `O(1)` range sums, prefix-sum + hashmap (`pref - k`) subarray counting, and difference arrays

Subtopics Covered (8):
  • `pref[i + 1] = pref[i] + nums[i]` for `O(1)` range sums
  • Prefix-sum + hashmap (`pref - k`) subarray counting
  • Difference arrays
โ†’ What Topic Is Next: Next Topic 7.13: Linear and Binary Search (bisect)
Guide โ†’

Iterative binary search (`l <= r` vs lower-bound `l < r`), `bisect_left` / `bisect_right`, rotated sorted search, and binary search on answer space

Subtopics Covered (8):
  • Iterative binary search (`l <= r` vs lower-bound `l < r`)
  • `bisect_left` / `bisect_right`
  • Rotated sorted search
โ†’ What Topic Is Next: Next Topic 7.14: Elementary Sorting (Bubble, Selection, Insertion)
Guide โ†’

In-place comparison sorts, stability definition, and why Insertion Sort runs in `O(n)` on nearly-sorted data

Subtopics Covered (8):
  • In-place comparison sorts
  • Stability definition
  • Why Insertion Sort runs in `O(n)` on nearly-sorted data
โ†’ What Topic Is Next: Next Topic 7.15: Divide-and-Conquer Sorting (Merge Sort and Quick Sort)
Guide โ†’

Stable `O(n log n)` Merge Sort, randomized Quick Sort partitioning, Python Timsort `key=` functions, and interval merging

Subtopics Covered (8):
  • Stable `O(n log n)` Merge Sort
  • Randomized Quick Sort partitioning
  • Python Timsort `key=` functions
โ†’ What Topic Is Next: Next Topic 7.16: Recursive Problem-Solving
Guide โ†’

Recurrence relations, divide-and-conquer fast modular exponentiation, recursion trees, and call-stack space analysis

Subtopics Covered (8):
  • Recurrence relations
  • Divide-
  • -conquer fast modular exponentiation
โ†’ What Topic Is Next: Next Topic 7.17: Backtracking Search and Pruning
Guide โ†’

Choose -> Explore -> Unchoose (`path.append` / `dfs` / `path.pop`) template for Subsets, Permutations, Combination Sum, and N-Queens

Subtopics Covered (8):
  • Choose -> Explore -> Unchoose (`path.append` / `dfs` / `path.pop`) template for Subsets
  • Permutations
  • Combination Sum
โ†’ What Topic Is Next: Next Topic 7.18: Singly and Doubly Linked Lists
Guide โ†’

`ListNode` pointer rewiring, dummy sentinel heads, Floydโ€™s fast/slow tortoise-hare cycle & middle detection, and Doubly Linked List LRU nodes

Subtopics Covered (8):
  • `ListNode` pointer rewiring
  • Dummy sentinel heads
  • Floydโ€™s fast/slow tortoise-hare cycle & middle detection
โ†’ What Topic Is Next: Next Topic 7.19: Stacks and Monotonic Stacks
Guide โ†’

LIFO stack via Python `list` (`append`/`pop`), balanced brackets, `MinStack`, and monotonic stack (`Next Greater Element`, `Daily Temperatures`)

Subtopics Covered (8):
  • LIFO stack via Python `list` (`append`/`pop`)
  • Balanced brackets
  • `MinStack`
โ†’ What Topic Is Next: Next Topic 7.20: Queues and collections.deque
Guide โ†’

FIFO queue with `collections.deque` (`append` + `popleft` in `O(1)`), circular queues, and monotonic deque (`Sliding Window Maximum`)

Subtopics Covered (8):
  • FIFO queue with `collections.deque` (`append` + `popleft` in `O(1)`)
  • Circular queues
  • Monotonic deque (`Sliding Window Maximum`)
โ†’ What Topic Is Next: Next Topic 7.21: Binary Tree Fundamentals
Guide โ†’

`TreeNode(val, left, right)`, height/depth, diameter, balanced check, symmetric tree, and path sum recursion

Subtopics Covered (8):
  • `TreeNode(val
  • Left
  • Right)`
โ†’ What Topic Is Next: Next Topic 7.22: Binary Search Trees (BST)
Guide โ†’

Strict BST range invariant `(min_val < node.val < max_val)`, `O(h)` search/insert/delete, Kth smallest via inorder, and BST LCA

Subtopics Covered (8):
  • Strict BST range invariant `(min_val < node.val < max_val)`
  • `O(h)` search/insert/delete
  • Kth smallest via inorder
โ†’ What Topic Is Next: Next Topic 7.23: Tree Traversals (Inorder, Preorder, Postorder, Level-Order)
Guide โ†’

Recursive & iterative DFS traversals (`inorder`, `preorder`, `postorder`) and `deque` BFS `levelOrder` / right-side view

Subtopics Covered (8):
  • Recursive & iterative DFS traversals (`inorder`
  • `preorder`
  • `postorder`)
โ†’ What Topic Is Next: Next Topic 7.24: Min-Heap and Max-Heap (heapq)
Guide โ†’

`heapq.heappush`, `heappop`, `heapify` (`O(n)`!), max-heap via `-val` negation, Top-K Frequent, Kth Largest, and Merge K Sorted Lists

Subtopics Covered (8):
  • `heapq.heappush`
  • `heappop`
  • `heapify` (`O(n)`!)
โ†’ What Topic Is Next: Next Topic 7.25: Graph Representations (Adjacency List and Matrix)
Guide โ†’

Directed vs undirected, weighted vs unweighted graphs, `defaultdict(list)` adjacency lists (`O(V + E)` space) vs `V x V` matrices

Subtopics Covered (8):
  • Directed vs undirected
  • Weighted vs unweighted graphs
  • `defaultdict(list)` adjacency lists (`O(V + E)` space) vs `V x V` matrices
โ†’ What Topic Is Next: Next Topic 7.26: Breadth-First Search (BFS)
Guide โ†’

Shortest unweighted path via `deque`, multi-source BFS (`Rotting Oranges`), and Kahnโ€™s in-degree Topological Sort

Subtopics Covered (8):
  • Shortest unweighted path via `deque`
  • Multi-source BFS (`Rotting Oranges`)
  • Kahnโ€™s in-degree Topological Sort
โ†’ What Topic Is Next: Next Topic 7.27: Depth-First Search (DFS)
Guide โ†’

Recursive and explicit-stack DFS, connected components, grid flood-fill, and 3-color (`0=unvisited, 1=visiting, 2=done`) directed cycle detection

Subtopics Covered (8):
  • Recursive
  • Explicit-stack DFS
  • Connected components
โ†’ What Topic Is Next: Next Topic 7.28: Greedy Algorithm Fundamentals
Guide โ†’

Greedy-choice property vs DP, earliest-finish-time interval scheduling, Jump Game reachability, and Gas Station circular tour

Subtopics Covered (8):
  • Greedy-choice property vs DP
  • Earliest-finish-time interval scheduling
  • Jump Game reachability
โ†’ What Topic Is Next: Next Topic 7.29: Dynamic Programming (Memoization and Tabulation)
Guide โ†’

Overlapping subproblems + optimal substructure, top-down `@lru_cache` memoization vs bottom-up 1D/2D tabulation (Climbing Stairs, House Robber, Coin Change, LIS, LCS...

Subtopics Covered (8):
  • Overlapping subproblems + optimal substructure
  • Top-down `@lru_cache` memoization vs bottom-up 1D/2D tabulation (Climbing Stairs
  • House Robber
โ†’ What Topic Is Next: Next Topic 7.30: Bit Manipulation Problems
Guide โ†’

XOR self-cancellation (`Single Number`), `n & (n - 1)` Brian Kernighan set-bit clearing, `(n & -n)` lowest set bit, and power-of-two check

Subtopics Covered (8):
  • XOR self-cancellation (`Single Number`)
  • `n & (n - 1)` Brian Kernighan set-bit clearing
  • `(n & -n)` lowest set bit
โ†’ What Topic Is Next: Module 7 Capstone (Week 7 Lab Build: 35-Problem Python DSA Workbench & Complexity Guide) โ†’ Next Topic 8.1: Version Control Fundamentals

Implement clean, type-hinted Python 3.12 solutions with documented Time/Space complexities across Arrays, Strings, Dict/Set Hashing, Two Pointers, Sliding Window, Prefix Sum, `bisect` Binary Search, Linked Lists, Monotonic Stacks, `deque`, and `heapq`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Navigate Working Directory, Staging Index, and `.git` Commit Graph fluently using `status`, `add`, `commit`, `log`, and `diff`.
โœ“ Develop features on isolated branches (`git switch -c feat/...`), merge cleanly, resolve merge conflicts, and use `stash`, `rebase`, `reset`, and `revert` safely.
โœ“ Collaborate via GitHub remotes (`clone`, `fetch`, `pull`, `push`), Pull Requests, Python `.gitignore` hygiene, and clear `README.md` setup docs.
โœ“ Conduct constructive Python PR code reviews checking security, Big-O, edge cases, type hints, and logging.
โœ“ Deliver Mini-Project 2: Python Inventory Management System developed across real GitHub feature branches and PRs.
Guide โ†’

Distributed Version Control (DVCS), auditability, blame history, safe experimentation, and team rollback guarantees

Subtopics Covered (8):
  • Distributed Version Control (DVCS)
  • Auditability
  • Blame history
โ†’ What Topic Is Next: Next Topic 8.2: Git Architecture (Working Directory, Staging, Repository)
Guide โ†’

Three-tree model: Working Tree -> Staging Area (`.git/index`) -> Local `.git/objects` DAG (`blob`, `tree`, `commit` SHA-1/SHA-256)

Subtopics Covered (8):
  • Three-tree model: Working Tree -> Staging Area (`.git/index`) -> Local `.git/objects` DAG (`blob`
  • `tree`
  • `commit` SHA-1/SHA-256)
โ†’ What Topic Is Next: Next Topic 8.3: Git Installation and Configuration
Guide โ†’

`git config --global user.name`, `user.email`, `init.defaultBranch main`, `core.autocrlf` (Windows `true` vs Linux `input`), and SSH keys

Subtopics Covered (8):
  • `git config --global user.name`
  • `user.email`
  • `init.defaultBranch main`
โ†’ What Topic Is Next: Next Topic 8.4: git init (Repository Initialization)
Guide โ†’

Initializing `.git` at project root, verifying repository boundaries, and immediate `.gitignore` creation before first `git add`

Subtopics Covered (8):
  • Initializing `.git` at project root
  • Verifying repository boundaries
  • Immediate `.gitignore` creation before first `git add`
โ†’ What Topic Is Next: Next Topic 8.5: git status (Inspecting Working Tree)
Guide โ†’

Interpreting untracked, unstaged, staged, ahead/behind remote tracking indicators before every commit

Subtopics Covered (8):
  • Interpreting untracked
  • Unstaged
  • Staged
โ†’ What Topic Is Next: Next Topic 8.6: git add (Staging Changes)
Guide โ†’

Explicit file staging `git add src/models.py`, interactive hunk staging `git add -p`, and unstaging via `git restore --staged`

Subtopics Covered (8):
  • Explicit file staging `git add src/models.py`
  • Interactive hunk staging `git add -p`
  • Unstaging via `git restore --staged`
โ†’ What Topic Is Next: Next Topic 8.7: git commit (Atomic Commits)
Guide โ†’

Conventional Commits (`feat:`, `fix:`, `refactor:`, `test:`, `docs:`) explaining WHY a change was made in small atomic units

Subtopics Covered (8):
  • Conventional Commits (`feat:`
  • `fix:`
  • `refactor:`
โ†’ What Topic Is Next: Next Topic 8.8: git log (Inspecting Commit History)
Guide โ†’

`git log --oneline --graph --decorate --all`, `-p` patch view, `-S "symbol"` pickaxe search, and file history

Subtopics Covered (8):
  • `git log --oneline --graph --decorate --all`
  • `-p` patch view
  • `-S "symbol"` pickaxe search
โ†’ What Topic Is Next: Next Topic 8.9: git diff (Comparing Changes)
Guide โ†’

Unstaged `git diff`, staged `git diff --staged`, and branch-to-branch `git diff main...feat/search` self-review

Subtopics Covered (8):
  • Unstaged `git diff`
  • Staged `git diff --staged`
  • Branch-to-branch `git diff main...feat/search` self-review
โ†’ What Topic Is Next: Next Topic 8.10: git branch (Branch Creation)
Guide โ†’

Lightweight 41-byte `HEAD` pointer mechanics, naming conventions (`feat/...`, `fix/...`, `chore/...`), `-a` listing, and `-d` cleanup

Subtopics Covered (8):
  • Lightweight 41-byte `HEAD` pointer mechanics
  • Naming conventions (`feat/...`
  • `fix/...`
โ†’ What Topic Is Next: Next Topic 8.11: git switch (Switching Branches)
Guide โ†’

Modern `git switch <branch>` and `git switch -c <new-branch>` vs `git restore` (replacing ambiguous overloaded `git checkout`)

Subtopics Covered (8):
  • Modern `git switch <branch>`
  • `git switch -c <new-branch>` vs `git restore` (replacing ambiguous overloaded `git checkout`)
  • Production Edge-Case & Pitfall Guard (git switch (Switching Branches))
โ†’ What Topic Is Next: Next Topic 8.12: git merge (Fast-Forward and 3-Way Merges)
Guide โ†’

Fast-forward pointer advance vs 3-way merge commit (`--no-ff`) vs Squash & Merge on Pull Requests

Subtopics Covered (8):
  • Fast-forward pointer advance vs 3-way merge commit (`--no-ff`) vs Squash & Merge on Pull Requests
  • Production Edge-Case & Pitfall Guard (git merge (Fast-Forward and 3-Way Merges))
  • Hands-On Python Implementation & Verification (git merge (Fast-Forward and 3-Way Merges))
โ†’ What Topic Is Next: Next Topic 8.13: Merge Conflict Resolution
Guide โ†’

Reading `<<<<<<< HEAD`, `=======`, `>>>>>>> branch` markers, resolving semantic intent, running `pytest`, and completing merge

Subtopics Covered (8):
  • Reading `<<<<<<< HEAD`
  • `=======`
  • `>>>>>>> branch` markers
โ†’ What Topic Is Next: Next Topic 8.14: git rebase Fundamentals
Guide โ†’

Replaying feature commits linearly atop latest `origin/main` (`git rebase main`), `--continue`/`--abort`, and the Golden Rule of Rebase

Subtopics Covered (8):
  • Replaying feature commits linearly atop latest `origin/main` (`git rebase main`)
  • `--continue`/`--abort`
  • The Golden Rule of Rebase
โ†’ What Topic Is Next: Next Topic 8.15: git stash (Saving Work in Progress)
Guide โ†’

`git stash push -u -m "wip: ..."`, `git stash list`, `git stash pop` vs `apply`, and `git stash drop`

Subtopics Covered (8):
  • `git stash push -u -m "wip: ..."`
  • `git stash list`
  • `git stash pop` vs `apply`
โ†’ What Topic Is Next: Next Topic 8.16: git reset (Soft, Mixed and Hard)
Guide โ†’

`--soft` (moves `HEAD` only), `--mixed` (unstages too), `--hard` (DESTROYS working changes!), and `git reflog` recovery

Subtopics Covered (8):
  • `--soft` (moves `HEAD` only)
  • `--mixed` (unstages too)
  • `--hard` (DESTROYS working changes!)
โ†’ What Topic Is Next: Next Topic 8.17: git revert (Safe Public Rollbacks)
Guide โ†’

Creating a new inverse commit via `git revert <sha>` to undo broken commits safely on shared `main` without rewriting history

Subtopics Covered (8):
  • Creating a new inverse commit via `git revert <sha>` to undo broken commits safely on shared `main` without rewriting history
  • Production Edge-Case & Pitfall Guard (git revert (Safe Public Rollbacks))
  • Hands-On Python Implementation & Verification (git revert (Safe Public Rollbacks))
โ†’ What Topic Is Next: Next Topic 8.18: Remote Repositories Configuration
Guide โ†’

`git remote -v`, `origin` vs `upstream`, SSH (`git@github.com:...`) vs HTTPS PAT remotes, and `git remote set-url`

Subtopics Covered (8):
  • `git remote -v`
  • `origin` vs `upstream`
  • SSH (`git@github.com:...`) vs HTTPS PAT remotes
โ†’ What Topic Is Next: Next Topic 8.19: git clone
Guide โ†’

Cloning full history vs shallow CI clones `git clone --depth 1`, automatic `origin` remote setup, and post-clone `.venv` bootstrap

Subtopics Covered (8):
  • Cloning full history vs shallow CI clones `git clone --depth 1`
  • Automatic `origin` remote setup
  • Post-clone `.venv` bootstrap
โ†’ What Topic Is Next: Next Topic 8.20: git fetch
Guide โ†’

Safely downloading remote commits/refs (`origin/main`) via `git fetch --prune` WITHOUT mutating your local working files

Subtopics Covered (8):
  • Safely downloading remote commits/refs (`origin/main`) via `git fetch --prune` WITHOUT mutating your local working files
  • Production Edge-Case & Pitfall Guard (git fetch)
  • Hands-On Python Implementation & Verification (git fetch)
โ†’ What Topic Is Next: Next Topic 8.21: git pull
Guide โ†’

`git pull --ff-only` vs `git pull --rebase` and avoiding accidental merge-bubble commits on local branches

Subtopics Covered (8):
  • `git pull --ff-only` vs `git pull --rebase`
  • Avoiding accidental merge-bubble commits on local branches
  • Production Edge-Case & Pitfall Guard (git pull)
โ†’ What Topic Is Next: Next Topic 8.22: git push
Guide โ†’

Publishing feature branches `git push -u origin feat/search`, branch protection rules, and `--force-with-lease` safety after local rebase

Subtopics Covered (8):
  • Publishing feature branches `git push -u origin feat/search`
  • Branch protection rules
  • `--force-with-lease` safety after local rebase
โ†’ What Topic Is Next: Next Topic 8.23: GitHub Repository Management
Guide โ†’

Branch protection on `main`, required status checks, Issue templates, Releases/tags (`v1.0.0`), and Dependabot security alerts

Subtopics Covered (8):
  • Branch protection on `main`
  • Required status checks
  • Issue templates
โ†’ What Topic Is Next: Next Topic 8.24: Pull Requests and Review Workflow
Guide โ†’

Draft vs Ready PRs, concise PR descriptions (Summary, Changes, Test Plan), linking Issues (`Closes #12`), and addressing review threads

Subtopics Covered (8):
  • Draft vs Ready PRs
  • Concise PR descriptions (Summary
  • Changes
โ†’ What Topic Is Next: Next Topic 8.25: Python .gitignore Best Practices
Guide โ†’

Excluding `__pycache__/`, `*.py[cod]`, `.venv/`, `.env`, `.pytest_cache/`, `.mypy_cache/`, `.ruff_cache/`, `*.log`, `*.sqlite3`, and un-tracking leaked files via `gi...

Subtopics Covered (8):
  • Excluding `__pycache__/`
  • `*.py[cod]`
  • `.venv/`
โ†’ What Topic Is Next: Next Topic 8.26: Technical Documentation with README.md
Guide โ†’

Writing recruiter- and engineer-ready `README.md`: architecture overview, tech stack, setup commands, `.env` table, sample CLI/API usage, and test commands

Subtopics Covered (8):
  • Writing recruiter-
  • Engineer-ready `README.md`: architecture overview
  • Tech stack
โ†’ What Topic Is Next: Next Topic 8.27: Feature Branching Strategy
Guide โ†’

GitHub Flow (short-lived feature branches -> PR -> CI -> `main`) vs GitFlow release branches and trunk-based delivery

Subtopics Covered (8):
  • GitHub Flow (short-lived feature branches -> PR -> CI -> `main`) vs GitFlow release branches
  • Trunk-based delivery
  • Production Edge-Case & Pitfall Guard (Feature Branching Strategy)
โ†’ What Topic Is Next: Next Topic 8.28: Reviewing Python Code in PRs
Guide โ†’

Checking SQL injection/secrets, mutable defaults, `N+1` queries, missing timeouts, bare `except:`, edge cases, and test coverage

Subtopics Covered (8):
  • Checking SQL injection/secrets
  • Mutable defaults
  • `N+1` queries
โ†’ What Topic Is Next: Next Topic 8.29: Agile Fundamentals (Sprints, Backlog, Task Tracking)
Guide โ†’

User stories, acceptance criteria, backlog refinement, 1โ€“2 week Sprints, Definition of Done (code + tests + docs + PR), and standups

Subtopics Covered (8):
  • User stories
  • Acceptance criteria
  • Backlog refinement
โ†’ What Topic Is Next: Module 8 Capstone (Project 2: Python Inventory Management System) โ†’ Next Topic 9.1: Database and DBMS Introduction

Build an advanced, type-annotated, OOP Python 3.12 Inventory Management System featuring O(1) SKU indexing, multi-criteria search/filtering, low-stock priority alerts, atomic file persistence, decorators/context managers, structured logging, unit-level package organization, and collaborative GitHub feature-branch PR history.

โ€ข Editable `pyproject.toml` package (`src/inventory_sys/` + `tests/`)
โ€ข Product & Stock Movement engine with O(1) SKU lookup, search/filtering, and `heapq` low-stock alerts
โ€ข Atomic JSON/JSONL persistence, generator CSV exporter, decorators, and structured logging
โ€ข GitHub repository with >= 4 merged feature-branch Pull Requests and clean `README.md`

Module Learning & Hands-On Objectives

โœ“ Set up PostgreSQL 16 locally, navigate `psql` and `pgAdmin`, and explain RDBMS vs SQLite vs MySQL vs NoSQL trade-offs.
โœ“ Author production `CREATE TABLE` DDL scripts using accurate numeric (`NUMERIC(12,2)`), text, `TIMESTAMPTZ`, boolean, and constraint rules.
โœ“ Perform safe `INSERT ... RETURNING`, `UPDATE`, and `DELETE` DML operations (never forgetting `WHERE`!).
โœ“ Write filtered, sorted, deduplicated, and paginated `SELECT` queries handling SQL 3-valued `NULL` logic (`IS NULL`) accurately.
โœ“ Build analytical summary reports using `COUNT`, `SUM`, `AVG`, `MIN`, `MAX`, `GROUP BY`, and `HAVING`.
Guide โ†’

Why flat JSON/CSV files fail under concurrent multi-user writes, durability, crash recovery, and DBMS responsibilities

Subtopics Covered (8):
  • Why flat JSON/CSV files fail under concurrent multi-user writes
  • Durability
  • Crash recovery
โ†’ What Topic Is Next: Next Topic 9.2: Relational Database Architecture (RDBMS)
Guide โ†’

Relations (tables), tuples (rows), attributes (columns), schemas, catalog metadata, client-server TCP protocol, and WAL durability

Subtopics Covered (8):
  • Relations (tables)
  • Tuples (rows)
  • Attributes (columns)
โ†’ What Topic Is Next: Next Topic 9.3: Relational vs NoSQL Databases (PostgreSQL, MySQL, SQLite)
Guide โ†’

PostgreSQL (primary production RDBMS), SQLite (embedded file DB for local/tests), MySQL fundamentals, vs document/key-value stores

Subtopics Covered (8):
  • PostgreSQL (primary production RDBMS)
  • SQLite (embedded file DB for local/tests)
  • MySQL fundamentals
โ†’ What Topic Is Next: Next Topic 9.4: PostgreSQL Installation and Configuration
Guide โ†’

Installing PostgreSQL 16 (native & Docker), roles/users, `postgresql.conf`, `pg_hba.conf`, port `5432`, and least-privilege app users

Subtopics Covered (8):
  • Installing PostgreSQL 16 (native & Docker)
  • Roles/users
  • `postgresql.conf`
โ†’ What Topic Is Next: Next Topic 9.5: Database Tools (psql and pgAdmin)
Guide โ†’

`psql` CLI meta-commands (`\l`, `\c`, `\dt`, `\d+ table`, `\timing`) and visual schema/explain inspection in `pgAdmin`

Subtopics Covered (8):
  • `psql` CLI meta-commands (`\l`
  • `\c`
  • `\dt`
โ†’ What Topic Is Next: Next Topic 9.6: CREATE DATABASE
Guide โ†’

`CREATE DATABASE ... ENCODING 'UTF8'`, `DROP DATABASE IF EXISTS`, and isolated `dev` / `test` / `prod` databases

Subtopics Covered (8):
  • `CREATE DATABASE ... ENCODING 'UTF8'`
  • `DROP DATABASE IF EXISTS`
  • Isolated `dev` / `test` / `prod` databases
โ†’ What Topic Is Next: Next Topic 9.7: CREATE TABLE
Guide โ†’

`CREATE TABLE IF NOT EXISTS`, `GENERATED ALWAYS AS IDENTITY` (modern SQL standard over legacy `SERIAL`), `ALTER TABLE`, `DROP TABLE`

Subtopics Covered (8):
  • `CREATE TABLE IF NOT EXISTS`
  • `GENERATED ALWAYS AS IDENTITY` (modern SQL standard over legacy `SERIAL`)
  • `ALTER TABLE`
โ†’ What Topic Is Next: Next Topic 9.8: SQL Data Types (Numeric, Character, Date/Time, Boolean, UUID)
Guide โ†’

`BIGINT`/`INTEGER`, exact `NUMERIC(12, 2)` vs `DOUBLE PRECISION`, `VARCHAR(n)`/`TEXT`, `DATE`/`TIMESTAMPTZ` (always timezone-aware!), `BOOLEAN`, `UUID`, `JSONB`

Subtopics Covered (8):
  • `BIGINT`/`INTEGER`
  • Exact `NUMERIC(12
  • 2)` vs `DOUBLE PRECISION`
โ†’ What Topic Is Next: Next Topic 9.9: Relational Constraints (PRIMARY KEY, FOREIGN KEY, UNIQUE)
Guide โ†’

Single & composite `PRIMARY KEY`, `FOREIGN KEY ... REFERENCES ... ON DELETE RESTRICT/CASCADE/SET NULL`, and `UNIQUE` indexes

Subtopics Covered (8):
  • Single & composite `PRIMARY KEY`
  • `FOREIGN KEY ... REFERENCES ... ON DELETE RESTRICT/CASCADE/SET NULL`
  • `UNIQUE` indexes
โ†’ What Topic Is Next: Next Topic 9.10: Domain Constraints (NOT NULL, CHECK, DEFAULT)
Guide โ†’

`NOT NULL` mandatory columns, `CHECK (salary >= 0 AND max_salary >= min_salary)` domain invariants, and server-side `DEFAULT` values

Subtopics Covered (8):
  • `NOT NULL` mandatory columns
  • `CHECK (salary >= 0
  • Max_salary >= min_salary)` domain invariants
โ†’ What Topic Is Next: Next Topic 9.11: INSERT Statements
Guide โ†’

Single-row and multi-row batch `INSERT INTO ... VALUES`, PostgreSQL `RETURNING id`, and idempotent `ON CONFLICT DO NOTHING / DO UPDATE` upserts

Subtopics Covered (8):
  • Single-row
  • Multi-row batch `INSERT INTO ... VALUES`
  • PostgreSQL `RETURNING id`
โ†’ What Topic Is Next: Next Topic 9.12: SELECT Queries
Guide โ†’

Explicit column projection `SELECT id, emp_code, email` vs `SELECT *`, computed expressions, `CASE WHEN ... END`, and `COALESCE()`

Subtopics Covered (8):
  • Explicit column projection `SELECT id
  • Emp_code
  • Email` vs `SELECT *`
โ†’ What Topic Is Next: Next Topic 9.13: WHERE Filtering
Guide โ†’

Comparison predicates (`=`, `<>`, `<`, `<=`, `>`, `>=`), 3-valued `NULL` logic (`IS NULL` / `IS NOT NULL`), and sargable index-friendly predicates

Subtopics Covered (8):
  • Comparison predicates (`=`
  • `<>`
  • `<`
โ†’ What Topic Is Next: Next Topic 9.14: DISTINCT Deduplication
Guide โ†’

`SELECT DISTINCT col1, col2` and PostgreSQL `SELECT DISTINCT ON (department_id) ... ORDER BY ...` latest-per-group idiom

Subtopics Covered (8):
  • `SELECT DISTINCT col1
  • Col2`
  • PostgreSQL `SELECT DISTINCT ON (department_id) ... ORDER BY ...` latest-per-group idiom
โ†’ What Topic Is Next: Next Topic 9.15: ORDER BY Sorting
Guide โ†’

Multi-column `ASC`/`DESC` sorting, `NULLS LAST` / `NULLS FIRST`, and deterministic tie-breaker `ORDER BY created_at DESC, id DESC`

Subtopics Covered (8):
  • Multi-column `ASC`/`DESC` sorting
  • `NULLS LAST` / `NULLS FIRST`
  • Deterministic tie-breaker `ORDER BY created_at DESC
โ†’ What Topic Is Next: Next Topic 9.16: LIMIT and OFFSET Pagination
Guide โ†’

Offset pagination (`LIMIT 20 OFFSET 40`) vs Keyset/Cursor pagination (`WHERE (created_at, id) < (...) LIMIT 20`) at deep pages

Subtopics Covered (8):
  • Offset pagination (`LIMIT 20 OFFSET 40`) vs Keyset/Cursor pagination (`WHERE (created_at
  • Id) < (...) LIMIT 20`) at deep pages
  • Production Edge-Case & Pitfall Guard (LIMIT and OFFSET Pagination)
โ†’ What Topic Is Next: Next Topic 9.17: UPDATE Statements
Guide โ†’

Targeted `UPDATE ... SET ... WHERE ... RETURNING *`, atomic in-place increments `SET stock = stock - 1 WHERE id = $1 AND stock >= 1`

Subtopics Covered (8):
  • Targeted `UPDATE ... SET ... WHERE ... RETURNING *`
  • Atomic in-place increments `SET stock = stock - 1 WHERE id = $1
  • Stock >= 1`
โ†’ What Topic Is Next: Next Topic 9.18: DELETE Statements
Guide โ†’

Guarded `DELETE FROM ... WHERE ... RETURNING id`, `TRUNCATE` vs `DELETE`, and soft-delete (`deleted_at TIMESTAMPTZ`) audit patterns

Subtopics Covered (8):
  • Guarded `DELETE FROM ... WHERE ... RETURNING id`
  • `TRUNCATE` vs `DELETE`
  • Soft-delete (`deleted_at TIMESTAMPTZ`) audit patterns
โ†’ What Topic Is Next: Next Topic 9.19: Logical Operators (AND, OR, NOT, IN)
Guide โ†’

`AND` binds tighter than `OR` (always parenthesize `OR`!), `IN (...)`, and `NOT EXISTS` vs `NOT IN` null safety

Subtopics Covered (8):
  • ` binds tighter than `OR` (always parenthesize `OR`!)
  • `IN (...)`
  • `NOT EXISTS` vs `NOT IN` null safety
โ†’ What Topic Is Next: Next Topic 9.20: BETWEEN Range Filtering
Guide โ†’

Inclusive `BETWEEN low AND high` (`col >= low AND col <= high`) vs half-open `[start, next_day)` timestamp ranges

Subtopics Covered (8):
  • Inclusive `BETWEEN low
  • High` (`col >= low
  • Col <= high`) vs half-open `[start
โ†’ What Topic Is Next: Next Topic 9.21: LIKE and ILIKE Pattern Matching
Guide โ†’

`%` (0+ chars) and `_` (1 char) wildcards, PostgreSQL case-insensitive `ILIKE`, escaping literal `%`/`_`, and why leading `'%python%'` skips standard B-Tree indexes

Subtopics Covered (8):
  • `%` (0+ chars)
  • `_` (1 char) wildcards
  • PostgreSQL case-insensitive `ILIKE`
โ†’ What Topic Is Next: Next Topic 9.22: Aggregate Functions (COUNT, SUM, AVG, MIN, MAX)
Guide โ†’

`COUNT(*)` (all rows) vs `COUNT(col)` (non-null only!) vs `COUNT(DISTINCT col)`, `SUM`, `AVG`, `MIN`, `MAX`, and PostgreSQL `FILTER (WHERE ...)`

Subtopics Covered (8):
  • `COUNT(*)` (all rows) vs `COUNT(col)` (non-null only!) vs `COUNT(DISTINCT col)`
  • `SUM`
  • `AVG`
โ†’ What Topic Is Next: Next Topic 9.23: GROUP BY Aggregation
Guide โ†’

Grouping by one or multiple columns/expressions and the SQL functional-dependency rule (every non-aggregated `SELECT` column must be grouped)

Subtopics Covered (8):
  • Grouping by one or multiple columns/expressions
  • The SQL functional-dependency rule (every non-aggregated `SELECT` column must be grouped)
  • Production Edge-Case & Pitfall Guard (GROUP BY Aggregation)
โ†’ What Topic Is Next: Next Topic 9.24: HAVING Group Filtering
Guide โ†’

SQL logical execution order (`FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> DISTINCT -> ORDER BY -> LIMIT`) and filtering aggregated groups with `HAVING`

Subtopics Covered (8):
  • SQL logical execution order (`FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> DISTINCT -> ORDER BY -> LIMIT`)
  • Filtering aggregated groups with `HAVING`
  • Production Edge-Case & Pitfall Guard (HAVING Group Filtering)
โ†’ What Topic Is Next: Next Topic 9.25: Column and Table Aliases
Guide โ†’

Readable column aliases (`AS monthly_ctc`) and concise table aliases (`employees AS e`, `departments AS d`) across joins and subqueries

Subtopics Covered (8):
  • Readable column aliases (`AS monthly_ctc`)
  • Concise table aliases (`employees AS e`
  • `departments AS d`) across joins
โ†’ What Topic Is Next: Module 9 Capstone (Week 9 Lab Build: PostgreSQL HR & Recruitment DDL + 35-Query Pack) โ†’ Next Topic 10.1: INNER JOIN

Design constrained PostgreSQL 16 tables (`departments`, `employees`, `job_postings`, `job_applications`) with `IDENTITY` PKs, FKs, `UNIQUE`, `CHECK` constraints, and 35 analytical queries (`WHERE`, `ILIKE`, `LIMIT/OFFSET`, `GROUP BY`, `HAVING`, `FILTER`).

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Combine multi-table datasets accurately using `INNER`, `LEFT`, `FULL OUTER`, and `SELF` joins without unintended row multiplication or `LEFT JOIN` `WHERE` traps.
โœ“ Solve Top-N per department, running totals, month-over-month deltas, and org-chart hierarchies using CTEs, Recursive CTEs, and Window Functions.
โœ“ Design 3NF normalized ER schemas (`1:1`, `1:N`, `M:N` junction tables) and tune slow queries with composite B-Tree indexes and `EXPLAIN ANALYZE`.
โœ“ Guarantee data consistency under concurrency using ACID transactions, isolation levels, `SELECT ... FOR UPDATE` row locks, and deadlock prevention.
โœ“ Understand views, materialized views, stored procedures, triggers, and PostgreSQL `pg_dump`/`pg_restore` backup operations.
Guide โ†’

Equi-joins across 2+ tables (`JOIN ... ON e.department_id = d.id`) returning rows with matching keys in both tables

Subtopics Covered (8):
  • Equi-joins across 2+ tables (`JOIN ... ON e.department_id = d.id`) returning rows with matching keys in both tables
  • Production Edge-Case & Pitfall Guard (INNER JOIN)
  • Hands-On Python Implementation & Verification (INNER JOIN)
โ†’ What Topic Is Next: Next Topic 10.2: LEFT JOIN
Guide โ†’

Preserving all left-table rows (`NULL`-extending unmatched right columns), anti-join `WHERE r.id IS NULL`, and `ON` vs `WHERE` filter placement

Subtopics Covered (8):
  • Preserving all left-table rows (`NULL`-extending unmatched right columns)
  • Anti-join `WHERE r.id IS NULL`
  • `ON` vs `WHERE` filter placement
โ†’ What Topic Is Next: Next Topic 10.3: RIGHT JOIN
Guide โ†’

`RIGHT OUTER JOIN` mechanics and why rewriting `A RIGHT JOIN B` as `B LEFT JOIN A` improves query readability

Subtopics Covered (8):
  • `RIGHT OUTER JOIN` mechanics
  • Why rewriting `A RIGHT JOIN B` as `B LEFT JOIN A` improves query readability
  • Production Edge-Case & Pitfall Guard (RIGHT JOIN)
โ†’ What Topic Is Next: Next Topic 10.4: FULL OUTER JOIN
Guide โ†’

Preserving unmatched rows from BOTH sides (`FULL OUTER JOIN`) with `COALESCE(a.key, b.key)` for financial reconciliation

Subtopics Covered (8):
  • Preserving unmatched rows from BOTH sides (`FULL OUTER JOIN`) with `COALESCE(a.key
  • B.key)` for financial reconciliation
  • Production Edge-Case & Pitfall Guard (FULL OUTER JOIN)
โ†’ What Topic Is Next: Next Topic 10.5: CROSS JOIN
Guide โ†’

Intentional `M x N` Cartesian product (`CROSS JOIN` + `generate_series`) for date-spine matrix reports vs accidental runaway joins

Subtopics Covered (8):
  • Intentional `M x N` Cartesian product (`CROSS JOIN` + `generate_series`) for date-spine matrix reports vs accidental runaway joins
  • Production Edge-Case & Pitfall Guard (CROSS JOIN)
  • Hands-On Python Implementation & Verification (CROSS JOIN)
โ†’ What Topic Is Next: Next Topic 10.6: SELF JOIN
Guide โ†’

Joining a table to itself using mandatory distinct aliases (`employees AS emp LEFT JOIN employees AS mgr ON mgr.id = emp.manager_id`)

Subtopics Covered (8):
  • Joining a table to itself using mandatory distinct aliases (`employees AS emp LEFT JOIN employees AS mgr ON mgr.id = emp.manager_id`)
  • Production Edge-Case & Pitfall Guard (SELF JOIN)
  • Hands-On Python Implementation & Verification (SELF JOIN)
โ†’ What Topic Is Next: Next Topic 10.7: Single-Row and Multi-Row Subqueries
Guide โ†’

Scalar subqueries (`= (SELECT AVG(salary) ...)`), multi-row `IN` / `ANY` / `ALL`, and derived inline tables in `FROM`

Subtopics Covered (8):
  • Scalar subqueries (`= (SELECT AVG(salary) ...)`)
  • Multi-row `IN` / `ANY` / `ALL`
  • Derived inline tables in `FROM`
โ†’ What Topic Is Next: Next Topic 10.8: Correlated Subqueries
Guide โ†’

Inner subqueries referencing outer-row columns (`EXISTS (SELECT 1 FROM job_applications a WHERE a.job_id = j.id)`) and semi-join optimization

Subtopics Covered (8):
  • Inner subqueries referencing outer-row columns (`EXISTS (SELECT 1 FROM job_applications a WHERE a.job_id = j.id)`)
  • Semi-join optimization
  • Production Edge-Case & Pitfall Guard (Correlated Subqueries)
โ†’ What Topic Is Next: Next Topic 10.9: Common Table Expressions (CTE)
Guide โ†’

`WITH cte_name AS (...)` modular named sub-queries for readable multi-stage analytical pipelines and data-modifying CTEs

Subtopics Covered (8):
  • `WITH cte_name AS (...)` modular named sub-queries for readable multi-stage analytical pipelines
  • Data-modifying CTEs
  • Production Edge-Case & Pitfall Guard (Common Table Expressions (CTE))
โ†’ What Topic Is Next: Next Topic 10.10: Recursive CTEs for Hierarchical Data
Guide โ†’

`WITH RECURSIVE` anchor member + `UNION ALL` recursive member + depth guard for org charts and nested category trees

Subtopics Covered (8):
  • `WITH RECURSIVE` anchor member + `UNION ALL` recursive member + depth guard for org charts
  • Nested category trees
  • Production Edge-Case & Pitfall Guard (Recursive CTEs for Hierarchical Data)
โ†’ What Topic Is Next: Next Topic 10.11: Window Functions (OVER and PARTITION BY)
Guide โ†’

Computing per-partition metrics via `AVG(salary) OVER (PARTITION BY department_id)` WITHOUT collapsing detail rows like `GROUP BY`

Subtopics Covered (8):
  • Computing per-partition metrics via `AVG(salary) OVER (PARTITION BY department_id)` WITHOUT collapsing detail rows like `GROUP BY`
  • Production Edge-Case & Pitfall Guard (Window Functions (OVER and PARTITION BY))
  • Hands-On Python Implementation & Verification (Window Functions (OVER and PARTITION BY))
โ†’ What Topic Is Next: Next Topic 10.12: Ranking Window Functions (ROW_NUMBER, RANK, DENSE_RANK)
Guide โ†’

Exact tie differences: `ROW_NUMBER()` (`1,2,3,4`), `RANK()` (`1,2,2,4` gap), `DENSE_RANK()` (`1,2,2,3` no gap), and Top-N per group

Subtopics Covered (8):
  • Exact tie differences: `ROW_NUMBER()` (`1
  • 4`)
  • `RANK()` (`1
โ†’ What Topic Is Next: Next Topic 10.13: Analytical Window Functions (LAG, LEAD, Running Totals)
Guide โ†’

`LAG(col, 1, 0) OVER (...)`, `LEAD()`, cumulative running totals `SUM(amt) OVER (ORDER BY dt ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)`

Subtopics Covered (8):
  • `LAG(col
  • 0) OVER (...)`
  • `LEAD()`
โ†’ What Topic Is Next: Next Topic 10.14: Database Views
Guide โ†’

`CREATE OR REPLACE VIEW` stored virtual queries for reusable joins, column masking, and stable reporting contracts

Subtopics Covered (8):
  • `CREATE OR REPLACE VIEW` stored virtual queries for reusable joins
  • Column masking
  • Stable reporting contracts
โ†’ What Topic Is Next: Next Topic 10.15: Materialized Views
Guide โ†’

`CREATE MATERIALIZED VIEW`, physical precomputed storage, indexing materialized views, and `REFRESH MATERIALIZED VIEW CONCURRENTLY`

Subtopics Covered (8):
  • `CREATE MATERIALIZED VIEW`
  • Physical precomputed storage
  • Indexing materialized views
โ†’ What Topic Is Next: Next Topic 10.16: B-Tree Indexes and Query Performance
Guide โ†’

B-Tree balanced tree `O(log N)` lookups vs `O(N)` `Seq Scan`, indexing foreign keys, partial indexes (`WHERE is_active = TRUE`), and write overhead

Subtopics Covered (8):
  • B-Tree balanced tree `O(log N)` lookups vs `O(N)` `Seq Scan`
  • Indexing foreign keys
  • Partial indexes (`WHERE is_active = TRUE`)
โ†’ What Topic Is Next: Next Topic 10.17: Composite Multi-Column Indexes
Guide โ†’

Leftmost-prefix rule `(a, b, c)`, equality columns BEFORE range/sort columns (`(status, city, created_at DESC)`), and Index-Only Scans (`INCLUDE`)

Subtopics Covered (8):
  • Leftmost-prefix rule `(a
  • C)`
  • Equality columns BEFORE range/sort columns (`(status
โ†’ What Topic Is Next: Next Topic 10.18: Query Execution Plans (EXPLAIN and EXPLAIN ANALYZE)
Guide โ†’

Reading `EXPLAIN (ANALYZE, BUFFERS)` bottom-up: `Seq Scan`, `Index Scan`, `Index Only Scan`, `Bitmap Heap Scan`, `Hash Join`, `Nested Loop`, and estimated vs actual...

Subtopics Covered (8):
  • Reading `EXPLAIN (ANALYZE
  • BUFFERS)` bottom-up: `Seq Scan`
  • `Index Scan`
โ†’ What Topic Is Next: Next Topic 10.19: SQL Transactions (BEGIN, COMMIT, ROLLBACK)
Guide โ†’

All-or-nothing multi-statement units (`BEGIN`, `COMMIT`, `ROLLBACK`, `SAVEPOINT`), auto-commit pitfalls, and keeping transactions short

Subtopics Covered (8):
  • All-or-nothing multi-statement units (`BEGIN`
  • `COMMIT`
  • `ROLLBACK`
โ†’ What Topic Is Next: Next Topic 10.20: ACID Properties
Guide โ†’

Atomicity (undo/rollback), Consistency (constraints/invariants), Isolation (MVCC snapshots), and Durability (WAL fsync on disk)

Subtopics Covered (8):
  • Atomicity (undo/rollback)
  • Consistency (constraints/invariants)
  • Isolation (MVCC snapshots)
โ†’ What Topic Is Next: Next Topic 10.21: Transaction Isolation Levels
Guide โ†’

Dirty Read, Non-Repeatable Read, Phantom Read, Write Skew anomalies across `READ COMMITTED` (PostgreSQL default), `REPEATABLE READ`, and `SERIALIZABLE`

Subtopics Covered (8):
  • Dirty Read
  • Non-Repeatable Read
  • Phantom Read
โ†’ What Topic Is Next: Next Topic 10.22: Row-Level and Table-Level Locking
Guide โ†’

Pessimistic `SELECT ... FOR UPDATE` / `FOR UPDATE SKIP LOCKED` row locks vs optimistic `version` counter checks (`WHERE id = $1 AND version = $2`)

Subtopics Covered (8):
  • Pessimistic `SELECT ... FOR UPDATE` / `FOR UPDATE SKIP LOCKED` row locks vs optimistic `version` counter checks (`WHERE id = $1
  • Version = $2`)
  • Production Edge-Case & Pitfall Guard (Row-Level and Table-Level Locking)
โ†’ What Topic Is Next: Next Topic 10.23: Database Deadlock Fundamentals
Guide โ†’

Why two concurrent transactions updating rows `(1, 2)` vs `(2, 1)` deadlock, PostgreSQL deadlock detector (`deadlock_timeout`), and canonical ID sorting

Subtopics Covered (8):
  • Why two concurrent transactions updating rows `(1
  • 2)` vs `(2
  • 1)` deadlock
โ†’ What Topic Is Next: Next Topic 10.24: Database Normalization (1NF, 2NF, 3NF)
Guide โ†’

1NF (atomic columns, no comma-separated `"Python,SQL"` lists!), 2NF (no partial composite-key dependency), 3NF (no transitive non-key dependency), and controlled den...

Subtopics Covered (8):
  • 1NF (atomic columns
  • No comma-separated `"Python
  • SQL"` lists!)
โ†’ What Topic Is Next: Next Topic 10.25: Entity Relationships (One-to-One, One-to-Many, Many-to-Many)
Guide โ†’

1:1 (`UNIQUE` FK on `candidate_profiles.user_id`), 1:N (`employees.department_id`), and M:N junction tables (`candidate_skills(candidate_id, skill_id)` composite PK)

Subtopics Covered (8):
  • 1:1 (`UNIQUE` FK on `candidate_profiles.user_id`)
  • 1:N (`employees.department_id`)
  • M:N junction tables (`candidate_skills(candidate_id
โ†’ What Topic Is Next: Next Topic 10.26: ER Diagrams and Schema Design
Guide โ†’

Crowโ€™s Foot cardinality notation (`||--o{`, `}o--o{`), associative entities carrying metadata (`applied_at`, `status`), and audit columns

Subtopics Covered (8):
  • Crowโ€™s Foot cardinality notation (`||--o{`
  • `}o--o{`)
  • Associative entities carrying metadata (`applied_at`
โ†’ What Topic Is Next: Next Topic 10.27: Referential Integrity and Cascading Rules
Guide โ†’

Choosing deliberately between `ON DELETE RESTRICT` (financial/orders), `ON DELETE CASCADE` (owned child items), and `ON DELETE SET NULL` (optional manager)

Subtopics Covered (8):
  • Choosing deliberately between `ON DELETE RESTRICT` (financial/orders)
  • `ON DELETE CASCADE` (owned child items)
  • `ON DELETE SET NULL` (optional manager)
โ†’ What Topic Is Next: Next Topic 10.28: Stored Procedures and Functions Fundamentals
Guide โ†’

PL/pgSQL `CREATE FUNCTION` vs `CREATE PROCEDURE`, when DB routines help vs why business logic primarily lives in versioned Python services

Subtopics Covered (8):
  • PL/pgSQL `CREATE FUNCTION` vs `CREATE PROCEDURE`
  • When DB routines help vs why business logic primarily lives in versioned Python services
  • Production Edge-Case & Pitfall Guard (Stored Procedures and Functions Fundamentals)
โ†’ What Topic Is Next: Next Topic 10.29: Database Triggers Fundamentals
Guide โ†’

`BEFORE UPDATE` / `AFTER INSERT` row-level triggers (`NEW`, `OLD`) for automatic `updated_at` stamps and immutable audit trails

Subtopics Covered (8):
  • `BEFORE UPDATE` / `AFTER INSERT` row-level triggers (`NEW`
  • `OLD`) for automatic `updated_at` stamps
  • Immutable audit trails
โ†’ What Topic Is Next: Next Topic 10.30: PostgreSQL Backup and Restore (pg_dump and pg_restore)
Guide โ†’

Logical backups via `pg_dump -Fc` custom compressed format, `pg_restore`, point-in-time WAL concepts, and verifying restores regularly

Subtopics Covered (8):
  • Logical backups via `pg_dump -Fc` custom compressed format
  • `pg_restore`
  • Point-in-time WAL concepts
โ†’ What Topic Is Next: Module 10 Capstone (Week 10 Lab Build: 3NF ER Schema, EXPLAIN ANALYZE Index Tuning & Window SQL) โ†’ Next Topic 11.1: Python Database Drivers (DB-API 2.0)

Normalize an unnormalized HR/Job dataset into 3NF, draw Crowโ€™s Foot ER diagrams, prove composite B-Tree index speedups on 50k rows with `EXPLAIN (ANALYZE, BUFFERS)`, and author `DENSE_RANK`, `LAG`, and `WITH RECURSIVE` org-tree queries.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Connect Python directly to PostgreSQL via `psycopg` 3 using context managers, connection pools, and 100% parameterized queries.
โœ“ Understand SQLAlchemy 2.0 architecture distinguishing Core Expression Language from typed `Mapped[...]` Declarative ORM models.
โœ“ Manage `Engine` pools and Unit-of-Work `Session` lifecycles cleanly without leaking connections or detached-instance bugs.
โœ“ Detect and eliminate ORM `N+1` query storms using `joinedload()` (to-one) and `selectinload()` (to-many) eager loading.
โœ“ Version-control database schema evolution safely with `Alembic` (`revision --autogenerate`, `upgrade head`, `downgrade -1`) and isolated DB tests.
Guide โ†’

PEP 249 DB-API 2.0 standard (`connect`, `cursor`, `execute`, `commit`, `rollback`), `sqlite3` built-in vs `psycopg` 3 vs `asyncpg`

Subtopics Covered (8):
  • PEP 249 DB-API 2.0 standard (`connect`
  • `cursor`
  • `execute`
โ†’ What Topic Is Next: Next Topic 11.2: PostgreSQL Connectivity with psycopg 3
Guide โ†’

`psycopg.connect(conninfo)`, `dict_row` row factories returning typed dicts instead of positional tuples, and environment DSN loading

Subtopics Covered (8):
  • `psycopg.connect(conninfo)`
  • `dict_row` row factories returning typed dicts instead of positional tuples
  • Environment DSN loading
โ†’ What Topic Is Next: Next Topic 11.3: Database Connection Lifecycle Management
Guide โ†’

TCP + TLS + PostgreSQL backend process cost per connection, `connect_timeout`, idle-in-transaction timeouts, and clean `close()`

Subtopics Covered (8):
  • TCP + TLS + PostgreSQL backend process cost per connection
  • `connect_timeout`
  • Idle-in-transaction timeouts
โ†’ What Topic Is Next: Next Topic 11.4: Cursors and Executing SQL Statements
Guide โ†’

`with conn.cursor() as cur:`, `cur.execute()`, `executemany()`, `fetchone()`, `fetchall()`, `fetchmany(size)`, and server-side cursors

Subtopics Covered (8):
  • `with conn.cursor() as cur:`
  • `cur.execute()`
  • `executemany()`
โ†’ What Topic Is Next: Next Topic 11.5: CRUD Operations Using Raw Python
Guide โ†’

Implementing clean repository `create`, `get_by_id`, `list_paginated`, `update`, and `delete` methods over DB-API cursors

Subtopics Covered (8):
  • Implementing clean repository `create`
  • `get_by_id`
  • `list_paginated`
โ†’ What Topic Is Next: Next Topic 11.6: Parameterized Queries and SQL Injection Prevention
Guide โ†’

Driver parameter binding (`%s` / `%(name)s` in `psycopg`, `?` in `sqlite3`) keeping SQL AST separate from untrusted user data

Subtopics Covered (8):
  • Driver parameter binding (`%s` / `%(name)s` in `psycopg`
  • `?` in `sqlite3`) keeping SQL AST separate from untrusted user data
  • Production Edge-Case & Pitfall Guard (Parameterized Queries and SQL Injection Prevention)
โ†’ What Topic Is Next: Next Topic 11.7: Explicit Transaction Commit and Rollback
Guide โ†’

Grouping multi-table mutations inside `with conn.transaction():` so exceptions automatically `ROLLBACK` all partial writes

Subtopics Covered (8):
  • Grouping multi-table mutations inside `with conn.transaction():` so exceptions automatically `ROLLBACK` all partial writes
  • Production Edge-Case & Pitfall Guard (Explicit Transaction Commit and Rollback)
  • Hands-On Python Implementation & Verification (Explicit Transaction Commit and Rollback)
โ†’ What Topic Is Next: Next Topic 11.8: Database Connection Pooling
Guide โ†’

`psycopg_pool.ConnectionPool` and SQLAlchemy `QueuePool` (`pool_size`, `max_overflow`, `pool_pre_ping=True`, `pool_recycle`)

Subtopics Covered (8):
  • `psycopg_pool.ConnectionPool`
  • SQLAlchemy `QueuePool` (`pool_size`
  • `max_overflow`
โ†’ What Topic Is Next: Next Topic 11.9: Context Managers for Database Resources
Guide โ†’

Nested `with pool.connection() as conn:` and `with Session(engine) as session:` guaranteeing connection return to pool on exit

Subtopics Covered (8):
  • Nested `with pool.connection() as conn:`
  • `with Session(engine) as session:` guaranteeing connection return to pool on exit
  • Production Edge-Case & Pitfall Guard (Context Managers for Database Resources)
โ†’ What Topic Is Next: Next Topic 11.10: SQLAlchemy 2.0 Introduction and Architecture
Guide โ†’

Unified SQLAlchemy 2.0 architecture: Dialect + Pool -> Core SQL Expression Language -> ORM Unit of Work & Identity Map

Subtopics Covered (8):
  • Unified SQLAlchemy 2.0 architecture: Dialect + Pool -> Core SQL Expression Language -> ORM Unit of Work & Identity Map
  • Production Edge-Case & Pitfall Guard (SQLAlchemy 2.0 Introduction and Architecture)
  • Hands-On Python Implementation & Verification (SQLAlchemy 2.0 Introduction and Architecture)
โ†’ What Topic Is Next: Next Topic 11.11: SQLAlchemy Core (SQL Expression Language)
Guide โ†’

`MetaData`, `Table`, composable Pythonic `select()`, `insert()`, `update()`, `join()`, and `func.count()` without ORM object overhead

Subtopics Covered (8):
  • `MetaData`
  • `Table`
  • Composable Pythonic `select()`
โ†’ What Topic Is Next: Next Topic 11.12: SQLAlchemy ORM Concepts
Guide โ†’

Data Mapper pattern (unlike Active Record), Identity Map (`1` Python instance per PK per `Session`), dirty tracking, and `flush()` vs `commit()`

Subtopics Covered (8):
  • Data Mapper pattern (unlike Active Record)
  • Identity Map (`1` Python instance per PK per `Session`)
  • Dirty tracking
โ†’ What Topic Is Next: Next Topic 11.13: Database Engine Configuration (create_engine)
Guide โ†’

`create_engine(DATABASE_URL, pool_pre_ping=True, pool_size=10, echo=False)` โ€” creating ONE module-singleton `Engine` per process

Subtopics Covered (8):
  • `create_engine(DATABASE_URL
  • Pool_pre_ping=True
  • Pool_size=10
โ†’ What Topic Is Next: Next Topic 11.14: ORM Session Lifecycle (Session and sessionmaker)
Guide โ†’

`SessionLocal = sessionmaker(bind=engine, autoflush=False, expire_on_commit=False)`, one `Session` per request/task (NEVER shared across threads!)

Subtopics Covered (8):
  • `SessionLocal = sessionmaker(bind=engine
  • Autoflush=False
  • Expire_on_commit=False)`
โ†’ What Topic Is Next: Next Topic 11.15: Declarative Models (DeclarativeBase and Mapped)
Guide โ†’

`class Base(DeclarativeBase): pass`, `__tablename__`, `Mapped[int] = mapped_column(primary_key=True)`, `Mapped[str | None]`, `String(120)`, `Numeric(12, 2)`

Subtopics Covered (8):
  • `class Base(DeclarativeBase): pass`
  • `__tablename__`
  • `Mapped[int] = mapped_column(primary_key=True)`
โ†’ What Topic Is Next: Next Topic 11.16: ORM Relationships (relationship and ForeignKey)
Guide โ†’

`ForeignKey("departments.id")`, bidirectional `relationship(back_populates=...)`, `1:1` (`uselist=False`), `1:N`, `M:N` `secondary` table, and `cascade="all, delete-...

Subtopics Covered (8):
  • `ForeignKey("departments.id")`
  • Bidirectional `relationship(back_populates=...)`
  • `1:1` (`uselist=False`)
โ†’ What Topic Is Next: Next Topic 11.17: Querying with select(), where() and scalars()
Guide โ†’

`session.scalars(select(Employee).where(...).order_by(...)).all()`, `.scalar_one_or_none()`, `session.get(Employee, pk)`, and `func.count()`

Subtopics Covered (8):
  • `session.scalars(select(Employee).where(...).order_by(...)).all()`
  • `.scalar_one_or_none()`
  • `session.get(Employee
โ†’ What Topic Is Next: Next Topic 11.18: Lazy Loading Mechanics
Guide โ†’

How default `lazy="select"` fires an extra SQL query on attribute access `emp.department.name`, and `DetachedInstanceError` outside session scope (plus `MissingGreen...

Subtopics Covered (8):
  • How default `lazy="select"` fires an extra SQL query on attribute access `emp.department.name`
  • `DetachedInstanceError` outside session scope (plus `MissingGreenlet` in async!)
  • Production Edge-Case & Pitfall Guard (Lazy Loading Mechanics)
โ†’ What Topic Is Next: Next Topic 11.19: Eager Loading (joinedload and selectinload)
Guide โ†’

`options(joinedload(Employee.department))` (`LEFT OUTER JOIN` for many-to-one/1:1) vs `options(selectinload(Department.employees))` (`WHERE id IN (...)` for 1:N/M:N)

Subtopics Covered (8):
  • `options(joinedload(Employee.department))` (`LEFT OUTER JOIN` for many-to-one/1:1) vs `options(selectinload(Department.employees))` (`WHERE id IN (...)` for 1:N/M:N)
  • Production Edge-Case & Pitfall Guard (Eager Loading (joinedload and selectinload))
  • Hands-On Python Implementation & Verification (Eager Loading (joinedload and selectinload))
โ†’ What Topic Is Next: Next Topic 11.20: Identifying and Fixing the N+1 Query Problem
Guide โ†’

Spotting `1` list query + `N` per-row loop queries (`101` SQL roundtrips for `100` items!) via SQL logging/event counters and fixing down to `1โ€“2` queries

Subtopics Covered (8):
  • Spotting `1` list query + `N` per-row loop queries (`101` SQL roundtrips for `100` items!) via SQL logging/event counters
  • Fixing down to `1โ€“2` queries
  • Production Edge-Case & Pitfall Guard (Identifying and Fixing the N+1 Query Problem)
โ†’ What Topic Is Next: Next Topic 11.21: Alembic Database Migrations Fundamentals
Guide โ†’

`alembic init`, configuring `env.py` (`target_metadata = Base.metadata` + `DATABASE_URL` from env), `alembic.ini`, and `alembic_version` tracking table

Subtopics Covered (8):
  • `alembic init`
  • Configuring `env.py` (`target_metadata = Base.metadata` + `DATABASE_URL` from env)
  • `alembic.ini`
โ†’ What Topic Is Next: Next Topic 11.22: Evolving Models and Autogenerating Schema Migrations
Guide โ†’

`alembic revision --autogenerate -m "add_employee_phone"`, ALWAYS reviewing autogenerated `upgrade()`/`downgrade()` scripts, and safe nullable -> backfill -> `NOT NU...

Subtopics Covered (8):
  • `alembic revision --autogenerate -m "add_employee_phone"`
  • ALWAYS reviewing autogenerated `upgrade()`/`downgrade()` scripts
  • Safe nullable -> backfill -> `NOT NULL` rollouts
โ†’ What Topic Is Next: Next Topic 11.23: Testing Database Repositories in Python
Guide โ†’

Nested SAVEPOINT transaction rollback fixtures per test (`session.begin_nested()`), factory helpers, and testing real constraint/integrity errors

Subtopics Covered (8):
  • Nested SAVEPOINT transaction rollback fixtures per test (`session.begin_nested()`)
  • Factory helpers
  • Testing real constraint/integrity errors
โ†’ What Topic Is Next: Module 11 Capstone (Week 11 Lab Build: Pooled psycopg 3 & SQLAlchemy 2.0 + Alembic Repository) โ†’ Next Topic 12.1: NoSQL Introduction (Relational vs Document Databases)

Build parameterized `psycopg` 3 DAOs and modern SQLAlchemy 2.0 `Mapped[...]` repositories eliminating N+1 queries with `joinedload`/`selectinload` and managing schema versions cleanly via `Alembic`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Explain MongoDB document/collection architecture, BSON types (`ObjectId`, `ISODate`, `Decimal128`), and NoSQL vs PostgreSQL trade-offs.
โœ“ Perform MongoDB CRUD, comparison/logical filtering, field projection, sorting, pagination, and compound indexing.
โœ“ Build multi-stage Aggregation Pipelines (`$match`, `$group`, `$project`, `$sort`, `$lookup`) for analytical summaries.
โœ“ Connect synchronous Python apps via `PyMongo` and understand asynchronous `Motor` integration for FastAPI.
โœ“ Deliver Major Project 3: a complete Database-Driven Employee Management Backend in Python + PostgreSQL + SQLAlchemy 2.0 + Alembic.
Guide โ†’

Document, Key-Value (Redis), Wide-Column, and Graph NoSQL families vs relational PostgreSQL tables & PostgreSQL `JSONB`

Subtopics Covered (8):
  • Document
  • Key-Value (Redis)
  • Wide-Column
โ†’ What Topic Is Next: Next Topic 12.2: MongoDB Architecture (Databases, Collections, Documents)
Guide โ†’

Databases -> Collections -> JSON-like Documents, Replica Sets (high availability), and Sharding (horizontal partition keys) overview

Subtopics Covered (8):
  • Databases -> Collections -> JSON-like Documents
  • Replica Sets (high availability)
  • Sharding (horizontal partition keys) overview
โ†’ What Topic Is Next: Next Topic 12.3: BSON Document Storage Format
Guide โ†’

Binary JSON (`BSON`), 12-byte `ObjectId` (timestamp + random + counter), `Date`, `Decimal128` for money, and the `16 MB` max document size limit

Subtopics Covered (8):
  • Binary JSON (`BSON`)
  • 12-byte `ObjectId` (timestamp + random + counter)
  • `Date`
โ†’ What Topic Is Next: Next Topic 12.4: Database and Collection Operations
Guide โ†’

Lazy database/collection creation on first write, explicit `create_collection` with `$jsonSchema` validator rules, and `drop()`

Subtopics Covered (8):
  • Lazy database/collection creation on first write
  • Explicit `create_collection` with `$jsonSchema` validator rules
  • `drop()`
โ†’ What Topic Is Next: Next Topic 12.5: MongoDB CRUD (insertOne, find, updateOne, deleteOne)
Guide โ†’

`insert_one` / `insert_many`, `find_one` / `find`, atomic `$set` / `$inc` / `$push` in `update_one`, and `delete_one` / `delete_many`

Subtopics Covered (8):
  • `insert_one` / `insert_many`
  • `find_one` / `find`
  • Atomic `$set` / `$inc` / `$push` in `update_one`
โ†’ What Topic Is Next: Next Topic 12.6: Comparison and Logical Query Operators
Guide โ†’

`$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$and`, `$or`, `$exists`, and array `$all` / `$elemMatch`

Subtopics Covered (8):
  • `$eq`
  • `$ne`
  • `$gt`
โ†’ What Topic Is Next: Next Topic 12.7: Field Projection
Guide โ†’

Inclusion projection `{"title": 1, "company": 1, "_id": 0}` vs exclusion `{"raw_resume_text": 0}` to cut network payload size

Subtopics Covered (8):
  • Inclusion projection `{"title": 1
  • "company": 1
  • "_id": 0}` vs exclusion `{"raw_resume_text": 0}` to cut network payload size
โ†’ What Topic Is Next: Next Topic 12.8: Sorting, Skip and Limit Pagination
Guide โ†’

`.sort([("created_at", -1), ("_id", -1)]).skip(offset).limit(page_size)` vs range-based `_id < last_id` cursor pagination

Subtopics Covered (8):
  • `.sort([("created_at"
  • -1)
  • ("_id"
โ†’ What Topic Is Next: Next Topic 12.9: Embedded Nested Documents
Guide โ†’

Co-locating `1:1` and bounded `1:few` data (`company.headquarters_address`, `order.shipping_snapshot`) for single-read atomicity

Subtopics Covered (8):
  • Co-locating `1:1`
  • Bounded `1:few` data (`company.headquarters_address`
  • `order.shipping_snapshot`) for single-read atomicity
โ†’ What Topic Is Next: Next Topic 12.10: Document References
Guide โ†’

Storing `employer_id` / `user_id` references across separate collections for `1:many` (unbounded) and `many:many` relationships

Subtopics Covered (8):
  • Storing `employer_id` / `user_id` references across separate collections for `1:many` (unbounded)
  • `many:many` relationships
  • Production Edge-Case & Pitfall Guard (Document References)
โ†’ What Topic Is Next: Next Topic 12.11: MongoDB Indexing
Guide โ†’

Single-field, compound `(tenant_id: 1, created_at: -1)` (ESR rule: Equality, Sort, Range), `unique=True`, TTL indexes (`expireAfterSeconds`), and `.explain("executio...

Subtopics Covered (8):
  • Single-field
  • Compound `(tenant_id: 1
  • Created_at: -1)` (ESR rule: Equality
โ†’ What Topic Is Next: Next Topic 12.12: Aggregation Pipeline ($match, $group, $project, $sort)
Guide โ†’

Multi-stage pipeline `[ {"$match": ...}, {"$group": ...}, {"$sort": ...}, {"$limit": ...} ]` placing indexed `$match` FIRST

Subtopics Covered (8):
  • Multi-stage pipeline `[ {"$match": ...}
  • {"$group": ...}
  • {"$sort": ...}
โ†’ What Topic Is Next: Next Topic 12.13: $lookup Cross-Collection Joins
Guide โ†’

Left-outer collection join via `{"$lookup": {"from": ..., "localField": ..., "foreignField": ..., "as": ...}}` and why heavy joins signal relational data

Subtopics Covered (8):
  • Left-outer collection join via `{"$lookup": {"from": ...
  • "localField": ...
  • "foreignField": ...
โ†’ What Topic Is Next: Next Topic 12.14: Multi-Document Transactions Fundamentals
Guide โ†’

Replica-set `with client.start_session() as s: with s.start_transaction():` vs single-document atomicity design

Subtopics Covered (8):
  • Replica-set `with client.start_session() as s: with s.start_transaction():` vs single-document atomicity design
  • Production Edge-Case & Pitfall Guard (Multi-Document Transactions Fundamentals)
  • Hands-On Python Implementation & Verification (Multi-Document Transactions Fundamentals)
โ†’ What Topic Is Next: Next Topic 12.15: Python Integration with PyMongo
Guide โ†’

`from pymongo import MongoClient, ASCENDING, DESCENDING`, singleton `MongoClient` thread-safe pooling, Pydantic serialization (`model_dump()`), and error handling

Subtopics Covered (8):
  • `from pymongo import MongoClient
  • ASCENDING
  • DESCENDING`
โ†’ What Topic Is Next: Next Topic 12.16: Asynchronous MongoDB Driver Fundamentals (Motor)
Guide โ†’

`motor.motor_asyncio.AsyncIOMotorClient` (and PyMongo async API) for non-blocking `await collection.find_one(...)` inside FastAPI `async def` routes

Subtopics Covered (8):
  • `motor.motor_asyncio.AsyncIOMotorClient` (
  • PyMongo async API) for non-blocking `await collection.find_one(...)` inside FastAPI `async def` routes
  • Production Edge-Case & Pitfall Guard (Asynchronous MongoDB Driver Fundamentals (Motor))
โ†’ What Topic Is Next: Next Topic 12.17: Data Modelling (Embedding vs Referencing)
Guide โ†’

Practical decision checklist: cardinality (`1:few` bounded -> embed; `1:many` unbounded -> reference), read/write ratio, and independent access patterns

Subtopics Covered (8):
  • Practical decision checklist: cardinality (`1:few` bounded -> embed
  • `1:many` unbounded -> reference)
  • Read/write ratio
โ†’ What Topic Is Next: Next Topic 12.18: Selecting PostgreSQL SQL vs MongoDB NoSQL
Guide โ†’

Polyglot persistence architecture: PostgreSQL (users, auth, orders, wallets, HR, strict relations) + Redis (cache/locks/queues) + MongoDB (flexible catalogs/events)

Subtopics Covered (8):
  • Polyglot persistence architecture: PostgreSQL (users
  • Auth
  • Orders
โ†’ What Topic Is Next: Module 12 Capstone (Project 3: Database-Driven Employee Management Backend) โ†’ Next Topic 13.1: Django Framework Architecture (MTV)

Engineer a production-structured relational Employee, Department & Salary Management Backend in Python 3.12 backed by PostgreSQL 16, SQLAlchemy 2.0 ORM, and Alembic schema migrations โ€” featuring 3NF constraints, multi-table SQL joins, eager-loaded N+1-free queries, ACID salary-revision transactions, search/pagination, error handling, and logging.

โ€ข 3NF PostgreSQL schema + Crowโ€™s Foot ER Diagram (`departments`, `employees`, `salary_revisions`)
โ€ข Typed SQLAlchemy 2.0 Declarative models, N+1-free Repositories, and transactional Services
โ€ข Versioned `Alembic` migration chain (`upgrade head` & `downgrade -1` verified)
โ€ข Automated repository/service test suite + structured logging + setup `README.md`

Module Learning & Hands-On Objectives

โœ“ Explain Django 5 Model-Template-View (MTV) request flow and compare Django ("batteries-included" RDBMS apps) vs FastAPI (async APIs/microservices) vs Flask (minimalist microframework).
โœ“ Bootstrap clean multi-app Django projects (`config/`, `apps/`) with environment-driven `settings.py`, URL namespaces, FBVs, and CBVs.
โœ“ Design PostgreSQL-backed Django `Model` classes, generate & inspect `makemigrations`/`migrate` revisions, and customize `ModelAdmin`.
โœ“ Write expressive, lazy Django ORM `QuerySet` chains using `filter`, `exclude`, `get`, `Q()`, `F()`, annotations, and relational fields.
โœ“ Eliminate Django ORM `N+1` queries proactively using `select_related()` (SQL JOIN) and `prefetch_related()` (batched `IN` query).
Guide โ†’

Model-Template-View (MTV) mapping to MVC, URL dispatcher -> Middleware -> View -> ORM Model -> Response lifecycle

Subtopics Covered (8):
  • Model-Template-View (MTV) mapping to MVC
  • URL dispatcher -> Middleware -> View -> ORM Model -> Response lifecycle
  • Production Edge-Case & Pitfall Guard (Django Framework Architecture (MTV))
โ†’ What Topic Is Next: Next Topic 13.2: Django vs Flask vs FastAPI Comparison
Guide โ†’

Batteries-included Django + DRF (ORM, Admin, Auth, Migrations) vs ASGI type-driven FastAPI (Pydantic, async microservices) vs minimalist WSGI Flask exposure

Subtopics Covered (8):
  • Batteries-included Django + DRF (ORM
  • Admin
  • Auth
โ†’ What Topic Is Next: Next Topic 13.3: Python Virtual Environment Setup for Django
Guide โ†’

Isolated `.venv`, installing `Django>=5.1,<5.2` + `psycopg[binary]` + `python-dotenv`, and freezing deterministic dependencies

Subtopics Covered (8):
  • Isolated `.venv`
  • Installing `Django>=5.1
  • <5.2` + `psycopg[binary]` + `python-dotenv`
โ†’ What Topic Is Next: Next Topic 13.4: Django Installation and Version Management
Guide โ†’

Django LTS vs feature release cadence, `python -m django --version`, security patch upgrades, and compatibility with Python 3.12

Subtopics Covered (8):
  • Django LTS vs feature release cadence
  • `python -m django --version`
  • Security patch upgrades
โ†’ What Topic Is Next: Next Topic 13.5: Project Creation with django-admin
Guide โ†’

`django-admin startproject config .` clean root-level `manage.py` layout (avoiding double-nested `project/project/` folders!)

Subtopics Covered (8):
  • `django-admin startproject config .` clean root-level `manage.py` layout (avoiding double-nested `project/project/` folders!)
  • Production Edge-Case & Pitfall Guard (Project Creation with django-admin)
  • Hands-On Python Implementation & Verification (Project Creation with django-admin)
โ†’ What Topic Is Next: Next Topic 13.6: Application Creation with startapp
Guide โ†’

`python manage.py startapp jobs`, cohesive bounded Django apps (`accounts`, `companies`, `jobs`, `applications`), and registering `AppConfig` in `INSTALLED_APPS`

Subtopics Covered (8):
  • `python manage.py startapp jobs`
  • Cohesive bounded Django apps (`accounts`
  • `companies`
โ†’ What Topic Is Next: Next Topic 13.7: Django Project Structure (settings, urls, wsgi, asgi)
Guide โ†’

Responsibilities of `manage.py`, `config/settings.py`, root `config/urls.py`, synchronous `wsgi.py` (Gunicorn), and async `asgi.py` (Uvicorn)

Subtopics Covered (8):
  • Responsibilities of `manage.py`
  • `config/settings.py`
  • Root `config/urls.py`
โ†’ What Topic Is Next: Next Topic 13.8: Environment-Specific Settings Configuration
Guide โ†’

Loading `SECRET_KEY`, `DEBUG`, `ALLOWED_HOSTS`, and PostgreSQL `DATABASES` strictly from environment variables (`os.environ`)

Subtopics Covered (8):
  • Loading `SECRET_KEY`
  • `DEBUG`
  • `ALLOWED_HOSTS`
โ†’ What Topic Is Next: Next Topic 13.9: URL Routing and Path Converters
Guide โ†’

`path()`, `include()` app URL delegation, `app_name` namespaces, typed converters (`<int:pk>`, `<slug:slug>`, `<uuid:id>`), and `reverse()`

Subtopics Covered (8):
  • `path()`
  • `include()` app URL delegation
  • `app_name` namespaces
โ†’ What Topic Is Next: Next Topic 13.10: Function-Based Views (FBVs)
Guide โ†’

Explicit `def view(request, ...):` handlers, `@require_http_methods(["GET", "POST"])`, and `JsonResponse`

Subtopics Covered (8):
  • Explicit `def view(request
  • ...):` handlers
  • `@require_http_methods(["GET"
โ†’ What Topic Is Next: Next Topic 13.11: Class-Based Views (CBVs) Fundamentals
Guide โ†’

`django.views.View`, HTTP method dispatch (`.get()`, `.post()`), `View.as_view()`, `ListView`/`DetailView`, and method flow (`setup -> dispatch`)

Subtopics Covered (8):
  • `django.views.View`
  • HTTP method dispatch (`.get()`
  • `.post()`)
โ†’ What Topic Is Next: Next Topic 13.12: HttpRequest and HttpResponse Lifecycle
Guide โ†’

`request.method`, `request.GET` (`QueryDict`), `request.POST`, `request.body`, `request.headers`, `request.META`, `HttpResponse`, `JsonResponse`, status codes

Subtopics Covered (8):
  • `request.method`
  • `request.GET` (`QueryDict`)
  • `request.POST`
โ†’ What Topic Is Next: Next Topic 13.13: Django Template Engine Fundamentals
Guide โ†’

DTL context variables `{{ var }}`, auto-escaping XSS protection, filters (`|date`, `|default`), and tags (`{% if %}`, `{% for %}`, `{% url %}`)

Subtopics Covered (8):
  • DTL context variables `{{ var }}`
  • Auto-escaping XSS protection
  • Filters (`|date`
โ†’ What Topic Is Next: Next Topic 13.14: Template Inheritance and Base Layouts
Guide โ†’

`base.html` master skeleton, `{% block content %}`, `{% extends "base.html" %}`, and reusable `{% include %}` partials

Subtopics Covered (8):
  • `base.html` master skeleton
  • `{% block content %}`
  • `{% extends "base.html" %}`
โ†’ What Topic Is Next: Next Topic 13.15: Static and Media Files Configuration
Guide โ†’

`STATIC_URL`, `STATIC_ROOT`, `collectstatic` (WhiteNoise/Nginx/CDN) vs user-uploaded `MEDIA_URL` / `MEDIA_ROOT` / S3 `STORAGES`

Subtopics Covered (8):
  • `STATIC_URL`
  • `STATIC_ROOT`
  • `collectstatic` (WhiteNoise/Nginx/CDN) vs user-uploaded `MEDIA_URL` / `MEDIA_ROOT` / S3 `STORAGES`
โ†’ What Topic Is Next: Next Topic 13.16: Django Forms
Guide โ†’

`forms.Form` vs `forms.ModelForm`, explicit `fields = [...]` allowlists, `{% csrf_token %}`, and `form.is_valid()` + `cleaned_data`

Subtopics Covered (8):
  • `forms.Form` vs `forms.ModelForm`
  • Explicit `fields = [...]` allowlists
  • `{% csrf_token %}`
โ†’ What Topic Is Next: Next Topic 13.17: Form Validation Lifecycle (clean and clean_<field>)
Guide โ†’

Field validators -> `clean_<fieldname>()` single-field normalization -> `clean()` cross-field validation (`max_salary >= min_salary`) -> `ValidationError`

Subtopics Covered (8):
  • Field validators -> `clean_<fieldname>()` single-field normalization -> `clean()` cross-field validation (`max_salary >= min_salary`) -> `ValidationError`
  • Production Edge-Case & Pitfall Guard (Form Validation Lifecycle (clean and clean_<field>))
  • Hands-On Python Implementation & Verification (Form Validation Lifecycle (clean and clean_<field>))
โ†’ What Topic Is Next: Next Topic 13.18: Django Models Introduction
Guide โ†’

`models.Model` subclasses, implicit `BigAutoField` PK (`DEFAULT_AUTO_FIELD`), `class Meta` (`db_table`, `ordering`, `indexes`, `constraints`), and `__str__`

Subtopics Covered (8):
  • `models.Model` subclasses
  • Implicit `BigAutoField` PK (`DEFAULT_AUTO_FIELD`)
  • `class Meta` (`db_table`
โ†’ What Topic Is Next: Next Topic 13.19: Model Field Types and Options
Guide โ†’

`CharField`, `SlugField`, `TextField`, `DecimalField(max_digits=12, decimal_places=2)`, `BooleanField`, `DateTimeField(auto_now_add=True)`, `UUIDField`, `TextChoices...

Subtopics Covered (8):
  • `CharField`
  • `SlugField`
  • `TextField`
โ†’ What Topic Is Next: Next Topic 13.20: Schema Migrations (makemigrations and migrate)
Guide โ†’

`makemigrations`, `sqlmigrate <app> <num>` (inspecting exact SQL!), `migrate`, `showmigrations`, data migrations (`RunPython`), and zero-downtime awareness

Subtopics Covered (8):
  • `makemigrations`
  • `sqlmigrate <app> <num>` (inspecting exact SQL!)
  • `migrate`
โ†’ What Topic Is Next: Next Topic 13.21: Django Admin Panel Customization
Guide โ†’

`@admin.register(JobPosting)`, `list_display`, `list_filter`, `search_fields`, `readonly_fields`, `raw_id_fields` / `autocomplete_fields`, and `list_select_related`

Subtopics Covered (8):
  • `@admin.register(JobPosting)`
  • `list_display`
  • `list_filter`
โ†’ What Topic Is Next: Next Topic 13.22: Django ORM and QuerySet Evaluation
Guide โ†’

Lazy `QuerySet` chaining, exact evaluation triggers (iteration, slicing with step, `len()`, `list()`, `bool()`), QuerySet caching, and `.exists()` / `.count()`

Subtopics Covered (8):
  • Lazy `QuerySet` chaining
  • Exact evaluation triggers (iteration
  • Slicing with step
โ†’ What Topic Is Next: Next Topic 13.23: ORM CRUD Operations
Guide โ†’

`objects.create()`, `bulk_create()`, `get_or_create()`, `update_or_create()`, `.save(update_fields=[...])`, QuerySet `.update()`, and `.delete()`

Subtopics Covered (8):
  • `objects.create()`
  • `bulk_create()`
  • `get_or_create()`
โ†’ What Topic Is Next: Next Topic 13.24: Filtering QuerySets (filter, exclude, get, Q, F)
Guide โ†’

Field lookups (`__iexact`, `__icontains`, `__in`, `__gte`, `__isnull`), `Q()` boolean OR/NOT composition, `F()` atomic DB expressions, and `annotate(Count(...))`

Subtopics Covered (8):
  • Field lookups (`__iexact`
  • `__icontains`
  • `__in`
โ†’ What Topic Is Next: Next Topic 13.25: Model Relationships (ForeignKey, OneToOneField, ManyToManyField)
Guide โ†’

Explicit `on_delete=models.CASCADE / PROTECT / SET_NULL`, explicit `related_name="jobs"`, `OneToOneField` (`CandidateProfile`), and `ManyToManyField(..., through=......

Subtopics Covered (8):
  • Explicit `on_delete=models.CASCADE / PROTECT / SET_NULL`
  • Explicit `related_name="jobs"`
  • `OneToOneField` (`CandidateProfile`)
โ†’ What Topic Is Next: Next Topic 13.26: Django Query Optimization (select_related and prefetch_related)
Guide โ†’

`select_related("company", "company__owner")` (`SQL INNER/LEFT JOIN` for FK/OneToOne) vs `prefetch_related("skills", Prefetch(...))` (separate `IN` query for M2M/rev...

Subtopics Covered (8):
  • `select_related("company"
  • "company__owner")` (`SQL INNER/LEFT JOIN` for FK/OneToOne) vs `prefetch_related("skills"
  • Prefetch(...))` (separate `IN` query for M2M/reverse FK)
โ†’ What Topic Is Next: Module 13 Capstone (Week 13 Lab Build: Modular Django 5 Recruitment Core & Optimized Admin) โ†’ Next Topic 14.1: REST Architecture Principles

Bootstrap a multi-app Django 5 project (`accounts`, `companies`, `jobs`) backed by PostgreSQL with environment-driven settings, `CheckConstraint` models, customized N+1-free `ModelAdmin`, and `select_related`/`prefetch_related` QuerySets.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Design resource-oriented REST URLs (`/api/v1/jobs`, `/api/v1/jobs/{id}/applications`) using accurate HTTP methods and status codes.
โœ“ Validate incoming payloads and serialize ORM models cleanly with DRF `Serializer`, `ModelSerializer`, `validate_<field>`, and `validate()`.
โœ“ Progress systematically from `APIView` -> `GenericAPIView` + Mixins -> `ModelViewSet` + `DefaultRouter` knowing when each fits best.
โœ“ Equip list endpoints with `django-filter`, `SearchFilter`, `OrderingFilter`, bounded pagination, permissions, rate throttling, and URL versioning.
โœ“ Standardize JSON error payloads globally via custom `EXCEPTION_HANDLER` configuration.
Guide โ†’

Statelessness, resource-noun URLs (`/jobs`, NOT `/getAllJobs`), uniform interface, representations, and idempotency

Subtopics Covered (8):
  • Statelessness
  • Resource-noun URLs (`/jobs`
  • NOT `/getAllJobs`)
โ†’ What Topic Is Next: Next Topic 14.2: HTTP Methods (GET, POST, PUT, PATCH, DELETE)
Guide โ†’

Safe (`GET`, `HEAD`, `OPTIONS`) vs Idempotent (`GET`, `PUT`, `DELETE`) vs Non-idempotent (`POST`), and full replacement `PUT` vs partial update `PATCH`

Subtopics Covered (8):
  • Safe (`GET`
  • `HEAD`
  • `OPTIONS`) vs Idempotent (`GET`
โ†’ What Topic Is Next: Next Topic 14.3: HTTP Status Codes (2xx, 3xx, 4xx, 5xx)
Guide โ†’

`200 OK`, `201 Created` (+ `Location`), `204 No Content`, `400 Bad Request`, `401 Unauthorized` (unauthenticated!), `403 Forbidden` (unauthorized!), `404`, `409 Conf...

Subtopics Covered (8):
  • `200 OK`
  • `201 Created` (+ `Location`)
  • `204 No Content`
โ†’ What Topic Is Next: Next Topic 14.4: HTTP Request Headers (Content-Type, Accept, Authorization)
Guide โ†’

`Content-Type: application/json` vs `multipart/form-data`, `Accept`, `Authorization: Bearer <jwt>`, `X-Request-ID`, and `Retry-After`

Subtopics Covered (8):
  • `Content-Type: application/json` vs `multipart/form-data`
  • `Accept`
  • `Authorization: Bearer <jwt>`
โ†’ What Topic Is Next: Next Topic 14.5: JSON Request and Response Payloads
Guide โ†’

Consistent `snake_case` (or camelCase adapter) field naming, ISO-8601 UTC timestamps (`2026-11-18T06:30:00Z`), stringified `Decimal` money (`"85000.00"`), and nullab...

Subtopics Covered (8):
  • Consistent `snake_case` (or camelCase adapter) field naming
  • ISO-8601 UTC timestamps (`2026-11-18T06:30:00Z`)
  • Stringified `Decimal` money (`"85000.00"`)
โ†’ What Topic Is Next: Next Topic 14.6: Django REST Framework (DRF) Installation and Architecture
Guide โ†’

Installing `djangorestframework`, `REST_FRAMEWORK` central settings dict, DRF `Request` (`request.data`, `request.query_params`) & `Response` content negotiation

Subtopics Covered (8):
  • Installing `djangorestframework`
  • `REST_FRAMEWORK` central settings dict
  • DRF `Request` (`request.data`
โ†’ What Topic Is Next: Next Topic 14.7: DRF Serializers Fundamentals
Guide โ†’

`serializers.Serializer` for non-model inputs (login, password reset, search filters), `is_valid(raise_exception=True)`, `validated_data`, and `.data`

Subtopics Covered (8):
  • `serializers.Serializer` for non-model inputs (login
  • Password reset
  • Search filters)
โ†’ What Topic Is Next: Next Topic 14.8: ModelSerializer
Guide โ†’

`serializers.ModelSerializer`, explicit `fields` + `read_only_fields` (`id`, `employer`, `created_at`), `write_only` secrets, nested read vs PK/slug write serializer...

Subtopics Covered (8):
  • `serializers.ModelSerializer`
  • Explicit `fields` + `read_only_fields` (`id`
  • `employer`
โ†’ What Topic Is Next: Next Topic 14.9: Field-Level and Object-Level Serializer Validation
Guide โ†’

`validate_<field>(self, value)` single-field rules, `validate(self, attrs)` cross-field checks (handling partial `PATCH` with `self.instance`!), and `UniqueTogetherV...

Subtopics Covered (8):
  • `validate_<field>(self
  • Value)` single-field rules
  • `validate(self
โ†’ What Topic Is Next: Next Topic 14.10: DRF APIView
Guide โ†’

`rest_framework.views.APIView` (auth -> permission -> throttle pipeline BEFORE `get`/`post`/`patch`/`delete` runs) and `@api_view` decorator

Subtopics Covered (8):
  • `rest_framework.views.APIView` (auth -> permission -> throttle pipeline BEFORE `get`/`post`/`patch`/`delete` runs)
  • `@api_view` decorator
  • Production Edge-Case & Pitfall Guard (DRF APIView)
โ†’ What Topic Is Next: Next Topic 14.11: GenericAPIView and Concrete Generic Views
Guide โ†’

`GenericAPIView` (`get_queryset()`, `get_serializer_class()`, `lookup_field`) and concrete `ListCreateAPIView`, `RetrieveUpdateDestroyAPIView`

Subtopics Covered (8):
  • `GenericAPIView` (`get_queryset()`
  • `get_serializer_class()`
  • `lookup_field`)
โ†’ What Topic Is Next: Next Topic 14.12: DRF Mixins for Reusable API Behaviour
Guide โ†’

`ListModelMixin`, `CreateModelMixin`, `RetrieveModelMixin`, `UpdateModelMixin`, `DestroyModelMixin` and `perform_create` / `perform_update` hooks

Subtopics Covered (8):
  • `ListModelMixin`
  • `CreateModelMixin`
  • `RetrieveModelMixin`
โ†’ What Topic Is Next: Next Topic 14.13: ViewSets and ModelViewSet
Guide โ†’

`ViewSet`, `ReadOnlyModelViewSet`, `ModelViewSet`, switching serializers per action (`if self.action == "list":`), and custom `@action(detail=True, methods=["post"])...

Subtopics Covered (8):
  • `ViewSet`
  • `ReadOnlyModelViewSet`
  • `ModelViewSet`
โ†’ What Topic Is Next: Next Topic 14.14: DRF Routers (DefaultRouter and SimpleRouter)
Guide โ†’

`SimpleRouter` vs `DefaultRouter`, `router.register("jobs", JobViewSet, basename="job")`, trailing slash config, and generated URL names (`job-list`, `job-detail`)

Subtopics Covered (8):
  • `SimpleRouter` vs `DefaultRouter`
  • `router.register("jobs"
  • JobViewSet
โ†’ What Topic Is Next: Next Topic 14.15: Complete CRUD REST API Endpoints
Guide โ†’

End-to-end `POST 201`, `GET 200` list/detail, `PATCH 200`, `PUT 200`, and `DELETE 204` with PostgreSQL persistence and eager-loaded QuerySets

Subtopics Covered (8):
  • End-to-end `POST 201`
  • `GET 200` list/detail
  • `PATCH 200`
โ†’ What Topic Is Next: Next Topic 14.16: API Filtering with django-filter
Guide โ†’

Installing `django-filter`, `DjangoFilterBackend`, custom `FilterSet` (`min_salary = NumberFilter(field_name="min_salary", lookup_expr="gte")`, `is_remote`, `city__i...

Subtopics Covered (8):
  • Installing `django-filter`
  • `DjangoFilterBackend`
  • Custom `FilterSet` (`min_salary = NumberFilter(field_name="min_salary"
โ†’ What Topic Is Next: Next Topic 14.17: Full-Text Search with SearchFilter
Guide โ†’

`filters.SearchFilter`, `search_fields = ["title", "company__name", "=job_code"]` (`^` prefix, `=` exact, `@` PostgreSQL full-text search)

Subtopics Covered (8):
  • `filters.SearchFilter`
  • `search_fields = ["title"
  • "company__name"
โ†’ What Topic Is Next: Next Topic 14.18: Dynamic Sorting with OrderingFilter
Guide โ†’

`filters.OrderingFilter`, explicit `ordering_fields = ["published_at", "min_salary"]` allowlist, and default `ordering = ["-published_at", "-id"]`

Subtopics Covered (8):
  • `filters.OrderingFilter`
  • Explicit `ordering_fields = ["published_at"
  • "min_salary"]` allowlist
โ†’ What Topic Is Next: Next Topic 14.19: Pagination (PageNumberPagination and LimitOffsetPagination)
Guide โ†’

Custom `StandardResultsSetPagination(PageNumberPagination)` (`page_size = 20`, `page_size_query_param = "page_size"`, `max_page_size = 100`) vs `CursorPagination`

Subtopics Covered (8):
  • Custom `StandardResultsSetPagination(PageNumberPagination)` (`page_size = 20`
  • `page_size_query_param = "page_size"`
  • `max_page_size = 100`) vs `CursorPagination`
โ†’ What Topic Is Next: Next Topic 14.20: DRF Permission Classes
Guide โ†’

`IsAuthenticated`, `IsAuthenticatedOrReadOnly`, `IsAdminUser`, custom `BasePermission` (`has_permission` view-level vs `has_object_permission` row-level!), and `&`/`...

Subtopics Covered (8):
  • `IsAuthenticated`
  • `IsAuthenticatedOrReadOnly`
  • `IsAdminUser`
โ†’ What Topic Is Next: Next Topic 14.21: API Rate Throttling (AnonRateThrottle, UserRateThrottle)
Guide โ†’

`AnonRateThrottle`, `UserRateThrottle`, `ScopedRateThrottle` (`login: "5/min"`), Redis cache backing, `X-Forwarded-For` proxy config (`NUM_PROXIES`), and `429 Retry-...

Subtopics Covered (8):
  • `AnonRateThrottle`
  • `UserRateThrottle`
  • `ScopedRateThrottle` (`login: "5/min"`)
โ†’ What Topic Is Next: Next Topic 14.22: API Versioning Strategies
Guide โ†’

`URLPathVersioning` (`/api/v1/jobs/`) vs `NamespaceVersioning` vs `AcceptHeaderVersioning`, `request.version`, and backward-compatible deprecation

Subtopics Covered (8):
  • `URLPathVersioning` (`/api/v1/jobs/`) vs `NamespaceVersioning` vs `AcceptHeaderVersioning`
  • `request.version`
  • Backward-compatible deprecation
โ†’ What Topic Is Next: Next Topic 14.23: Standardized JSON API Response Envelopes
Guide โ†’

Consistent pagination (`count`, `next`, `previous`, `results`) and error envelope (`{"error": {"code": "...", "message": "...", "details": ...}}`) conventions

Subtopics Covered (8):
  • Consistent pagination (`count`
  • `next`
  • `previous`
โ†’ What Topic Is Next: Next Topic 14.24: Custom DRF Exception Handling
Guide โ†’

Writing a custom `EXCEPTION_HANDLER` wrapping DRF `exception_handler(exc, context)`, translating domain/Django `ValidationError` & `IntegrityError` cleanly, never le...

Subtopics Covered (8):
  • Writing a custom `EXCEPTION_HANDLER` wrapping DRF `exception_handler(exc
  • Context)`
  • Translating domain/Django `ValidationError` & `IntegrityError` cleanly
โ†’ What Topic Is Next: Module 14 Capstone (Week 14 Lab Build: Filtered, Paginated & Versioned DRF Company/Job API) โ†’ Next Topic 15.1: Django Built-In Authentication System

Expose `/api/v1/companies/` and `/api/v1/jobs/` via DRF `ModelSerializer`, `ModelViewSet`, `django-filter`, `SearchFilter`, `OrderingFilter`, `max_page_size=100` pagination, object-ownership permissions, rate throttling, and unified error JSON.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Configure a custom `User(AbstractUser)` model (`AUTH_USER_MODEL`) from Migration #1 supporting email-based login and role flags.
โœ“ Implement complete Registration, Login, Password Change, Password Reset, and `SimpleJWT` Access + Refresh rotation/blacklist flows.
โœ“ Enforce fine-grained Role-Based Access Control (`Candidate`, `Employer`, `Admin`) and object ownership permissions.
โœ“ Defend against OWASP Top 10 risks: CORS misconfigurations, CSRF, XSS, SQL injection, insecure headers, secret leaks, and malicious file uploads.
โœ“ Document every API automatically with OpenAPI 3 / Swagger UI (`drf-spectacular`) and verify flows via automated Postman collections.
Guide โ†’

`django.contrib.auth` architecture: `User`, `AuthenticationBackend`, `authenticate()`, `Permission`, and `Group`

Subtopics Covered (8):
  • `django.contrib.auth` architecture: `User`
  • `AuthenticationBackend`
  • `authenticate()`
โ†’ What Topic Is Next: Next Topic 15.2: Default Django User Model
Guide โ†’

Fields on default `auth.User` (`username`, `email`, `password`, `is_active`, `is_staff`, `is_superuser`, `last_login`, `date_joined`) and why `username`-first is lim...

Subtopics Covered (8):
  • Fields on default `auth.User` (`username`
  • `email`
  • `password`
โ†’ What Topic Is Next: Next Topic 15.3: Custom User Model (AbstractUser and AbstractBaseUser)
Guide โ†’

Defining `class User(AbstractUser):` (`USERNAME_FIELD = "email"`, unique case-insensitive email, `role` enum) and `AUTH_USER_MODEL = "accounts.User"` BEFORE initial...

Subtopics Covered (8):
  • Defining `class User(AbstractUser):` (`USERNAME_FIELD = "email"`
  • Unique case-insensitive email
  • `role` enum)
โ†’ What Topic Is Next: Next Topic 15.4: User Registration REST API
Guide โ†’

`POST /api/v1/auth/register/` (`write_only=True` password, `validate_password()` strength validators, normalized lowercase email, atomic profile creation)

Subtopics Covered (8):
  • `POST /api/v1/auth/register/` (`write_only=True` password
  • `validate_password()` strength validators
  • Normalized lowercase email
โ†’ What Topic Is Next: Next Topic 15.5: User Login and Credential Verification API
Guide โ†’

`POST /api/v1/auth/login/` generic `"Invalid email or password"` error (preventing account enumeration!), rate throttling, and inactive user rejection

Subtopics Covered (8):
  • `POST /api/v1/auth/login/` generic `"Invalid email or password"` error (preventing account enumeration!)
  • Rate throttling
  • Inactive user rejection
โ†’ What Topic Is Next: Next Topic 15.6: Secure Password Hashing (PBKDF2 and Argon2)
Guide โ†’

`PASSWORD_HASHERS` (`Argon2PasswordHasher` primary, `PBKDF2PasswordHasher`), per-user cryptographic salt, work factors, and transparent hash upgrades

Subtopics Covered (8):
  • `PASSWORD_HASHERS` (`Argon2PasswordHasher` primary
  • `PBKDF2PasswordHasher`)
  • Per-user cryptographic salt
โ†’ What Topic Is Next: Next Topic 15.7: Password Reset Token Workflow
Guide โ†’

`PasswordResetTokenGenerator` (`default_token_generator`), `urlsafe_base64_encode(uid)`, single-use time-bounded tokens, and revoking existing refresh tokens on rese...

Subtopics Covered (8):
  • `PasswordResetTokenGenerator` (`default_token_generator`)
  • `urlsafe_base64_encode(uid)`
  • Single-use time-bounded tokens
โ†’ What Topic Is Next: Next Topic 15.8: Session-Based Authentication
Guide โ†’

Stateful `sessionid` (`HttpOnly`, `Secure`, `SameSite=Lax`) cookie + Redis session store (`SESSION_ENGINE`) + mandatory CSRF protection

Subtopics Covered (8):
  • Stateful `sessionid` (`HttpOnly`
  • `Secure`
  • `SameSite=Lax`) cookie + Redis session store (`SESSION_ENGINE`) + mandatory CSRF protection
โ†’ What Topic Is Next: Next Topic 15.9: DRF Token Authentication
Guide โ†’

`rest_framework.authtoken` opaque DB-backed token vs stateless JWT trade-offs (1 DB lookup per request & single non-expiring token per user)

Subtopics Covered (8):
  • `rest_framework.authtoken` opaque DB-backed token vs stateless JWT trade-offs (1 DB lookup per request & single non-expiring token per user)
  • Production Edge-Case & Pitfall Guard (DRF Token Authentication)
  • Hands-On Python Implementation & Verification (DRF Token Authentication)
โ†’ What Topic Is Next: Next Topic 15.10: JSON Web Token (JWT) Structure and Signing
Guide โ†’

`header.payload.signature` Base64URL anatomy (`alg`, `sub`, `exp`, `iat`, `jti`), HMAC `HS256` vs asymmetric `RS256`, and why JWT payload is SIGNED (tamper-proof), N...

Subtopics Covered (8):
  • `header.payload.signature` Base64URL anatomy (`alg`
  • `sub`
  • `exp`
โ†’ What Topic Is Next: Next Topic 15.11: SimpleJWT Integration in DRF
Guide โ†’

Installing `djangorestframework-simplejwt`, `JWTAuthentication`, `TokenObtainPairView`, `TokenRefreshView`, and custom minimal token claims

Subtopics Covered (8):
  • Installing `djangorestframework-simplejwt`
  • `JWTAuthentication`
  • `TokenObtainPairView`
โ†’ What Topic Is Next: Next Topic 15.12: Short-Lived Access Token Handling
Guide โ†’

Setting `ACCESS_TOKEN_LIFETIME = timedelta(minutes=15)`, skew leeway, `Bearer <token>` verification, and minimizing revocation window

Subtopics Covered (8):
  • Setting `ACCESS_TOKEN_LIFETIME = timedelta(minutes=15)`
  • Skew leeway
  • `Bearer <token>` verification
โ†’ What Topic Is Next: Next Topic 15.13: Refresh Token Rotation and Blacklisting
Guide โ†’

`ROTATE_REFRESH_TOKENS = True`, `BLACKLIST_AFTER_ROTATION = True`, `rest_framework_simplejwt.token_blacklist`, and `POST /auth/logout/` (`TokenBlacklistView`)

Subtopics Covered (8):
  • `ROTATE_REFRESH_TOKENS = True`
  • `BLACKLIST_AFTER_ROTATION = True`
  • `rest_framework_simplejwt.token_blacklist`
โ†’ What Topic Is Next: Next Topic 15.14: Authentication vs Authorization
Guide โ†’

Clear architectural separation: Authentication (`request.user` identity -> `401`) vs Authorization (role + resource ownership policy -> `403`)

Subtopics Covered (8):
  • Clear architectural separation: Authentication (`request.user` identity -> `401`) vs Authorization (role + resource ownership policy -> `403`)
  • Production Edge-Case & Pitfall Guard (Authentication vs Authorization)
  • Hands-On Python Implementation & Verification (Authentication vs Authorization)
โ†’ What Topic Is Next: Next Topic 15.15: Role-Based Access Control (RBAC) Permissions
Guide โ†’

`IsCandidate`, `IsEmployer`, `IsPlatformAdmin` DRF permission classes + object-level ownership (`application.job.company.owner_id == request.user.id`)

Subtopics Covered (8):
  • `IsCandidate`
  • `IsEmployer`
  • `IsPlatformAdmin` DRF permission classes + object-level ownership (`application.job.company.owner_id == request.user.id`)
โ†’ What Topic Is Next: Next Topic 15.16: Django Groups and Object-Level Permissions
Guide โ†’

`Group`, `Permission` (`jobs.publish_jobposting`), `user.has_perm()`, and seeding standard staff roles (`Moderator`, `SupportReadOnly`) via migrations/commands

Subtopics Covered (8):
  • `Group`
  • `Permission` (`jobs.publish_jobposting`)
  • `user.has_perm()`
โ†’ What Topic Is Next: Next Topic 15.17: Cross-Origin Resource Sharing (django-cors-headers)
Guide โ†’

Same-Origin Policy, `OPTIONS` preflight requests, `django-cors-headers` middleware placement (top of `MIDDLEWARE`!), and explicit `CORS_ALLOWED_ORIGINS` allowlist

Subtopics Covered (8):
  • Same-Origin Policy
  • `OPTIONS` preflight requests
  • `django-cors-headers` middleware placement (top of `MIDDLEWARE`!)
โ†’ What Topic Is Next: Next Topic 15.18: Cross-Site Request Forgery (CSRF) Protection
Guide โ†’

How browsers auto-attach cookies cross-site, `CsrfViewMiddleware`, `SameSite=Lax/Strict`, and why `Authorization: Bearer` header APIs are immune whereas cookie auth...

Subtopics Covered (8):
  • How browsers auto-attach cookies cross-site
  • `CsrfViewMiddleware`
  • `SameSite=Lax/Strict`
โ†’ What Topic Is Next: Next Topic 15.19: Cross-Site Scripting (XSS) Prevention
Guide โ†’

Stored vs Reflected XSS, HTML escaping, sanitizing rich-text Markdown/HTML descriptions (`nh3` / `bleach`), and `Content-Type: application/json` (`nosniff`)

Subtopics Covered (8):
  • Stored vs Reflected XSS
  • HTML escaping
  • Sanitizing rich-text Markdown/HTML descriptions (`nh3` / `bleach`)
โ†’ What Topic Is Next: Next Topic 15.20: SQL Injection Prevention in Django ORM
Guide โ†’

Parameterized Django `QuerySet` safety vs dangerous escape hatches (`raw()`, `extra()`, `RawSQL`) when developers interpolate f-strings

Subtopics Covered (8):
  • Parameterized Django `QuerySet` safety vs dangerous escape hatches (`raw()`
  • `extra()`
  • `RawSQL`) when developers interpolate f-strings
โ†’ What Topic Is Next: Next Topic 15.21: HTTP Security Headers (HSTS, CSP, X-Frame-Options)
Guide โ†’

`SecurityMiddleware`: `SECURE_SSL_REDIRECT`, `SECURE_HSTS_SECONDS = 31536000`, `SECURE_CONTENT_TYPE_NOSNIFF = True`, `X_FRAME_OPTIONS = "DENY"`, `Content-Security-Po...

Subtopics Covered (8):
  • `SecurityMiddleware`: `SECURE_SSL_REDIRECT`
  • `SECURE_HSTS_SECONDS = 31536000`
  • `SECURE_CONTENT_TYPE_NOSNIFF = True`
โ†’ What Topic Is Next: Next Topic 15.22: Environment Variables and Secret Management
Guide โ†’

Zero secrets in Git, rotating leaked keys immediately, `django-environ` / `pydantic-settings`, AWS Secrets Manager / GitHub Encrypted Secrets

Subtopics Covered (8):
  • Zero secrets in Git
  • Rotating leaked keys immediately
  • `django-environ` / `pydantic-settings`
โ†’ What Topic Is Next: Next Topic 15.23: Multipart File and Resume Upload APIs
Guide โ†’

`MultiPartParser` & `FormParser`, `FileField(upload_to=...)` with UUID randomized filenames (preventing path traversal & overwrites!), and S3 `django-storages`

Subtopics Covered (8):
  • `MultiPartParser` & `FormParser`
  • `FileField(upload_to=...)` with UUID randomized filenames (preventing path traversal & overwrites!)
  • S3 `django-storages`
โ†’ What Topic Is Next: Next Topic 15.24: Upload File Size, MIME and Extension Validation
Guide โ†’

3-layer upload validation: max size (`<= 5 MB`), extension allowlist (`.pdf`, `.docx`), AND magic-byte header inspection (`%PDF-` / ZIP PK header โ€” never trust clien...

Subtopics Covered (8):
  • 3-layer upload validation: max size (`<= 5 MB`)
  • Extension allowlist (`.pdf`
  • `.docx`)
โ†’ What Topic Is Next: Next Topic 15.25: Transactional Email Integration via SMTP
Guide โ†’

`EMAIL_BACKEND` (`console` in dev, `locmem` in tests, `smtp`/SES in prod), `EmailMultiAlternatives` (plain text + HTML), timeouts (`EMAIL_TIMEOUT = 10`)

Subtopics Covered (8):
  • `EMAIL_BACKEND` (`console` in dev
  • `locmem` in tests
  • `smtp`/SES in prod)
โ†’ What Topic Is Next: Next Topic 15.26: Swagger Interactive API Documentation
Guide โ†’

Serving interactive `/api/schema/swagger-ui/` and `/api/schema/redoc/` with Bearer JWT `Authorize` button for frontend & QA collaboration

Subtopics Covered (8):
  • Serving interactive `/api/schema/swagger-ui/`
  • `/api/schema/redoc/` with Bearer JWT `Authorize` button for frontend & QA collaboration
  • Production Edge-Case & Pitfall Guard (Swagger Interactive API Documentation)
โ†’ What Topic Is Next: Next Topic 15.27: OpenAPI 3 Schema Generation (drf-spectacular)
Guide โ†’

Installing `drf-spectacular`, `AutoSchema`, `@extend_schema(summary=..., request=..., responses={201: ...})` annotations, and CI schema validation (`spectacular --va...

Subtopics Covered (8):
  • Installing `drf-spectacular`
  • `AutoSchema`
  • `@extend_schema(summary=...
โ†’ What Topic Is Next: Next Topic 15.28: API Testing and Environments with Postman
Guide โ†’

Organizing Postman Collections (`Auth`, `Companies`, `Jobs`, `Applications`), Environment variables (`{{base_url}}`, `{{access_token}}`), post-response token capture...

Subtopics Covered (8):
  • Organizing Postman Collections (`Auth`
  • `Companies`
  • `Jobs`
โ†’ What Topic Is Next: Module 15 Capstone (Week 15 Lab Build: Argon2 + SimpleJWT RBAC, PDF Resume Upload & OpenAPI Suite) โ†’ Next Topic 16.1: Scalable Django Project Structure

Harden your DRF API with custom email `User`, Argon2id hashing, rotated/blacklisted `SimpleJWT` tokens, Candidate/Employer RBAC, `%PDF-` magic-byte validated resume uploads, OWASP security headers, and `drf-spectacular` Swagger UI.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Structure multi-app Django codebases cleanly using thin Views, rich `services.py` write commands, and optimized `selectors.py` read queries.
โœ“ Coordinate multi-model writes safely inside `transaction.atomic()` while scheduling Celery tasks strictly inside `transaction.on_commit()`!
โœ“ Accelerate hot read endpoints with `django-redis` caching and offload slow emails/notifications to Celery workers.
โœ“ Write comprehensive automated API test suites with DRF `APIClient`, fixtures/factories, and `assertNumQueries` N+1 guards.
โœ“ Deliver Major Project 4: a complete, tested, documented Job Portal Backend using Django REST Framework & PostgreSQL.
Guide โ†’

Organizing `config/settings/{base,dev,test,prod}.py`, `apps/{accounts,companies,jobs,applications,notifications}/`, and shared `common/` utilities

Subtopics Covered (8):
  • Organizing `config/settings/{base
  • Dev
  • Test
โ†’ What Topic Is Next: Next Topic 16.2: Feature-Based Application Separation
Guide โ†’

Bounded domain cohesion per app, unidirectional dependency rules (`applications` -> `jobs` -> `companies` -> `accounts`), avoiding circular FK/service imports

Subtopics Covered (8):
  • Bounded domain cohesion per app
  • Unidirectional dependency rules (`applications` -> `jobs` -> `companies` -> `accounts`)
  • Avoiding circular FK/service imports
โ†’ What Topic Is Next: Next Topic 16.3: Service Layer Pattern in Django
Guide โ†’

Extracting business write rules (`submit_job_application(*, candidate, job, resume_file)`) into `services.py` keeping DRF ViewSets thin HTTP adapters

Subtopics Covered (8):
  • Extracting business write rules (`submit_job_application(*
  • Candidate
  • Job
โ†’ What Topic Is Next: Next Topic 16.4: Repository / Selector Data Access Abstraction
Guide โ†’

Centralizing optimized read queries (`list_published_jobs`, `get_employer_job_detail`) in `selectors.py` with baked-in `select_related`/`prefetch_related`

Subtopics Covered (8):
  • Centralizing optimized read queries (`list_published_jobs`
  • `get_employer_job_detail`) in `selectors.py` with baked-in `select_related`/`prefetch_related`
  • Production Edge-Case & Pitfall Guard (Repository / Selector Data Access Abstraction)
โ†’ What Topic Is Next: Next Topic 16.5: Custom Request-Response Middleware
Guide โ†’

Writing sync/async-compatible middleware (`__init__(get_response)` + `__call__(request)`), injecting `X-Request-ID` & measuring `X-Response-Time-Ms`

Subtopics Covered (8):
  • Writing sync/async-compatible middleware (`__init__(get_response)` + `__call__(request)`)
  • Injecting `X-Request-ID` & measuring `X-Response-Time-Ms`
  • Production Edge-Case & Pitfall Guard (Custom Request-Response Middleware)
โ†’ What Topic Is Next: Next Topic 16.6: Django Signals and Decoupled Hooks
Guide โ†’

`post_save`, `pre_delete`, `@receiver`, and why explicit `services.py` calls are strongly preferred over hidden implicit `post_save` signal chains!

Subtopics Covered (8):
  • `post_save`
  • `pre_delete`
  • `@receiver`
โ†’ What Topic Is Next: Next Topic 16.7: Custom Model Managers and QuerySets
Guide โ†’

Writing `class JobQuerySet(models.QuerySet): def published(self): ... def with_relations(self): ...` exposed via `objects = JobQuerySet.as_manager()`

Subtopics Covered (8):
  • Writing `class JobQuerySet(models.QuerySet): def published(self): ... def with_relations(self): ...` exposed via `objects = JobQuerySet.as_manager()`
  • Production Edge-Case & Pitfall Guard (Custom Model Managers and QuerySets)
  • Hands-On Python Implementation & Verification (Custom Model Managers and QuerySets)
โ†’ What Topic Is Next: Next Topic 16.8: Eliminating N+1 Queries in DRF Serializers
Guide โ†’

Spotting `SerializerMethodField` per-row queries (`obj.applications.count()` firing `N` `SELECT COUNT(*)` queries!) and fixing with QuerySet `annotate(applications_c...

Subtopics Covered (8):
  • Spotting `SerializerMethodField` per-row queries (`obj.applications.count()` firing `N` `SELECT COUNT(*)` queries!)
  • Fixing with QuerySet `annotate(applications_count=Count("applications"))`
  • Production Edge-Case & Pitfall Guard (Eliminating N+1 Queries in DRF Serializers)
โ†’ What Topic Is Next: Next Topic 16.9: Database Atomicity with transaction.atomic
Guide โ†’

`@transaction.atomic` / `with transaction.atomic():`, nested savepoints, `select_for_update()` row locks, and `transaction.on_commit()` for Celery/email side effects

Subtopics Covered (8):
  • `@transaction.atomic` / `with transaction.atomic():`
  • Nested savepoints
  • `select_for_update()` row locks
โ†’ What Topic Is Next: Next Topic 16.10: Django Cache Framework
Guide โ†’

`CACHES` configuration, low-level `cache.get(key)` / `cache.set(key, val, timeout=300)` / `cache.get_or_set()`, cache key versioning, and avoiding full-page cache on...

Subtopics Covered (8):
  • `CACHES` configuration
  • Low-level `cache.get(key)` / `cache.set(key
  • Val
โ†’ What Topic Is Next: Next Topic 16.11: Redis Cache Backend Integration
Guide โ†’

Configuring `django.core.cache.backends.redis.RedisCache` (`REDIS_URL`), TTL tuning, atomic `cache.incr()`, and graceful degradation when Redis restarts

Subtopics Covered (8):
  • Configuring `django.core.cache.backends.redis.RedisCache` (`REDIS_URL`)
  • TTL tuning
  • Atomic `cache.incr()`
โ†’ What Topic Is Next: Next Topic 16.12: Background Jobs with Celery Fundamentals
Guide โ†’

Installing `celery[redis]`, configuring `config/celery.py`, `@shared_task`, `CELERY_TASK_SERIALIZER = "json"` (never pickle!), and passing lightweight IDs (not ORM o...

Subtopics Covered (8):
  • Installing `celery[redis]`
  • Configuring `config/celery.py`
  • `@shared_task`
โ†’ What Topic Is Next: Next Topic 16.13: Asynchronous Task Queues in Django
Guide โ†’

Starting `celery -A config worker -l info`, idempotent task design, `autoretry_for=(TimeoutError,)`, `retry_backoff=True`, `max_retries=3`, and `CELERY_TASK_TIME_LIM...

Subtopics Covered (8):
  • Starting `celery -A config worker -l info`
  • Idempotent task design
  • `autoretry_for=(TimeoutError
โ†’ What Topic Is Next: Next Topic 16.14: Background Transactional Email Processing
Guide โ†’

Offloading registration welcome, password reset, and application-shortlisted emails to Celery via `transaction.on_commit()` with delivery status tracking

Subtopics Covered (8):
  • Offloading registration welcome
  • Password reset
  • Application-shortlisted emails to Celery via `transaction.on_commit()` with delivery status tracking
โ†’ What Topic Is Next: Next Topic 16.15: Structured Production Logging
Guide โ†’

Configuring Django `LOGGING` dict (`version: 1`, JSON/structured formatters, `request_id` filter, `django.request` & `apps` loggers, zero sensitive PII/token logging...

Subtopics Covered (8):
  • Configuring Django `LOGGING` dict (`version: 1`
  • JSON/structured formatters
  • `request_id` filter
โ†’ What Topic Is Next: Next Topic 16.16: Django Automated Test Framework
Guide โ†’

`django.test.TestCase` (per-test DB transaction rollback!) vs `SimpleTestCase` (no DB), `setUpTestData` class-level fixture speedup, and `override_settings`

Subtopics Covered (8):
  • `django.test.TestCase` (per-test DB transaction rollback!) vs `SimpleTestCase` (no DB)
  • `setUpTestData` class-level fixture speedup
  • `override_settings`
โ†’ What Topic Is Next: Next Topic 16.17: REST Endpoint Testing with DRF APIClient
Guide โ†’

`rest_framework.test.APITestCase` & `APIClient`, `client.force_authenticate(user=...)` vs real JWT header tests, testing `200/201/204/400/401/403/404/409`

Subtopics Covered (8):
  • `rest_framework.test.APITestCase` & `APIClient`
  • `client.force_authenticate(user=...)` vs real JWT header tests
  • Testing `200/201/204/400/401/403/404/409`
โ†’ What Topic Is Next: Next Topic 16.18: Isolated Test Database Lifecycle
Guide โ†’

How Django creates/destroys `test_<dbname>`, `--keepdb` local iteration speedup, `--parallel`, and testing real PostgreSQL constraints (`CheckConstraint`, `UniqueCon...

Subtopics Covered (8):
  • How Django creates/destroys `test_<dbname>`
  • `--keepdb` local iteration speedup
  • `--parallel`
โ†’ What Topic Is Next: Next Topic 16.19: Split Development, Staging and Production Settings
Guide โ†’

`config/settings/base.py`, `dev.py`, `test.py`, `prod.py` selected via `DJANGO_SETTINGS_MODULE`, `CONN_MAX_AGE` persistent DB pooling, and fail-fast env checks

Subtopics Covered (8):
  • `config/settings/base.py`
  • `dev.py`
  • `test.py`
โ†’ What Topic Is Next: Next Topic 16.20: WSGI vs ASGI Application Server Interfaces
Guide โ†’

Synchronous PEP 3333 WSGI (`config.wsgi:application` with Gunicorn sync/gthread workers) vs asynchronous ASGI 3.0 (`config.asgi:application` with Uvicorn workers for...

Subtopics Covered (8):
  • Synchronous PEP 3333 WSGI (`config.wsgi:application` with Gunicorn sync/gthread workers) vs asynchronous ASGI 3.0 (`config.asgi:application` with Uvicorn workers for async views/WebSockets)
  • Production Edge-Case & Pitfall Guard (WSGI vs ASGI Application Server Interfaces)
  • Hands-On Python Implementation & Verification (WSGI vs ASGI Application Server Interfaces)
โ†’ What Topic Is Next: Next Topic 16.21: Django Production Deployment Checklist
Guide โ†’

Pre-launch verification: `DEBUG=False`, rotated `SECRET_KEY`, `ALLOWED_HOSTS`, `CSRF_TRUSTED_ORIGINS`, `migrate --noinput`, `collectstatic --noinput`, `/healthz`, lo...

Subtopics Covered (8):
  • Pre-launch verification: `DEBUG=False`
  • Rotated `SECRET_KEY`
  • `ALLOWED_HOSTS`
โ†’ What Topic Is Next: Module 16 Capstone (Project 4: Job Portal Backend using Django REST Framework) โ†’ Next Topic 17.1: FastAPI Architecture, Starlette and ASGI Use Cases

Build a complete, secure, database-driven Job Portal REST API using Django 5, Django REST Framework, PostgreSQL 16, SimpleJWT, Role-Based Authorization, validated PDF Resume Uploads, asynchronous/transactional Email Notifications, OpenAPI 3 / Swagger documentation, and automated `APIClient` tests.

โ€ข Modular Django 5 + DRF codebase (`accounts`, `candidates`, `companies`, `jobs`, `applications`)
โ€ข SimpleJWT auth + Candidate/Employer/Admin RBAC + magic-byte validated Resume Upload
โ€ข Interactive Swagger/OpenAPI (`drf-spectacular`) + exported Postman Collection
โ€ข 25+ automated `APIClient` tests (including RBAC negative & `assertNumQueries` checks)

Module Learning & Hands-On Objectives

โœ“ Explain FastAPIโ€™s Starlette (ASGI) + Pydantic v2 (Rust `pydantic-core`) architecture and boot apps cleanly with Uvicorn.
โœ“ Define self-validating, self-documenting endpoints using typed Path, Query (`Annotated[..., Query(...)]`), Header, Cookie, and JSON Body parameters.
โœ“ Author strict Pydantic v2 input/output schemas (`UserCreate` vs `UserOut` via `response_model`) preventing accidental secret leakage.
โœ“ Leverage FastAPIโ€™s `Depends()` Dependency Injection system for reusable pagination, auth, and service dependencies (and `dependency_overrides` in tests!).
โœ“ Handle `UploadFile` streams, lightweight `BackgroundTasks`, custom exception handlers, ASGI middleware, CORS, and `/docs` + `/redoc`.
Guide โ†’

How FastAPI combines Starlette (ASGI routing/WebSockets/middleware) + Pydantic v2 (Rust `pydantic-core` validation) + automatic OpenAPI 3.1 generation

Subtopics Covered (8):
  • How FastAPI combines Starlette (ASGI routing/WebSockets/middleware) + Pydantic v2 (Rust `pydantic-core` validation) + automatic OpenAPI 3.1 generation
  • Production Edge-Case & Pitfall Guard (FastAPI Architecture, Starlette and ASGI Use Cases)
  • Hands-On Python Implementation & Verification (FastAPI Architecture, Starlette and ASGI Use Cases)
โ†’ What Topic Is Next: Next Topic 17.2: FastAPI and Uvicorn Environment Setup
Guide โ†’

Installing `fastapi` + `uvicorn[standard]` (`uvloop` + `httptools`), running `uvicorn app.main:app --reload` in dev vs `--no-reload` in prod

Subtopics Covered (8):
  • Installing `fastapi` + `uvicorn[standard]` (`uvloop` + `httptools`)
  • Running `uvicorn app.main:app --reload` in dev vs `--no-reload` in prod
  • Production Edge-Case & Pitfall Guard (FastAPI and Uvicorn Environment Setup)
โ†’ What Topic Is Next: Next Topic 17.3: Scalable FastAPI Project Organization
Guide โ†’

Domain/layered layout: `app/{main.py, core/, api/v1/routers/, schemas/, models/, repositories/, services/}` vs single-file tutorials

Subtopics Covered (8):
  • Domain/layered layout: `app/{main.py
  • Core/
  • Api/v1/routers/
โ†’ What Topic Is Next: Next Topic 17.4: Path Operations (GET, POST, PUT, PATCH, DELETE)
Guide โ†’

`@router.get()`, `.post()`, `.put()`, `.patch()`, `.delete()`, operation `summary`/`tags`, and top-to-bottom route matching order (`/users/me` BEFORE `/users/{user_i...

Subtopics Covered (8):
  • `@router.get()`
  • `.post()`
  • `.put()`
โ†’ What Topic Is Next: Next Topic 17.5: Typed Path Parameters
Guide โ†’

Automatic conversion & `422` validation for `int`, `UUID`, `StrEnum` path parameters, plus `Annotated[int, Path(ge=1)]` constraints

Subtopics Covered (8):
  • Automatic conversion & `422` validation for `int`
  • `UUID`
  • `StrEnum` path parameters
โ†’ What Topic Is Next: Next Topic 17.6: Query Parameters and Filtering
Guide โ†’

Optional defaults (`q: str | None = None`), required queries, `Annotated[int, Query(ge=1, le=100)]`, and multi-value `tags: Annotated[list[str] | None, Query()] = No...

Subtopics Covered (8):
  • Optional defaults (`q: str | None = None`)
  • Required queries
  • `Annotated[int
โ†’ What Topic Is Next: Next Topic 17.7: JSON Request Bodies
Guide โ†’

Automatic JSON parsing into Pydantic `BaseModel` parameters, combining Path + Query + Body parameters cleanly, and `Body(embed=True)`

Subtopics Covered (8):
  • Automatic JSON parsing into Pydantic `BaseModel` parameters
  • Combining Path + Query + Body parameters cleanly
  • `Body(embed=True)`
โ†’ What Topic Is Next: Next Topic 17.8: Pydantic v2 Data Validation Engine
Guide โ†’

Pydantic v2 Rust `pydantic-core` speed, `model_validate()`, `model_dump(exclude_unset=True)`, `ValidationError` structured JSON details, and `ConfigDict(extra="forbi...

Subtopics Covered (8):
  • Pydantic v2 Rust `pydantic-core` speed
  • `model_validate()`
  • `model_dump(exclude_unset=True)`
โ†’ What Topic Is Next: Next Topic 17.9: Defining Schemas with BaseModel
Guide โ†’

Separating `ProductBase`, `ProductCreate`, `ProductPatch` (all fields optional `| None = None`), `ProductOut` (`from_attributes=True`), and `ProductInDB`

Subtopics Covered (8):
  • Separating `ProductBase`
  • `ProductCreate`
  • `ProductPatch` (all fields optional `| None = None`)
โ†’ What Topic Is Next: Next Topic 17.10: Field Constraints with Pydantic Field()
Guide โ†’

`Field(min_length=2, max_length=120, pattern=...)`, `gt=0`, `ge=0`, `max_digits=12, decimal_places=2`, `EmailStr`, `HttpUrl`, and OpenAPI `examples`

Subtopics Covered (8):
  • `Field(min_length=2
  • Max_length=120
  • Pattern=...)`
โ†’ What Topic Is Next: Next Topic 17.11: Custom Validators (@field_validator and @model_validator)
Guide โ†’

Pydantic v2 `@field_validator("email", mode="before")` (`@classmethod`) normalization and `@model_validator(mode="after")` cross-field invariants

Subtopics Covered (8):
  • Pydantic v2 `@field_validator("email"
  • Mode="before")` (`@classmethod`) normalization
  • `@model_validator(mode="after")` cross-field invariants
โ†’ What Topic Is Next: Next Topic 17.12: Response Models and Output Filtering (response_model)
Guide โ†’

`response_model=ProductOut` (or `-> ProductOut` return annotation), `ConfigDict(from_attributes=True)` ORM serialization, and `response_model_exclude_none`

Subtopics Covered (8):
  • `response_model=ProductOut` (or `-> ProductOut` return annotation)
  • `ConfigDict(from_attributes=True)` ORM serialization
  • `response_model_exclude_none`
โ†’ What Topic Is Next: Next Topic 17.13: Explicit HTTP Status Codes
Guide โ†’

`status_code=status.HTTP_201_CREATED` on `POST`, `status.HTTP_204_NO_CONTENT` (returning `None`) on `DELETE`, `status.HTTP_202_ACCEPTED` for queued async jobs

Subtopics Covered (8):
  • `status_code=status.HTTP_201_CREATED` on `POST`
  • `status.HTTP_204_NO_CONTENT` (returning `None`) on `DELETE`
  • `status.HTTP_202_ACCEPTED` for queued async jobs
โ†’ What Topic Is Next: Next Topic 17.14: Dependency Injection with Depends()
Guide โ†’

`from fastapi import Depends`, `Annotated[PaginationParams, Depends()]`, sub-dependencies, per-request dependency caching, and `yield` teardown dependencies

Subtopics Covered (8):
  • `from fastapi import Depends`
  • `Annotated[PaginationParams
  • Depends()]`
โ†’ What Topic Is Next: Next Topic 17.15: Reusable Service and Auth Dependencies
Guide โ†’

Chaining `get_db -> get_product_repo -> get_product_service`, router-level `dependencies=[Depends(require_auth)]`, and parameterized `Depends(RequireRole("admin"))`...

Subtopics Covered (8):
  • Chaining `get_db -> get_product_repo -> get_product_service`
  • Router-level `dependencies=[Depends(require_auth)]`
  • Parameterized `Depends(RequireRole("admin"))` callables
โ†’ What Topic Is Next: Next Topic 17.16: Header and Cookie Parameters
Guide โ†’

`Annotated[str | None, Header()] = None` (auto hyphen-to-underscore `x_idempotency_key` <- `X-Idempotency-Key`), `Cookie()`, and setting `HttpOnly` cookies on `Respo...

Subtopics Covered (8):
  • `Annotated[str | None
  • Header()] = None` (auto hyphen-to-underscore `x_idempotency_key` <- `X-Idempotency-Key`)
  • `Cookie()`
โ†’ What Topic Is Next: Next Topic 17.17: Asynchronous File Uploads (UploadFile)
Guide โ†’

`file: UploadFile = File(...)` (`SpooledTemporaryFile` spilling to disk), streaming chunk validation (`await file.read(65536)`), magic-byte + size limits, and `await...

Subtopics Covered (8):
  • `file: UploadFile = File(...)` (`SpooledTemporaryFile` spilling to disk)
  • Streaming chunk validation (`await file.read(65536)`)
  • Magic-byte + size limits
โ†’ What Topic Is Next: Next Topic 17.18: In-Process Background Tasks (BackgroundTasks)
Guide โ†’

`background_tasks.add_task(fn, *args)` running AFTER HTTP response is sent vs when durable Celery + Redis/RabbitMQ is required instead

Subtopics Covered (8):
  • `background_tasks.add_task(fn
  • *args)` running AFTER HTTP response is sent vs when durable Celery + Redis/RabbitMQ is required instead
  • Production Edge-Case & Pitfall Guard (In-Process Background Tasks (BackgroundTasks))
โ†’ What Topic Is Next: Next Topic 17.19: HTTPException and Custom Exception Handlers
Guide โ†’

`raise HTTPException(status_code=..., detail=...)`, `@app.exception_handler(DomainError)` translating pure domain exceptions into clean HTTP responses, and overridin...

Subtopics Covered (8):
  • `raise HTTPException(status_code=...
  • Detail=...)`
  • `@app.exception_handler(DomainError)` translating pure domain exceptions into clean HTTP responses
โ†’ What Topic Is Next: Next Topic 17.20: Custom ASGI / HTTP Middleware
Guide โ†’

`@app.middleware("http")` (`call_next(request)`), adding `X-Request-ID` & `X-Process-Time-Ms` headers, and pure ASGI middleware ordering (LIFO stack!)

Subtopics Covered (8):
  • `@app.middleware("http")` (`call_next(request)`)
  • Adding `X-Request-ID` & `X-Process-Time-Ms` headers
  • Pure ASGI middleware ordering (LIFO stack!)
โ†’ What Topic Is Next: Next Topic 17.21: CORS Middleware Configuration
Guide โ†’

`from fastapi.middleware.cors import CORSMiddleware`, explicit `allow_origins` list, `allow_methods`, `allow_headers`, `expose_headers=["X-Request-ID"]`

Subtopics Covered (8):
  • `from fastapi.middleware.cors import CORSMiddleware`
  • Explicit `allow_origins` list
  • `allow_methods`
โ†’ What Topic Is Next: Next Topic 17.22: Automatic OpenAPI 3 Schema Generation
Guide โ†’

Customizing `FastAPI(title=..., version="1.0.0", openapi_tags=...)`, `responses={404: {"model": ErrorOut}, 409: ...}`, and disabling `/openapi.json` in locked-down e...

Subtopics Covered (8):
  • Customizing `FastAPI(title=...
  • Version="1.0.0"
  • Openapi_tags=...)`
โ†’ What Topic Is Next: Next Topic 17.23: Interactive API Testing with Swagger UI (/docs)
Guide โ†’

Testing OAuth2/Bearer endpoints directly in `/docs`, `swagger_ui_parameters={"persistAuthorization": True}`, and request/response schema examples

Subtopics Covered (8):
  • Testing OAuth2/Bearer endpoints directly in `/docs`
  • `swagger_ui_parameters={"persistAuthorization": True}`
  • Request/response schema examples
โ†’ What Topic Is Next: Next Topic 17.24: API Reference Documentation with ReDoc (/redoc)
Guide โ†’

Clean 3-pane `/redoc` reference docs, Markdown descriptions in route docstrings, and exporting static `openapi.json` artifacts in CI

Subtopics Covered (8):
  • Clean 3-pane `/redoc` reference docs
  • Markdown descriptions in route docstrings
  • Exporting static `openapi.json` artifacts in CI
โ†’ What Topic Is Next: Next Topic 17.25: Environment Configuration Fundamentals
Guide โ†’

Centralizing `APP_ENV`, `CORS_ORIGINS`, `MAX_UPLOAD_MB` with startup validation and `@lru_cache` singleton injection via `Depends(get_settings)`

Subtopics Covered (8):
  • Centralizing `APP_ENV`
  • `CORS_ORIGINS`
  • `MAX_UPLOAD_MB` with startup validation
โ†’ What Topic Is Next: Module 17 Capstone (Week 17 Lab Build: Type-Safe FastAPI & Pydantic v2 Catalog REST Service) โ†’ Next Topic 18.1: Modular FastAPI Application Architecture

Build a fast ASGI Product & Category API using FastAPI, Uvicorn, strict Pydantic v2 `ConfigDict(extra="forbid")` input/output schemas, `Depends()` pagination/auth injection, chunked `UploadFile`, custom exception handlers, and `/docs` + `/redoc`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Architect modular FastAPI services (`APIRouter` -> `Service` -> `Repository` -> `AsyncSession`) with zero SQL inside route handlers.
โœ“ Integrate Async SQLAlchemy 2.0 (`asyncpg`, `AsyncSession`, `expire_on_commit=False`) and async-configured `Alembic` migrations cleanly.
โœ“ Distinguish `async def` (runs on event loop โ€” MUST ONLY call non-blocking `await` I/O!) vs plain `def` (FastAPI runs in threadpool!).
โœ“ Secure FastAPI APIs with `pydantic-settings`, Argon2/Bcrypt (`pwdlib`), OAuth2/JWT tokens, and composable `Depends` RBAC guards.
โœ“ Implement generic pagination, dynamic filtering/sorting, `/api/v1` router versioning, pooled `httpx.AsyncClient`, global error envelopes, and JSON logging.
Guide โ†’

Application factory `def create_app() -> FastAPI:`, clean layering (`api` -> `services` -> `repositories` -> `models`), and dependency inversion

Subtopics Covered (8):
  • Application factory `def create_app() -> FastAPI:`
  • Clean layering (`api` -> `services` -> `repositories` -> `models`)
  • Dependency inversion
โ†’ What Topic Is Next: Next Topic 18.2: Feature Routing with APIRouter
Guide โ†’

`APIRouter(prefix="/products", tags=["Products"])`, aggregating into `api_v1_router`, and shared router-level dependencies/responses

Subtopics Covered (8):
  • `APIRouter(prefix="/products"
  • Tags=["Products"])`
  • Aggregating into `api_v1_router`
โ†’ What Topic Is Next: Next Topic 18.3: Service Layer Business Logic Separation
Guide โ†’

`OrderService` orchestrating inventory checks, pricing math, repository writes, and transaction commit/rollback cleanly

Subtopics Covered (8):
  • `OrderService` orchestrating inventory checks
  • Pricing math
  • Repository writes
โ†’ What Topic Is Next: Next Topic 18.4: Repository Pattern for Data Access
Guide โ†’

Encapsulating `AsyncSession` `select()`, `add()`, `flush()`, eager `selectinload`/`joinedload` queries inside `ProductRepository`

Subtopics Covered (8):
  • Encapsulating `AsyncSession` `select()`
  • `add()`
  • `flush()`
โ†’ What Topic Is Next: Next Topic 18.5: SQLAlchemy 2.0 Integration with FastAPI
Guide โ†’

Mapping SQLAlchemy `DeclarativeBase` models cleanly to Pydantic `ConfigDict(from_attributes=True)` schemas without lazy-load surprises

Subtopics Covered (8):
  • Mapping SQLAlchemy `DeclarativeBase` models cleanly to Pydantic `ConfigDict(from_attributes=True)` schemas without lazy-load surprises
  • Production Edge-Case & Pitfall Guard (SQLAlchemy 2.0 Integration with FastAPI)
  • Hands-On Python Implementation & Verification (SQLAlchemy 2.0 Integration with FastAPI)
โ†’ What Topic Is Next: Next Topic 18.6: Request-Scoped Database Session Dependency (yield)
Guide โ†’

`async def get_db() -> AsyncIterator[AsyncSession]: async with AsyncSessionLocal() as session: yield session` deterministic cleanup

Subtopics Covered (8):
  • `async def get_db() -> AsyncIterator[AsyncSession]: async with AsyncSessionLocal() as session: yield session` deterministic cleanup
  • Production Edge-Case & Pitfall Guard (Request-Scoped Database Session Dependency (yield))
  • Hands-On Python Implementation & Verification (Request-Scoped Database Session Dependency (yield))
โ†’ What Topic Is Next: Next Topic 18.7: Database-Backed CRUD REST APIs
Guide โ†’

Implementing async `POST` (`201`), `GET` list/detail (`200`/`404`), `PATCH` (`exclude_unset=True`), and `DELETE` (`204`) catching `IntegrityError` -> `409 Conflict`

Subtopics Covered (8):
  • Implementing async `POST` (`201`)
  • `GET` list/detail (`200`/`404`)
  • `PATCH` (`exclude_unset=True`)
โ†’ What Topic Is Next: Next Topic 18.8: Alembic Schema Migrations in FastAPI
Guide โ†’

Async Alembic template (`alembic init -t async migrations`), importing all `models` into `migrations/env.py` so `--autogenerate` sees every table!

Subtopics Covered (8):
  • Async Alembic template (`alembic init -t async migrations`)
  • Importing all `models` into `migrations/env.py` so `--autogenerate` sees every table!
  • Production Edge-Case & Pitfall Guard (Alembic Schema Migrations in FastAPI)
โ†’ What Topic Is Next: Next Topic 18.9: Async Route Functions (async def vs def)
Guide โ†’

Exact FastAPI concurrency execution rule: `async def` runs directly on the single event loop (non-blocking `await` ONLY!); plain `def` is dispatched to an external A...

Subtopics Covered (8):
  • Exact FastAPI concurrency execution rule: `async def` runs directly on the single event loop (non-blocking `await` ONLY!)
  • Plain `def` is dispatched to an external AnyIO worker threadpool
  • Production Edge-Case & Pitfall Guard (Async Route Functions (async def vs def))
โ†’ What Topic Is Next: Next Topic 18.10: Async SQLAlchemy (AsyncSession and asyncpg)
Guide โ†’

`create_async_engine("postgresql+asyncpg://...", pool_pre_ping=True)`, `async_sessionmaker(expire_on_commit=False)`, and `await engine.dispose()` on shutdown

Subtopics Covered (8):
  • `create_async_engine("postgresql+asyncpg://..."
  • Pool_pre_ping=True)`
  • `async_sessionmaker(expire_on_commit=False)`
โ†’ What Topic Is Next: Next Topic 18.11: Typed Settings with pydantic-settings
Guide โ†’

`from pydantic_settings import BaseSettings, SettingsConfigDict`, `SecretStr` (prevents accidental secret printing!), `.env` loading, and startup fail-fast validatio...

Subtopics Covered (8):
  • `from pydantic_settings import BaseSettings
  • SettingsConfigDict`
  • `SecretStr` (prevents accidental secret printing!)
โ†’ What Topic Is Next: Next Topic 18.12: FastAPI Security Utilities
Guide โ†’

`HTTPBearer`, `OAuth2PasswordBearer(tokenUrl="/api/v1/auth/token")`, `OAuth2PasswordRequestForm`, and automatic OpenAPI padlock integration

Subtopics Covered (8):
  • `HTTPBearer`
  • `OAuth2PasswordBearer(tokenUrl="/api/v1/auth/token")`
  • `OAuth2PasswordRequestForm`
โ†’ What Topic Is Next: Next Topic 18.13: OAuth2 Password Bearer Flow Fundamentals
Guide โ†’

Form-encoded `username` + `password` -> `{"access_token": "...", "token_type": "bearer"}` RFC 6749 contract vs OAuth2 Authorization Code + PKCE overview

Subtopics Covered (8):
  • Form-encoded `username` + `password` -> `{"access_token": "..."
  • "token_type": "bearer"}` RFC 6749 contract vs OAuth2 Authorization Code + PKCE overview
  • Production Edge-Case & Pitfall Guard (OAuth2 Password Bearer Flow Fundamentals)
โ†’ What Topic Is Next: Next Topic 18.14: Stateless JWT Access and Refresh Tokens
Guide โ†’

Encoding/verifying JWTs with `PyJWT` (`jwt.encode` / `jwt.decode(..., algorithms=["HS256"])`), `typ` claim (`"access"` vs `"refresh"`!), `exp`, `sub`, and `jti`

Subtopics Covered (8):
  • Encoding/verifying JWTs with `PyJWT` (`jwt.encode` / `jwt.decode(...
  • Algorithms=["HS256"])`)
  • `typ` claim (`"access"` vs `"refresh"`!)
โ†’ What Topic Is Next: Next Topic 18.15: Secure Password Hashing (Argon2 / Bcrypt)
Guide โ†’

Modern `pwdlib` (`PasswordHash.recommended()` using Argon2id, recommended by FastAPI docs over unmaintained `passlib`!), offloading CPU-bound hashing via `asyncio.to...

Subtopics Covered (8):
  • Modern `pwdlib` (`PasswordHash.recommended()` using Argon2id
  • Recommended by FastAPI docs over unmaintained `passlib`!)
  • Offloading CPU-bound hashing via `asyncio.to_thread`
โ†’ What Topic Is Next: Next Topic 18.16: Role-Based Authorization Checks
Guide โ†’

Checking `user.is_active` + `user.role` (`customer`, `vendor`, `admin`) + resource ownership (`order.user_id == current_user.id`) cleanly

Subtopics Covered (8):
  • Checking `user.is_active` + `user.role` (`customer`
  • `vendor`
  • `admin`) + resource ownership (`order.user_id == current_user.id`) cleanly
โ†’ What Topic Is Next: Next Topic 18.17: Dependency-Based Security Guards
Guide โ†’

Composable `CurrentUser = Annotated[User, Depends(get_current_active_user)]` and `AdminUser = Annotated[User, Depends(require_roles(Role.ADMIN))]` type aliases

Subtopics Covered (8):
  • Composable `CurrentUser = Annotated[User
  • Depends(get_current_active_user)]`
  • `AdminUser = Annotated[User
โ†’ What Topic Is Next: Next Topic 18.18: Paginated API Responses
Guide โ†’

Generic `PaginatedResponse[T]` (`items: list[T]`, `total: int`, `limit: int`, `offset: int`, `has_more: bool`) + parallel/sequential `SELECT COUNT(*)` + `LIMIT/OFFSE...

Subtopics Covered (8):
  • Generic `PaginatedResponse[T]` (`items: list[T]`
  • `total: int`
  • `limit: int`
โ†’ What Topic Is Next: Next Topic 18.19: Dynamic Query Filtering
Guide โ†’

Typed `ProductFilterParams` dependency building conditional `.where(...)` clauses (`category_id`, `in_stock`, `price_min`, `price_max`, `q` `ilike`)

Subtopics Covered (8):
  • Typed `ProductFilterParams` dependency building conditional `.where(...)` clauses (`category_id`
  • `in_stock`
  • `price_min`
โ†’ What Topic Is Next: Next Topic 18.20: Dynamic Multi-Column Sorting
Guide โ†’

Mapping validated `Literal["created_at", "price", "name"]` sort keys + `Literal["asc", "desc"]` to whitelisted SQLAlchemy column attributes (NEVER `getattr(Model, ra...

Subtopics Covered (8):
  • Mapping validated `Literal["created_at"
  • "price"
  • "name"]` sort keys + `Literal["asc"
โ†’ What Topic Is Next: Next Topic 18.21: Versioned FastAPI Routers (/api/v1)
Guide โ†’

Prefixing `/api/v1` via `APIRouter`, sub-application `app.mount("/api/v2", app_v2)` option for separate OpenAPI docs, and `Sunset`/`Deprecation` headers

Subtopics Covered (8):
  • Prefixing `/api/v1` via `APIRouter`
  • Sub-application `app.mount("/api/v2"
  • App_v2)` option for separate OpenAPI docs
โ†’ What Topic Is Next: Next Topic 18.22: External API Integration with httpx.AsyncClient
Guide โ†’

Creating ONE pooled `httpx.AsyncClient(timeout=httpx.Timeout(5.0, connect=2.0))` in `app.state` via `lifespan` and injecting it via `Depends(get_http_client)`

Subtopics Covered (8):
  • Creating ONE pooled `httpx.AsyncClient(timeout=httpx.Timeout(5.0
  • Connect=2.0))` in `app.state` via `lifespan`
  • Injecting it via `Depends(get_http_client)`
โ†’ What Topic Is Next: Next Topic 18.23: Global Exception Handling Middleware
Guide โ†’

Unified RFC 7807 Problem Details / structured error JSON across `DomainError`, `HTTPException`, `RequestValidationError`, and catch-all `500` handler (preserving `X-...

Subtopics Covered (8):
  • Unified RFC 7807 Problem Details / structured error JSON across `DomainError`
  • `HTTPException`
  • `RequestValidationError`
โ†’ What Topic Is Next: Next Topic 18.24: Structured JSON Application Logging
Guide โ†’

Formatting every log record as single-line JSON (`timestamp`, `level`, `service`, `request_id`, `method`, `path`, `status_code`, `duration_ms`) with PII redaction

Subtopics Covered (8):
  • Formatting every log record as single-line JSON (`timestamp`
  • `level`
  • `service`
โ†’ What Topic Is Next: Module 18 Capstone (Week 18 Lab Build: Async SQLAlchemy 2.0 + JWT RBAC Order Backend) โ†’ Next Topic 19.1: Monolithic Application Design

Connect FastAPI non-blockingly to PostgreSQL via `asyncpg` + `AsyncSession(expire_on_commit=False)`, async `Alembic`, `pydantic-settings` (`SecretStr`), `pwdlib` Argon2 + `PyJWT` access/refresh tokens, `httpx.AsyncClient` lifespan pooling, and JSON logging.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Evaluate Modular Monolith vs Microservices trade-offs honestly and identify clean Domain-Driven Bounded Contexts.
โœ“ Choose accurately between synchronous HTTP/REST, `gRPC` RPCs, and asynchronous Event-Driven Broker messaging.
โœ“ Enforce Database-per-Service data ownership and coordinate multi-service workflows using Choreography/Orchestration Sagas with compensating actions.
โœ“ Prevent cascading distributed outages using strict Timeouts, Exponential Backoff + Jitter Retries, Circuit Breakers, and `Idempotency-Key` deduplication.
โœ“ Trace requests end-to-end across services with `X-Correlation-ID`, Prometheus/OpenTelemetry observability fundamentals, and internal JWT/mTLS auth.
Guide โ†’

Well-structured Modular Monolith strengths: single ACID database transaction, in-memory function calls (`ns` vs `ms` network), simple deployment & debugging

Subtopics Covered (8):
  • Well-structured Modular Monolith strengths: single ACID database transaction
  • In-memory function calls (`ns` vs `ms` network)
  • Simple deployment & debugging
โ†’ What Topic Is Next: Next Topic 19.2: Microservices and Service-Oriented Architecture
Guide โ†’

Independently deployable, business-capability-aligned services owning their own data and communicating over well-defined network contracts

Subtopics Covered (8):
  • Independently deployable
  • Business-capability-aligned services owning their own data
  • Communicating over well-defined network contracts
โ†’ What Topic Is Next: Next Topic 19.3: Monolith vs Microservices Architectural Trade-Offs
Guide โ†’

Fallacies of Distributed Computing: network latency, partial failures, eventual consistency, distributed debugging, CI/CD & DevOps overhead

Subtopics Covered (8):
  • Fallacies of Distributed Computing: network latency
  • Partial failures
  • Eventual consistency
โ†’ What Topic Is Next: Next Topic 19.4: Service Boundaries and Bounded Contexts
Guide โ†’

Cutting boundaries along business capabilities (high internal cohesion, low external chatty coupling) rather than technical layers

Subtopics Covered (8):
  • Cutting boundaries along business capabilities (high internal cohesion
  • Low external chatty coupling) rather than technical layers
  • Production Edge-Case & Pitfall Guard (Service Boundaries and Bounded Contexts)
โ†’ What Topic Is Next: Next Topic 19.5: Domain-Driven Design (DDD) Fundamentals
Guide โ†’

Ubiquitous Language, Entities (identity), Value Objects (`Money`, `Address`), Aggregates (transactional consistency boundary), and Domain Events (`OrderPlaced`)

Subtopics Covered (8):
  • Ubiquitous Language
  • Entities (identity)
  • Value Objects (`Money`
โ†’ What Topic Is Next: Next Topic 19.6: Independent Service Deployment
Guide โ†’

Backward-compatible API & event schema evolution (Expand-and-Contract), independent Git/CI pipelines, and zero lockstep coordinated releases

Subtopics Covered (8):
  • Backward-compatible API & event schema evolution (Expand-
  • -Contract)
  • Independent Git/CI pipelines
โ†’ What Topic Is Next: Next Topic 19.7: Synchronous Inter-Service Communication
Guide โ†’

Request-response blocking chains (`Gateway -> Order -> Inventory -> Payment`), latency addition, and availability multiplication (`0.99^4 = 96%`!)

Subtopics Covered (8):
  • Request-response blocking chains (`Gateway -> Order -> Inventory -> Payment`)
  • Latency addition
  • Availability multiplication (`0.99^4 = 96%`!)
โ†’ What Topic Is Next: Next Topic 19.8: HTTP/REST Service Integration
Guide โ†’

Internal REST contracts with `httpx.AsyncClient`, typed Pydantic client response validation, connection pooling, and explicit connect/read timeouts

Subtopics Covered (8):
  • Internal REST contracts with `httpx.AsyncClient`
  • Typed Pydantic client response validation
  • Connection pooling
โ†’ What Topic Is Next: Next Topic 19.9: gRPC and Protocol Buffers Fundamentals
Guide โ†’

Contract-first `.proto` schemas, binary Protobuf serialization, HTTP/2 multiplexing, generated Python stubs, and when gRPC beats JSON REST

Subtopics Covered (8):
  • Contract-first `.proto` schemas
  • Binary Protobuf serialization
  • HTTP/2 multiplexing
โ†’ What Topic Is Next: Next Topic 19.10: API Gateway Architecture
Guide โ†’

Single north-south entry point (Nginx / Kong / Traefik / FastAPI Gateway): path routing, TLS termination, JWT edge verification, rate limiting, and CORS

Subtopics Covered (8):
  • Single north-south entry point (Nginx / Kong / Traefik / FastAPI Gateway): path routing
  • TLS termination
  • JWT edge verification
โ†’ What Topic Is Next: Next Topic 19.11: Service Registration and Discovery Fundamentals
Guide โ†’

Dynamic container IP resolution via Docker Compose DNS / Kubernetes CoreDNS (`http://inventory-service:8003`) vs client-side registry (Consul/Eureka) concepts

Subtopics Covered (8):
  • Dynamic container IP resolution via Docker Compose DNS / Kubernetes CoreDNS (`http://inventory-service:8003`) vs client-side registry (Consul/Eureka) concepts
  • Production Edge-Case & Pitfall Guard (Service Registration and Discovery Fundamentals)
  • Hands-On Python Implementation & Verification (Service Registration and Discovery Fundamentals)
โ†’ What Topic Is Next: Next Topic 19.12: Centralized and Distributed Configuration
Guide โ†’

12-Factor environment injection, ConfigMaps/Secrets, startup schema validation via `pydantic-settings`, and dynamic feature-flag concepts

Subtopics Covered (8):
  • 12-Factor environment injection
  • ConfigMaps/Secrets
  • Startup schema validation via `pydantic-settings`
โ†’ What Topic Is Next: Next Topic 19.13: Data Ownership (Database-per-Service)
Guide โ†’

Strict rule: ONLY `inventory-service` reads/writes `inventory_db`! Other services access inventory strictly via API or published domain events

Subtopics Covered (8):
  • Strict rule: ONLY `inventory-service` reads/writes `inventory_db`! Other services access inventory strictly via API or published domain events
  • Production Edge-Case & Pitfall Guard (Data Ownership (Database-per-Service))
  • Hands-On Python Implementation & Verification (Data Ownership (Database-per-Service))
โ†’ What Topic Is Next: Next Topic 19.14: Distributed Transaction Consistency Challenges
Guide โ†’

Why 2-Phase Commit (`2PC` / XA) locks struggle across independent services/brokers, eventual consistency, and the Dual-Write Problem (DB commit succeeds, Kafka publi...

Subtopics Covered (8):
  • Why 2-Phase Commit (`2PC` / XA) locks struggle across independent services/brokers
  • Eventual consistency
  • The Dual-Write Problem (DB commit succeeds
โ†’ What Topic Is Next: Next Topic 19.15: Saga Pattern (Choreography and Orchestration)
Guide โ†’

Sequencing local ACID transactions across services (`Order PENDING -> Reserve Stock -> Charge Payment -> Order CONFIRMED`) + compensating undo actions (`Release Stoc...

Subtopics Covered (8):
  • Sequencing local ACID transactions across services (`Order PENDING -> Reserve Stock -> Charge Payment -> Order CONFIRMED`) + compensating undo actions (`Release Stock`
  • `Cancel Order`) on failure!
  • Production Edge-Case & Pitfall Guard (Saga Pattern (Choreography and Orchestration))
โ†’ What Topic Is Next: Next Topic 19.16: Event-Driven Architecture
Guide โ†’

Decoupled producers & consumers (`OrderPlaced`, `StockReserved`, `PaymentCaptured`), Event Notification vs Event-Carried State Transfer, and schema versioning

Subtopics Covered (8):
  • Decoupled producers & consumers (`OrderPlaced`
  • `StockReserved`
  • `PaymentCaptured`)
โ†’ What Topic Is Next: Next Topic 19.17: Message Broker Fundamentals
Guide โ†’

Smart broker / flexible routing (`RabbitMQ` AMQP task/work queues) vs distributed append-only commit log (`Apache Kafka` high-throughput replayable event streams)

Subtopics Covered (8):
  • Smart broker / flexible routing (`RabbitMQ` AMQP task/work queues) vs distributed append-only commit log (`Apache Kafka` high-throughput replayable event streams)
  • Production Edge-Case & Pitfall Guard (Message Broker Fundamentals)
  • Hands-On Python Implementation & Verification (Message Broker Fundamentals)
โ†’ What Topic Is Next: Next Topic 19.18: Retry Mechanisms with Exponential Backoff
Guide โ†’

Retrying ONLY transient errors (`502/503/504`, `ConnectTimeout`) โ€” NEVER `400/401/403/404/422`! โ€” with exponential backoff `2^attempt` + random jitter (`tenacity`)

Subtopics Covered (8):
  • Retrying ONLY transient errors (`502/503/504`
  • `ConnectTimeout`) โ€” NEVER `400/401/403/404/422`! โ€” with exponential backoff `2^attempt` + random jitter (`tenacity`)
  • Production Edge-Case & Pitfall Guard (Retry Mechanisms with Exponential Backoff)
โ†’ What Topic Is Next: Next Topic 19.19: Request Timeouts and Deadline Propagation
Guide โ†’

Explicit connect timeout (`2s`) + read timeout (`3s`) on EVERY outbound socket (HTTP, DB, Redis, SMTP) so hung dependencies never exhaust worker pools

Subtopics Covered (8):
  • Explicit connect timeout (`2s`) + read timeout (`3s`) on EVERY outbound socket (HTTP
  • Redis
  • SMTP) so hung dependencies never exhaust worker pools
โ†’ What Topic Is Next: Next Topic 19.20: Circuit Breaker Failure Isolation
Guide โ†’

State machine: `CLOSED` (normal) -> failure threshold exceeded -> `OPEN` (fail fast `< 1ms` without calling dead downstream!) -> cooldown -> `HALF_OPEN` probe -> `CL...

Subtopics Covered (8):
  • State machine: `CLOSED` (normal) -> failure threshold exceeded -> `OPEN` (fail fast `< 1ms` without calling dead downstream!) -> cooldown -> `HALF_OPEN` probe -> `CLOSED`
  • Production Edge-Case & Pitfall Guard (Circuit Breaker Failure Isolation)
  • Hands-On Python Implementation & Verification (Circuit Breaker Failure Isolation)
โ†’ What Topic Is Next: Next Topic 19.21: Idempotency Keys for Safe Retries
Guide โ†’

Storing `Idempotency-Key` (`UNIQUE (user_id, idempotency_key)`) + request payload hash + cached response in PostgreSQL/Redis AND `processed_events(event_id PK)` for...

Subtopics Covered (8):
  • Storing `Idempotency-Key` (`UNIQUE (user_id
  • Idempotency_key)`) + request payload hash + cached response in PostgreSQL/Redis
  • `processed_events(event_id PK)` for broker consumers
โ†’ What Topic Is Next: Next Topic 19.22: Observability Pillars (Logs, Metrics, Traces)
Guide โ†’

Three pillars: Structured Logs (what happened), Metrics โ€” RED rate/errors/duration histograms (`prometheus-client`), and Distributed Traces (`OpenTelemetry` spans)

Subtopics Covered (8):
  • Three pillars: Structured Logs (what happened)
  • Metrics โ€” RED rate/errors/duration histograms (`prometheus-client`)
  • Distributed Traces (`OpenTelemetry` spans)
โ†’ What Topic Is Next: Next Topic 19.23: Correlation IDs for Distributed Request Tracing
Guide โ†’

Generating `X-Correlation-ID` at the API Gateway and forwarding it automatically on every outbound `httpx` header AND every Celery/RabbitMQ/Kafka message header!

Subtopics Covered (8):
  • Generating `X-Correlation-ID` at the API Gateway
  • Forwarding it automatically on every outbound `httpx` header
  • Every Celery/RabbitMQ/Kafka message header!
โ†’ What Topic Is Next: Next Topic 19.24: Service-to-Service Authentication
Guide โ†’

Zero-trust internal security: verifying `aud` (audience) + `iss` (issuer) claims on internal service JWTs, HMAC webhook signatures (`hmac.compare_digest`), and priva...

Subtopics Covered (8):
  • Zero-trust internal security: verifying `aud` (audience) + `iss` (issuer) claims on internal service JWTs
  • HMAC webhook signatures (`hmac.compare_digest`)
  • Private Docker/VPC network isolation
โ†’ What Topic Is Next: Module 19 Capstone (Week 19 Lab Build: Resilient Two-Service Saga, Circuit Breaker & Idempotency Mesh) โ†’ Next Topic 20.1: Redis In-Memory Data Store Introduction

Connect `order-service` and `inventory-service` behind a lightweight API Gateway enforcing Database-per-Service, `Idempotency-Key` deduplication, Transactional Outbox, Circuit Breaker state machine, jittered retries, Saga stock release compensation, and `X-Correlation-ID`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Use Redis 7 (`redis.asyncio` / `redis-py`) fluently for sub-millisecond Cache-Aside caching, TTL jitter, invalidation, rate limiting, and distributed locks.
โœ“ Build durable background & scheduled jobs with Celery Workers, Celery Beat, exponential retries, and result backends.
โœ“ Route asynchronous workflows reliably over RabbitMQ AMQP (`Direct`, `Topic`, `Fanout` exchanges, manual `ack`, and Dead-Letter Queues).
โœ“ Publish and consume partitioned event streams with Apache Kafka (partition keys for per-order ordering, consumer groups, and manual offset commits).
โœ“ Deliver Major Project 5: a 6-service FastAPI E-Commerce Microservices Backend integrating PostgreSQL, SQLAlchemy, Redis, JWT, and RabbitMQ/Kafka.
Guide โ†’

Single-threaded event-loop command execution (atomic individual commands!), sub-millisecond RAM latency, RDB snapshots vs AOF persistence, and eviction policies (`al...

Subtopics Covered (8):
  • Single-threaded event-loop command execution (atomic individual commands!)
  • Sub-millisecond RAM latency
  • RDB snapshots vs AOF persistence
โ†’ What Topic Is Next: Next Topic 20.2: Redis Data Types (Strings, Lists, Sets, Hashes, Sorted Sets)
Guide โ†’

`STRING` (JSON cache, atomic `INCR`), `HASH` (field maps), `LIST` (queues), `SET` (unique tags/online users), and `ZSET` Sorted Sets (leaderboards & sliding-window r...

Subtopics Covered (8):
  • `STRING` (JSON cache
  • Atomic `INCR`)
  • `HASH` (field maps)
โ†’ What Topic Is Next: Next Topic 20.3: Core Redis CLI and redis-py Commands
Guide โ†’

`redis.asyncio.from_url(REDIS_URL, decode_responses=True)`, connection pooling, `pipeline()` batching multiple commands in 1 network roundtrip, and `SET ... NX EX`

Subtopics Covered (8):
  • `redis.asyncio.from_url(REDIS_URL
  • Decode_responses=True)`
  • Connection pooling
โ†’ What Topic Is Next: Next Topic 20.4: Application Response and Query Caching
Guide โ†’

Namespaced versioned cache keys (`prod:v1:product:{id}`), JSON Pydantic `model_dump_json()` / `model_validate_json()`, and measuring cache hit ratio

Subtopics Covered (8):
  • Namespaced versioned cache keys (`prod:v1:product:{id}`)
  • JSON Pydantic `model_dump_json()` / `model_validate_json()`
  • Measuring cache hit ratio
โ†’ What Topic Is Next: Next Topic 20.5: Cache Expiration and TTL Management
Guide โ†’

Mandatory `ex=` TTL on every cache key, TTL jitter (`300 + random.randint(0, 45)`) preventing Cache Avalanche (mass simultaneous expiration!), and caching negative `...

Subtopics Covered (8):
  • Mandatory `ex=` TTL on every cache key
  • TTL jitter (`300 + random.randint(0
  • 45)`) preventing Cache Avalanche (mass simultaneous expiration!)
โ†’ What Topic Is Next: Next Topic 20.6: Cache Invalidation and Consistency
Guide โ†’

Explicit `await redis.delete(key)` AFTER PostgreSQL commit on `PATCH`/`DELETE` (delete rather than overwrite to avoid concurrent write-order races!)

Subtopics Covered (8):
  • Explicit `await redis.delete(key)` AFTER PostgreSQL commit on `PATCH`/`DELETE` (delete rather than overwrite to avoid concurrent write-order races!)
  • Production Edge-Case & Pitfall Guard (Cache Invalidation and Consistency)
  • Hands-On Python Implementation & Verification (Cache Invalidation and Consistency)
โ†’ What Topic Is Next: Next Topic 20.7: Cache-Aside Strategy
Guide โ†’

Read-through vs Write-through vs lazy Cache-Aside (`1. Check Redis -> 2. Miss: Query DB -> 3. SET Redis with TTL`) + single-flight lock against Cache Stampede on hot...

Subtopics Covered (8):
  • Read-through vs Write-through vs lazy Cache-Aside (`1. Check Redis -> 2. Miss: Query DB -> 3. SET Redis with TTL`) + single-flight lock against Cache Stampede on hot keys
  • Production Edge-Case & Pitfall Guard (Cache-Aside Strategy)
  • Hands-On Python Implementation & Verification (Cache-Aside Strategy)
โ†’ What Topic Is Next: Next Topic 20.8: Distributed Locks with Redis
Guide โ†’

`SET lock_key unique_token NX PX 10000` acquisition AND atomic Lua compare-and-delete release (`if redis.call("get", KEYS[1]) == ARGV[1] then return redis.call("del"...

Subtopics Covered (8):
  • `SET lock_key unique_token NX PX 10000` acquisition
  • Atomic Lua compare-
  • -delete release (`if redis.call("get"
โ†’ What Topic Is Next: Next Topic 20.9: Celery Distributed Task Queue Architecture
Guide โ†’

Producer (FastAPI/Django) -> Message Broker (Redis/RabbitMQ) -> Celery Worker Pool -> Result Backend architecture

Subtopics Covered (8):
  • Producer (FastAPI/Django) -> Message Broker (Redis/RabbitMQ) -> Celery Worker Pool -> Result Backend architecture
  • Production Edge-Case & Pitfall Guard (Celery Distributed Task Queue Architecture)
  • Hands-On Python Implementation & Verification (Celery Distributed Task Queue Architecture)
โ†’ What Topic Is Next: Next Topic 20.10: Celery Worker Configuration and Concurrency
Guide โ†’

Prefork (`--concurrency=4`) vs I/O pools, `task_acks_late = True` + `worker_prefetch_multiplier = 1` for fair, crash-safe long-task distribution

Subtopics Covered (8):
  • Prefork (`--concurrency=4`) vs I/O pools
  • `task_acks_late = True` + `worker_prefetch_multiplier = 1` for fair
  • Crash-safe long-task distribution
โ†’ What Topic Is Next: Next Topic 20.11: Defining Background Celery Tasks
Guide โ†’

Idempotent task functions taking primitive JSON arguments (`order_id: str`), explicit `soft_time_limit` / `time_limit`, and structured task correlation logging

Subtopics Covered (8):
  • Idempotent task functions taking primitive JSON arguments (`order_id: str`)
  • Explicit `soft_time_limit` / `time_limit`
  • Structured task correlation logging
โ†’ What Topic Is Next: Next Topic 20.12: Periodic Task Scheduling with Celery Beat
Guide โ†’

`beat_schedule` (`crontab(minute="*/15")`), expiring unpaid pending orders after 30 minutes, and running STRICTLY ONE `celery beat` scheduler instance!

Subtopics Covered (8):
  • `beat_schedule` (`crontab(minute="*/15")`)
  • Expiring unpaid pending orders after 30 minutes
  • Running STRICTLY ONE `celery beat` scheduler instance!
โ†’ What Topic Is Next: Next Topic 20.13: Task Retries and Failure Backoff
Guide โ†’

`autoretry_for=(httpx.TransportError,)`, `retry_backoff=True`, `retry_jitter=True`, `max_retries=5`, and handling final `MaxRetriesExceededError` alerts

Subtopics Covered (8):
  • `autoretry_for=(httpx.TransportError
  • `retry_backoff=True`
  • `retry_jitter=True`
โ†’ What Topic Is Next: Next Topic 20.14: Celery Result Backends
Guide โ†’

`AsyncResult(task_id)` polling (`PENDING`, `STARTED`, `SUCCESS`, `FAILURE`), `result_expires = 3600` (preventing Redis RAM bloat!), and `ignore_result=True` on fire-...

Subtopics Covered (8):
  • `AsyncResult(task_id)` polling (`PENDING`
  • `STARTED`
  • `SUCCESS`
โ†’ What Topic Is Next: Next Topic 20.15: RabbitMQ Message Broker Architecture
Guide โ†’

AMQP 0-9-1 model: Producer -> Exchange -> Binding (Routing Key) -> Durable Queue -> Consumer, virtual hosts (`vhost`), and management UI (`:15672`)

Subtopics Covered (8):
  • AMQP 0-9-1 model: Producer -> Exchange -> Binding (Routing Key) -> Durable Queue -> Consumer
  • Virtual hosts (`vhost`)
  • Management UI (`:15672`)
โ†’ What Topic Is Next: Next Topic 20.16: AMQP Exchanges (Direct, Topic, Fanout)
Guide โ†’

`Direct` (exact routing key), `Topic` (wildcard `order.*`, `#.failed` pattern matching!), and `Fanout` (broadcast to ALL bound queues ignoring routing key)

Subtopics Covered (8):
  • `Direct` (exact routing key)
  • `Topic` (wildcard `order.*`
  • `#.failed` pattern matching!)
โ†’ What Topic Is Next: Next Topic 20.17: Durable Queues and Bindings
Guide โ†’

`durable=True` queue declaration, `DeliveryMode.PERSISTENT` (`delivery_mode=2`) messages, idempotent startup topology declaration, and `prefetch_count`

Subtopics Covered (8):
  • `durable=True` queue declaration
  • `DeliveryMode.PERSISTENT` (`delivery_mode=2`) messages
  • Idempotent startup topology declaration
โ†’ What Topic Is Next: Next Topic 20.18: Message Routing Keys
Guide โ†’

Designing hierarchical `<domain>.<entity>.<event>` routing keys (`ecom.order.placed`, `ecom.payment.captured`) for clean observability and selective subscription

Subtopics Covered (8):
  • Designing hierarchical `<domain>.<entity>.<event>` routing keys (`ecom.order.placed`
  • `ecom.payment.captured`) for clean observability
  • Selective subscription
โ†’ What Topic Is Next: Next Topic 20.19: RabbitMQ Producers and Consumers (aio-pika / pika)
Guide โ†’

`aio_pika.connect_robust()` auto-reconnecting async channels, publishing Pydantic JSON bytes with `message_id` & `correlation_id`, and `queue.iterator()` consumption

Subtopics Covered (8):
  • `aio_pika.connect_robust()` auto-reconnecting async channels
  • Publishing Pydantic JSON bytes with `message_id` & `correlation_id`
  • `queue.iterator()` consumption
โ†’ What Topic Is Next: Next Topic 20.20: Message Acknowledgements (ack and nack)
Guide โ†’

Manual acknowledgement AFTER DB commit (`async with message.process(requeue=False):`) vs `auto_ack=True` data-loss danger, and `nack(requeue=True vs False)`

Subtopics Covered (8):
  • Manual acknowledgement AFTER DB commit (`async with message.process(requeue=False):`) vs `auto_ack=True` data-loss danger
  • `nack(requeue=True vs False)`
  • Production Edge-Case & Pitfall Guard (Message Acknowledgements (ack and nack))
โ†’ What Topic Is Next: Next Topic 20.21: Dead-Letter Queues (DLQ)
Guide โ†’

Configuring `x-dead-letter-exchange` + `x-dead-letter-routing-key` on primary queues so rejected/expired messages land safely in `orders.dlq` for inspection & replay

Subtopics Covered (8):
  • Configuring `x-dead-letter-exchange` + `x-dead-letter-routing-key` on primary queues so rejected/expired messages land safely in `orders.dlq` for inspection & replay
  • Production Edge-Case & Pitfall Guard (Dead-Letter Queues (DLQ))
  • Hands-On Python Implementation & Verification (Dead-Letter Queues (DLQ))
โ†’ What Topic Is Next: Next Topic 20.22: Apache Kafka Distributed Event Streaming Introduction
Guide โ†’

Immutable append-only distributed commit log vs traditional queue (consuming a Kafka event does NOT delete it โ€” retention is time/size-based, enabling full replay!)

Subtopics Covered (8):
  • Immutable append-only distributed commit log vs traditional queue (consuming a Kafka event does NOT delete it โ€” retention is time/size-based
  • Enabling full replay!)
  • Production Edge-Case & Pitfall Guard (Apache Kafka Distributed Event Streaming Introduction)
โ†’ What Topic Is Next: Next Topic 20.23: Kafka Architecture (Brokers, Topics, Partitions)
Guide โ†’

KRaft mode (modern ZooKeeper-less Kafka!), Brokers, Topics split into ordered Partitions (`P0, P1, P2`), Partition Leaders/Replicas, and Partition Key hashing (`hash...

Subtopics Covered (8):
  • KRaft mode (modern ZooKeeper-less Kafka!)
  • Brokers
  • Topics split into ordered Partitions (`P0
โ†’ What Topic Is Next: Next Topic 20.24: Publishing Events with Kafka Producers
Guide โ†’

`aiokafka.AIOKafkaProducer` / `confluent-kafka`, `acks="all"` durability, `enable_idempotence=True`, batching (`linger_ms`), and partition `key`

Subtopics Covered (8):
  • `aiokafka.AIOKafkaProducer` / `confluent-kafka`
  • `acks="all"` durability
  • `enable_idempotence=True`
โ†’ What Topic Is Next: Next Topic 20.25: Reading Events with Kafka Consumers
Guide โ†’

`AIOKafkaConsumer`, `auto_offset_reset="earliest"`, deserializing + validating Pydantic schemas, error isolation (DLQ topic `<topic>.dlq`), and idempotent DB dedupli...

Subtopics Covered (8):
  • `AIOKafkaConsumer`
  • `auto_offset_reset="earliest"`
  • Deserializing + validating Pydantic schemas
โ†’ What Topic Is Next: Next Topic 20.26: Consumer Groups for Parallel Scaling
Guide โ†’

`group_id` partition assignment: 1 partition is assigned to AT MOST 1 consumer within the same `group_id` (so `> num_partitions` consumers sit idle!), rebalance awar...

Subtopics Covered (8):
  • `group_id` partition assignment: 1 partition is assigned to AT MOST 1 consumer within the same `group_id` (so `> num_partitions` consumers sit idle!)
  • Rebalance awareness
  • Production Edge-Case & Pitfall Guard (Consumer Groups for Parallel Scaling)
โ†’ What Topic Is Next: Next Topic 20.27: Kafka Offsets and At-Least-Once Delivery
Guide โ†’

Disable `enable_auto_commit=False` and call `await consumer.commit()` ONLY AFTER your PostgreSQL transaction commits (At-Least-Once + Idempotency)!

Subtopics Covered (8):
  • Disable `enable_auto_commit=False`
  • Call `await consumer.commit()` ONLY AFTER your PostgreSQL transaction commits (At-Least-Once + Idempotency)!
  • Production Edge-Case & Pitfall Guard (Kafka Offsets and At-Least-Once Delivery)
โ†’ What Topic Is Next: Next Topic 20.28: Event-Driven Integration Across FastAPI Services
Guide โ†’

Wiring the complete 6-service E-Commerce workflow (`User`, `Product`, `Inventory`, `Order`, `Payment`, `Notification`) over FastAPI + PostgreSQL + Redis + Celery + R...

Subtopics Covered (8):
  • Wiring the complete 6-service E-Commerce workflow (`User`
  • `Product`
  • `Inventory`
โ†’ What Topic Is Next: Module 20 Capstone (Project 5: E-Commerce Microservices Backend using FastAPI) โ†’ Next Topic 21.1: Software Testing Fundamentals

Architect and implement an independently structured 6-service E-Commerce Microservices Backend (`User Service`, `Product Service`, `Inventory Service`, `Order Service`, `Payment Simulation Service`, and `Notification Service`) using FastAPI, PostgreSQL, Async SQLAlchemy 2.0, Redis caching/locks, RabbitMQ or Apache Kafka messaging, Celery background workers, JWT authentication, and an API Gateway.

โ€ข 6 independently structured FastAPI services + API Gateway routing & `X-Correlation-ID` tracing
โ€ข PostgreSQL Database-per-Service schemas + Redis Cache-Aside + `Idempotency-Key` checkout
โ€ข RabbitMQ (with DLQ) or Kafka event pipeline + Celery background worker + Saga compensation
โ€ข Automated `pytest` suite + `compose.yaml` + Architecture & Sequence Diagrams

Module Learning & Hands-On Objectives

โœ“ Write fast, deterministic unit and integration suites using `unittest` and `pytest` (`conftest.py` fixtures, `@pytest.mark.parametrize`, `pytest.raises`).
โœ“ Isolate external SMTP, payment gateway, and S3 dependencies cleanly using `unittest.mock.patch` and `AsyncMock` (patching where imported/looked up!).
โœ“ Test Django/DRF (`APIClient`) and async FastAPI (`httpx.AsyncClient` + `ASGITransport` + transactional DB rollback) across `2xx`, `400`, `401`, `403`, `404`, `409`, and `422`.
โœ“ Enforce `>= 80%` meaningful test coverage (`pytest-cov` / `Coverage.py`) including negative, auth, and cross-tenant RBAC boundary cases.
โœ“ Automate formatting, linting, and static type gates with `Ruff`, `Black`, and `mypy` before every Git commit/PR.
Guide โ†’

Arrange-Act-Assert (AAA) structure, deterministic repeatability (no sleep/network/clock flakiness!), and catching regressions in CI before deploy

Subtopics Covered (8):
  • Arrange-Act-Assert (AAA) structure
  • Deterministic repeatability (no sleep/network/clock flakiness!)
  • Catching regressions in CI before deploy
โ†’ What Topic Is Next: Next Topic 21.2: Testing Pyramid (Unit, Integration, Functional)
Guide โ†’

Fast pure-Python Unit tests (70%) + real-DB/API Integration tests (25%) + end-to-end smoke workflows (5%)

Subtopics Covered (8):
  • Fast pure-Python Unit tests (70%) + real-DB/API Integration tests (25%) + end-to-end smoke workflows (5%)
  • Production Edge-Case & Pitfall Guard (Testing Pyramid (Unit, Integration, Functional))
  • Hands-On Python Implementation & Verification (Testing Pyramid (Unit, Integration, Functional))
โ†’ What Topic Is Next: Next Topic 21.3: Test-Driven Development (TDD) Fundamentals
Guide โ†’

Red (write failing test specifying requirement) -> Green (minimal passing implementation) -> Refactor (clean up while keeping tests green)

Subtopics Covered (8):
  • Red (write failing test specifying requirement) -> Green (minimal passing implementation) -> Refactor (clean up while keeping tests green)
  • Production Edge-Case & Pitfall Guard (Test-Driven Development (TDD) Fundamentals)
  • Hands-On Python Implementation & Verification (Test-Driven Development (TDD) Fundamentals)
โ†’ What Topic Is Next: Next Topic 21.4: Python Built-In unittest Framework
Guide โ†’

`unittest.TestCase`, `setUp`/`tearDown`, `self.assertEqual`/`assertRaises`, and why Djangoโ€™s `django.test.TestCase` subclasses `unittest.TestCase`

Subtopics Covered (8):
  • `unittest.TestCase`
  • `setUp`/`tearDown`
  • `self.assertEqual`/`assertRaises`
โ†’ What Topic Is Next: Next Topic 21.5: Pytest Setup, Configuration and Execution
Guide โ†’

Installing `pytest` + `pytest-asyncio` + `pytest-cov`, configuring `[tool.pytest.ini_options]` in `pyproject.toml`, `-k` filter, `-x` stop-on-first-fail, `--lf` last...

Subtopics Covered (8):
  • Installing `pytest` + `pytest-asyncio` + `pytest-cov`
  • Configuring `[tool.pytest.ini_options]` in `pyproject.toml`
  • `-k` filter
โ†’ What Topic Is Next: Next Topic 21.6: Writing Expressive Pytest Test Functions
Guide โ†’

Descriptive `test_<unit>_<scenario>_<expected>()` naming (`test_apply_job_when_already_applied_returns_409`), plain `assert` introspection

Subtopics Covered (8):
  • Descriptive `test_<unit>_<scenario>_<expected>()` naming (`test_apply_job_when_already_applied_returns_409`)
  • Plain `assert` introspection
  • Production Edge-Case & Pitfall Guard (Writing Expressive Pytest Test Functions)
โ†’ What Topic Is Next: Next Topic 21.7: Assertions and Exception Checks (pytest.raises)
Guide โ†’

Rich `pytest` diffing on dicts/lists, `pytest.approx()` for floats, and `with pytest.raises(InsufficientFundsError, match="Balance"):`

Subtopics Covered (8):
  • Rich `pytest` diffing on dicts/lists
  • `pytest.approx()` for floats
  • `with pytest.raises(InsufficientFundsError
โ†’ What Topic Is Next: Next Topic 21.8: Reusable Test State with Pytest Fixtures
Guide โ†’

`@pytest.fixture(scope="function" | "module" | "session")` in `conftest.py`, composable dependency injection, `yield` teardown, and `tmp_path` built-in fixture

Subtopics Covered (8):
  • `@pytest.fixture(scope="function" | "module" | "session")` in `conftest.py`
  • Composable dependency injection
  • `yield` teardown
โ†’ What Topic Is Next: Next Topic 21.9: Data-Driven Testing (@pytest.mark.parametrize)
Guide โ†’

Running 12 boundary/invalid input cases cleanly via `@pytest.mark.parametrize("payload,expected_status", [...], ids=[...])` without copy-pasting 12 functions

Subtopics Covered (8):
  • Running 12 boundary/invalid input cases cleanly via `@pytest.mark.parametrize("payload
  • Expected_status"
  • [...]
โ†’ What Topic Is Next: Next Topic 21.10: Test Doubles and Mocking Concepts
Guide โ†’

Dummy, Fake (`FakePaymentGateway`), Stub, Spy, and Mock โ€” choosing lightweight in-memory Fakes/Protocol implementations vs `unittest.mock`

Subtopics Covered (8):
  • Dummy
  • Fake (`FakePaymentGateway`)
  • Stub
โ†’ What Topic Is Next: Next Topic 21.11: unittest.mock (Mock, MagicMock and patch)
Guide โ†’

`patch("app.services.orders.payment_client", autospec=True)`, `MagicMock`, `AsyncMock` (for `await` coroutines!), `return_value`, `side_effect`, and `assert_called_o...

Subtopics Covered (8):
  • `patch("app.services.orders.payment_client"
  • Autospec=True)`
  • `MagicMock`
โ†’ What Topic Is Next: Next Topic 21.12: REST API Endpoint Testing Principles
Guide โ†’

Verifying HTTP status code + response JSON schema + response headers + actual database state mutation + queued side effects on every endpoint test

Subtopics Covered (8):
  • Verifying HTTP status code + response JSON schema + response headers + actual database state mutation + queued side effects on every endpoint test
  • Production Edge-Case & Pitfall Guard (REST API Endpoint Testing Principles)
  • Hands-On Python Implementation & Verification (REST API Endpoint Testing Principles)
โ†’ What Topic Is Next: Next Topic 21.13: Django Test Client
Guide โ†’

Testing Django views, middleware headers, redirects, and template context using `django.test.Client` and `pytest-django` (`@pytest.mark.django_db`)

Subtopics Covered (8):
  • Testing Django views
  • Middleware headers
  • Redirects
โ†’ What Topic Is Next: Next Topic 21.14: DRF APIClient Testing
Guide โ†’

`APIClient()` `format="json"` requests, multipart `SimpleUploadedFile("resume.pdf", b"%PDF-1.7...", content_type="application/pdf")` upload tests, and `django_assert...

Subtopics Covered (8):
  • `APIClient()` `format="json"` requests
  • Multipart `SimpleUploadedFile("resume.pdf"
  • B"%PDF-1.7..."
โ†’ What Topic Is Next: Next Topic 21.15: FastAPI TestClient and AsyncClient Testing
Guide โ†’

Sync `TestClient(app)` vs native async `async with httpx.AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as ac:` + `app.dependency_overrides`

Subtopics Covered (8):
  • Sync `TestClient(app)` vs native async `async with httpx.AsyncClient(transport=ASGITransport(app=app)
  • Base_url="http://test") as ac:` + `app.dependency_overrides`
  • Production Edge-Case & Pitfall Guard (FastAPI TestClient and AsyncClient Testing)
โ†’ What Topic Is Next: Next Topic 21.16: Isolated Test Databases and Transaction Rollbacks
Guide โ†’

Nested SAVEPOINT rollback per test: create tables once per session, open outer transaction + SAVEPOINT per test, and `rollback()` in `< 3ms` after each test!

Subtopics Covered (8):
  • Nested SAVEPOINT rollback per test: create tables once per session
  • Open outer transaction + SAVEPOINT per test
  • `rollback()` in `< 3ms` after each test!
โ†’ What Topic Is Next: Next Topic 21.17: Multi-Component Integration Testing
Guide โ†’

Testing full vertical slices (`HTTP Router -> Pydantic -> Service -> SQLAlchemy -> PostgreSQL -> Redis Cache`) together with real containers in CI

Subtopics Covered (8):
  • Testing full vertical slices (`HTTP Router -> Pydantic -> Service -> SQLAlchemy -> PostgreSQL -> Redis Cache`) together with real containers in CI
  • Production Edge-Case & Pitfall Guard (Multi-Component Integration Testing)
  • Hands-On Python Implementation & Verification (Multi-Component Integration Testing)
โ†’ What Topic Is Next: Next Topic 21.18: Testing JWT-Protected Authentication Endpoints
Guide โ†’

Testing valid Bearer JWT, missing header (`401`), malformed token (`401`), expired `exp` token (`401`), wrong signature (`401`), and refresh token misused as access...

Subtopics Covered (8):
  • Testing valid Bearer JWT
  • Missing header (`401`)
  • Malformed token (`401`)
โ†’ What Topic Is Next: Next Topic 21.19: Testing Role-Based Authorization Boundaries
Guide โ†’

Systematic RBAC & BOLA/IDOR matrix testing: Candidate calling Employer route (`403`), Employer B editing Employer Aโ€™s job (`403`/`404`), non-admin calling `/admin/*`...

Subtopics Covered (8):
  • Systematic RBAC & BOLA/IDOR matrix testing: Candidate calling Employer route (`403`)
  • Employer B editing Employer Aโ€™s job (`403`/`404`)
  • Non-admin calling `/admin/*` (`403`)
โ†’ What Topic Is Next: Next Topic 21.20: Negative Testing for Invalid Payloads and Edge Cases
Guide โ†’

Testing missing required fields, extra forbidden fields, negative quantities, empty strings, oversized `10 MB` uploads, duplicate `409` submissions, and `404` missin...

Subtopics Covered (8):
  • Testing missing required fields
  • Extra forbidden fields
  • Negative quantities
โ†’ What Topic Is Next: Next Topic 21.21: Measuring Test Coverage with Coverage.py
Guide โ†’

`pytest --cov=app --cov-branch --cov-report=term-missing --cov-fail-under=80`, branch coverage vs line coverage, and inspecting uncovered error branches

Subtopics Covered (8):
  • `pytest --cov=app --cov-branch --cov-report=term-missing --cov-fail-under=80`
  • Branch coverage vs line coverage
  • Inspecting uncovered error branches
โ†’ What Topic Is Next: Next Topic 21.22: Fast Python Linting with Ruff
Guide โ†’

Configuring `Ruff` (10โ€“100x faster Rust linter replacing Flake8 + isort + pyupgrade + bandit rules: `E`, `F`, `I`, `B` bugbear, `UP`, `S` security) via `ruff check ....

Subtopics Covered (8):
  • Configuring `Ruff` (10โ€“100x faster Rust linter replacing Flake8 + isort + pyupgrade + bandit rules: `E`
  • `F`
  • `I`
โ†’ What Topic Is Next: Next Topic 21.23: Deterministic Code Formatting with Black
Guide โ†’

`black --check .` / `ruff format --check .` zero-debate PEP 8 formatting (`line-length = 88/100`) eliminating style bikeshedding in PR diffs

Subtopics Covered (8):
  • `black --check .` / `ruff format --check .` zero-debate PEP 8 formatting (`line-length = 88/100`) eliminating style bikeshedding in PR diffs
  • Production Edge-Case & Pitfall Guard (Deterministic Code Formatting with Black)
  • Hands-On Python Implementation & Verification (Deterministic Code Formatting with Black)
โ†’ What Topic Is Next: Next Topic 21.24: Static Type Checking with mypy Fundamentals
Guide โ†’

Running `mypy app`, `disallow_untyped_defs = true`, `check_untyped_defs = true`, catching `None` attribute errors (`Optional` narrowing) before code ever runs!

Subtopics Covered (8):
  • Running `mypy app`
  • `disallow_untyped_defs = true`
  • `check_untyped_defs = true`
โ†’ What Topic Is Next: Next Topic 21.25: Static Code Analysis in Pre-Commit Hooks
Guide โ†’

`.pre-commit-config.yaml` (`ruff`, `black`/`ruff-format`, `mypy`, `detect-secrets`, `check-yaml`, `no-commit-to-branch` on `main`) catching issues in `< 1s` locally

Subtopics Covered (8):
  • `.pre-commit-config.yaml` (`ruff`
  • `black`/`ruff-format`
  • `mypy`
โ†’ What Topic Is Next: Next Topic 21.26: Maintainability and Code Review Best Practices
Guide โ†’

Small cohesive functions, explicit typing, cyclomatic complexity bounds, structured error handling, security checklist, and empathetic actionable PR feedback

Subtopics Covered (8):
  • Small cohesive functions
  • Explicit typing
  • Cyclomatic complexity bounds
โ†’ What Topic Is Next: Module 21 Capstone (Week 21 Lab Build: >= 80% Coverage Pytest, AsyncMock, Ruff & mypy Quality Gate) โ†’ Next Topic 22.1: Linux Operating System Fundamentals

Verify both DRF (`APIClient`) and FastAPI (`httpx.AsyncClient` + `ASGITransport`) services with transactional DB rollback fixtures, `@pytest.mark.parametrize`, `AsyncMock`, BOLA cross-tenant negative tests, `pytest-cov >= 80%`, `Ruff`, `Black`, and `mypy`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Operate Ubuntu Linux servers confidently over SSH using filesystem, permission (`chmod`/`chown`), process (`ps`/`systemctl`), and network (`curl`/`ss`) commands.
โœ“ Write lean, secure, non-root multi-stage `python:3.12-slim` `Dockerfile`s with `.dockerignore` and `PYTHONDONTWRITEBYTECODE=1` / `PYTHONUNBUFFERED=1`.
โœ“ Orchestrate full-stack `docker-compose.yml` environments (FastAPI/Django + PostgreSQL + Redis + Celery Worker + Nginx) with healthchecks and persistent volumes.
โœ“ Run Python in production behind Nginx reverse proxy using Gunicorn (`UvicornWorker` for FastAPI ASGI / WSGI workers for Django) with graceful shutdown.
โœ“ Automate Lint -> Typecheck -> Pytest (with Postgres/Redis service containers) -> Docker Build -> Deploy in GitHub Actions and understand AWS EC2/S3/IAM/RDS.
Guide โ†’

Kernel vs user space, FHS directory layout (`/etc`, `/var/log`, `/opt`, `/tmp`, `/home`), package manager (`apt`), and why 99% of Python containers/servers run Linux

Subtopics Covered (8):
  • Kernel vs user space
  • FHS directory layout (`/etc`
  • `/var/log`
โ†’ What Topic Is Next: Next Topic 22.2: Essential Linux File Commands (pwd, ls, cd, mkdir, rm, cp)
Guide โ†’

`pwd`, `ls -lah`, `cd`, `mkdir -p`, `cp -r`, `mv`, `rm` (careful with `-rf`!), `cat`, `head`, `tail -f`, `grep -rn`, and `find`

Subtopics Covered (8):
  • `pwd`
  • `ls -lah`
  • `cd`
โ†’ What Topic Is Next: Next Topic 22.3: Linux File Ownership and Permissions (chmod and chown)
Guide โ†’

Octal bits (`r=4, w=2, x=1`): `chmod 600` (`~/.ssh/id_ed25519`, `.env`), `chmod 755` (`entrypoint.sh`), `chown -R appuser:appgroup`, and least privilege

Subtopics Covered (8):
  • Octal bits (`r=4
  • W=2
  • X=1`): `chmod 600` (`~/.ssh/id_ed25519`
โ†’ What Topic Is Next: Next Topic 22.4: Process Management (ps, top, kill, systemctl)
Guide โ†’

`ps aux`, `top`/`htop`, graceful `SIGTERM` (`kill -15`) vs last-resort `SIGKILL` (`kill -9`), exit codes (`0` vs non-zero), and `systemd` (`systemctl status/restart`...

Subtopics Covered (8):
  • `ps aux`
  • `top`/`htop`
  • Graceful `SIGTERM` (`kill -15`) vs last-resort `SIGKILL` (`kill -9`)
โ†’ What Topic Is Next: Next Topic 22.5: Networking Diagnostics (curl, ping, ss/netstat)
Guide โ†’

`curl -i -f http://localhost:8000/healthz`, inspecting headers (`curl -I`), listening sockets `ss -tulpn`, `127.0.0.1` loopback vs `0.0.0.0` all interfaces, and DNS...

Subtopics Covered (8):
  • `curl -i -f http://localhost:8000/healthz`
  • Inspecting headers (`curl -I`)
  • Listening sockets `ss -tulpn`
โ†’ What Topic Is Next: Next Topic 22.6: Linux Environment Variables and Shell Profiles
Guide โ†’

`export KEY=VAL`, `env`/`printenv`, subshell inheritance, `EnvironmentFile=` in `systemd`, and avoiding secrets on CLI arguments (visible in `ps aux`!)

Subtopics Covered (8):
  • `export KEY=VAL`
  • `env`/`printenv`
  • Subshell inheritance
โ†’ What Topic Is Next: Next Topic 22.7: Secure Remote Server Access with SSH
Guide โ†’

`ssh-keygen -t ed25519`, `~/.ssh/authorized_keys`, disabling password auth & root login in `/etc/ssh/sshd_config`, `~/.ssh/config`, and `scp`/`rsync`

Subtopics Covered (8):
  • `ssh-keygen -t ed25519`
  • `~/.ssh/authorized_keys`
  • Disabling password auth & root login in `/etc/ssh/sshd_config`
โ†’ What Topic Is Next: Next Topic 22.8: Basic Linux Server Administration
Guide โ†’

`ufw` firewall (`allow OpenSSH`, `allow 80,443/tcp`, keep `5432`/`6379` private!), disk usage (`df -h`, `du -sh`), log rotation (`logrotate`), and unattended securit...

Subtopics Covered (8):
  • `ufw` firewall (`allow OpenSSH`
  • `allow 80
  • 443/tcp`
โ†’ What Topic Is Next: Next Topic 22.9: Containers vs Virtual Machines (Docker Introduction)
Guide โ†’

Shared Linux kernel namespaces (`pid`, `net`, `mnt`, `user`) + `cgroups` resource limits vs full guest-OS hypervisor VMs, solving "works on my machine"

Subtopics Covered (8):
  • Shared Linux kernel namespaces (`pid`
  • `net`
  • `mnt`
โ†’ What Topic Is Next: Next Topic 22.10: Docker Engine Setup
Guide โ†’

Docker Desktop (WSL 2 backend on Windows) & Docker Engine CE on Ubuntu Linux, verifying `docker info` and BuildKit

Subtopics Covered (8):
  • Docker Desktop (WSL 2 backend on Windows) & Docker Engine CE on Ubuntu Linux
  • Verifying `docker info`
  • BuildKit
โ†’ What Topic Is Next: Next Topic 22.11: Docker Architecture (Client, Daemon, Registry)
Guide โ†’

`docker` CLI -> REST socket -> `dockerd`/`containerd` -> OCI runtime (`runc`), UnionFS copy-on-write layers, and Registries (GHCR `ghcr.io`, ECR, Docker Hub)

Subtopics Covered (8):
  • `docker` CLI -> REST socket -> `dockerd`/`containerd` -> OCI runtime (`runc`)
  • UnionFS copy-on-write layers
  • Registries (GHCR `ghcr.io`
โ†’ What Topic Is Next: Next Topic 22.12: Pulling and Tagging Docker Images
Guide โ†’

Choosing `python:3.12-slim-bookworm` over bloated `python:3.12` (`~1 GB` vs `~130 MB`) or musl `alpine` (breaks C-extension manylinux wheels!), tagging `:git-sha` +...

Subtopics Covered (8):
  • Choosing `python:3.12-slim-bookworm` over bloated `python:3.12` (`~1 GB` vs `~130 MB`) or musl `alpine` (breaks C-extension manylinux wheels!)
  • Tagging `:git-sha` + `:v1.0.0`
  • Production Edge-Case & Pitfall Guard (Pulling and Tagging Docker Images)
โ†’ What Topic Is Next: Next Topic 22.13: Running and Managing Containers
Guide โ†’

Ephemeral stateless containers, PID 1 signal forwarding (`exec` form `CMD ["gunicorn", ...]`, NEVER shell string form!), exit code diagnosis, and `--restart unless-s...

Subtopics Covered (8):
  • Ephemeral stateless containers
  • PID 1 signal forwarding (`exec` form `CMD ["gunicorn"
  • ...]`
โ†’ What Topic Is Next: Next Topic 22.14: Writing Multi-Stage Python Dockerfiles
Guide โ†’

Stage 1 (`builder` compiling wheels into `/opt/venv`) -> Stage 2 (`runtime` copying `/opt/venv` + `app/`), `.dockerignore`, `PYTHONDONTWRITEBYTECODE=1`, `PYTHONUNBUF...

Subtopics Covered (8):
  • Stage 1 (`builder` compiling wheels into `/opt/venv`) -> Stage 2 (`runtime` copying `/opt/venv` + `app/`)
  • `.dockerignore`
  • `PYTHONDONTWRITEBYTECODE=1`
โ†’ What Topic Is Next: Next Topic 22.15: Docker CLI Lifecycle Commands (build, run, stop, rm, logs)
Guide โ†’

`docker build -t ... .`, `docker run --rm -e ... -p ...`, `docker ps -a`, `docker logs -f --tail 100`, `docker exec -it <c> bash`, `docker inspect`, and `docker syst...

Subtopics Covered (8):
  • `docker build -t ... .`
  • `docker run --rm -e ... -p ...`
  • `docker ps -a`
โ†’ What Topic Is Next: Next Topic 22.16: Persistent Storage with Docker Volumes
Guide โ†’

Named Docker volumes (`postgres_data:/var/lib/postgresql/data`, `redis_data:/data`, `media_uploads`) surviving `docker compose down` vs `down -v` (DESTROYS volumes!)

Subtopics Covered (8):
  • Named Docker volumes (`postgres_data:/var/lib/postgresql/data`
  • `redis_data:/data`
  • `media_uploads`) surviving `docker compose down` vs `down -v` (DESTROYS volumes!)
โ†’ What Topic Is Next: Next Topic 22.17: User-Defined Container Networks
Guide โ†’

Custom bridge networks (`frontend_net` for `nginx <-> api`, `backend_net` internal for `api <-> db/redis`), automatic Docker DNS service-name resolution

Subtopics Covered (8):
  • Custom bridge networks (`frontend_net` for `nginx <-> api`
  • `backend_net` internal for `api <-> db/redis`)
  • Automatic Docker DNS service-name resolution
โ†’ What Topic Is Next: Next Topic 22.18: Multi-Container Stacks with Docker Compose
Guide โ†’

Authoring `compose.yaml` (`api`, `worker`, `beat`, `db`, `redis`, `nginx`) with `depends_on: db: condition: service_healthy` so `api` waits until PostgreSQL actually...

Subtopics Covered (8):
  • Authoring `compose.yaml` (`api`
  • `worker`
  • `beat`
โ†’ What Topic Is Next: Next Topic 22.19: .env Configuration and Secrets Handling
Guide โ†’

Docker Compose variable substitution `${POSTGRES_PASSWORD:?required}`, `env_file`, Docker/GitHub Secrets, and never baking credentials into image `ENV` or `ARG` laye...

Subtopics Covered (8):
  • Docker Compose variable substitution `${POSTGRES_PASSWORD:?required}`
  • `env_file`
  • Docker/GitHub Secrets
โ†’ What Topic Is Next: Next Topic 22.20: Containerizing PostgreSQL with Healthchecks
Guide โ†’

`postgres:16-alpine`, `pg_isready -U $POSTGRES_USER -d $POSTGRES_DB` healthcheck, `postgres_data` named volume, and running migrations as a dedicated init/release st...

Subtopics Covered (8):
  • `postgres:16-alpine`
  • `pg_isready -U $POSTGRES_USER -d $POSTGRES_DB` healthcheck
  • `postgres_data` named volume
โ†’ What Topic Is Next: Next Topic 22.21: Containerizing Redis for Cache and Queues
Guide โ†’

`redis:7-alpine`, `redis-cli ping` healthcheck, `--appendonly yes` AOF durability for Celery/rate-limit state, `--maxmemory` bounds, and password/ACL auth

Subtopics Covered (8):
  • `redis:7-alpine`
  • `redis-cli ping` healthcheck
  • `--appendonly yes` AOF durability for Celery/rate-limit state
โ†’ What Topic Is Next: Next Topic 22.22: Nginx Reverse Proxy Fundamentals
Guide โ†’

Why Nginx sits in front of Gunicorn/Uvicorn: TLS 1.3 termination, slow-client buffering (`client_max_body_size 6M`), gzip/zstd compression, static files, and forward...

Subtopics Covered (8):
  • Why Nginx sits in front of Gunicorn/Uvicorn: TLS 1.3 termination
  • Slow-client buffering (`client_max_body_size 6M`)
  • Gzip/zstd compression
โ†’ What Topic Is Next: Next Topic 22.23: Uvicorn ASGI Production Server
Guide โ†’

`uvicorn` event loop (`uvloop`), HTTP parser (`httptools`), `--proxy-headers`, `--timeout-keep-alive`, and graceful shutdown drain

Subtopics Covered (8):
  • `uvicorn` event loop (`uvloop`)
  • HTTP parser (`httptools`)
  • `--proxy-headers`
โ†’ What Topic Is Next: Next Topic 22.24: Gunicorn Process Manager with Uvicorn Workers
Guide โ†’

Running `gunicorn app.main:app -k uvicorn_worker.UvicornWorker --workers 2 --graceful-timeout 30 --max-requests 2000 --max-requests-jitter 200` (process supervision...

Subtopics Covered (8):
  • Running `gunicorn app.main:app -k uvicorn_worker.UvicornWorker --workers 2 --graceful-timeout 30 --max-requests 2000 --max-requests-jitter 200` (process supervision + multi-core scaling!)
  • Production Edge-Case & Pitfall Guard (Gunicorn Process Manager with Uvicorn Workers)
  • Hands-On Python Implementation & Verification (Gunicorn Process Manager with Uvicorn Workers)
โ†’ What Topic Is Next: Next Topic 22.25: End-to-End Python Backend Deployment
Guide โ†’

Zero-surprise release sequence: Pull image -> Run DB migrations (backward-compatible!) -> Healthcheck new container -> Swap traffic -> Verify `/readyz` & logs

Subtopics Covered (8):
  • Zero-surprise release sequence: Pull image -> Run DB migrations (backward-compatible!) -> Healthcheck new container -> Swap traffic -> Verify `/readyz` & logs
  • Production Edge-Case & Pitfall Guard (End-to-End Python Backend Deployment)
  • Hands-On Python Implementation & Verification (End-to-End Python Backend Deployment)
โ†’ What Topic Is Next: Next Topic 22.26: CI/CD Concepts (Continuous Integration and Delivery)
Guide โ†’

Automated quality gates on every PR (CI) vs automated staging/production artifact promotion on `main` merge/tag (CD)

Subtopics Covered (8):
  • Automated quality gates on every PR (CI) vs automated staging/production artifact promotion on `main` merge/tag (CD)
  • Production Edge-Case & Pitfall Guard (CI/CD Concepts (Continuous Integration and Delivery))
  • Hands-On Python Implementation & Verification (CI/CD Concepts (Continuous Integration and Delivery))
โ†’ What Topic Is Next: Next Topic 22.27: GitHub Actions Workflows (.github/workflows)
Guide โ†’

Triggers (`on: [push, pull_request]`), Ubuntu runners, `actions/setup-python@v5` (`cache: "pip"`), PostgreSQL 16 + Redis 7 `services:` containers, and GitHub Encrypt...

Subtopics Covered (8):
  • Triggers (`on: [push
  • Pull_request]`)
  • Ubuntu runners
โ†’ What Topic Is Next: Next Topic 22.28: Automated Lint, Pytest, Build and Deploy Pipeline
Guide โ†’

Chaining `lint` (`ruff check`, `ruff format --check`, `mypy`) + `test` (`alembic upgrade head`, `pytest --cov-fail-under=80`) + `docker` (`docker/build-push-action`)...

Subtopics Covered (8):
  • Chaining `lint` (`ruff check`
  • `ruff format --check`
  • `mypy`) + `test` (`alembic upgrade head`
โ†’ What Topic Is Next: Next Topic 22.29: AWS Cloud Fundamentals (EC2, S3, IAM, RDS)
Guide โ†’

Practical backend AWS literacy: `IAM` least-privilege roles (no root keys!), `EC2` + Security Groups, `S3` private buckets + presigned resume URLs (`boto3`), and man...

Subtopics Covered (8):
  • Practical backend AWS literacy: `IAM` least-privilege roles (no root keys!)
  • `EC2` + Security Groups
  • `S3` private buckets + presigned resume URLs (`boto3`)
โ†’ What Topic Is Next: Next Topic 22.30: Application Logs, Readiness and /health Checks
Guide โ†’

Separating Liveness `/healthz` (is Python process alive? `200`) from Readiness `/readyz` (can it query PostgreSQL `SELECT 1` & `PING` Redis? `200` vs `503`), plus Se...

Subtopics Covered (8):
  • Separating Liveness `/healthz` (is Python process alive? `200`) from Readiness `/readyz` (can it query PostgreSQL `SELECT 1` & `PING` Redis? `200` vs `503`)
  • Plus Sentry error tracking basics
  • Production Edge-Case & Pitfall Guard (Application Logs, Readiness and /health Checks)
โ†’ What Topic Is Next: Module 22 Capstone (Week 22 Lab Build: Non-Root Multi-Stage Docker Compose, Nginx & GitHub Actions CI) โ†’ Next Topic 23.1: Interview Review: Core Python Types, Mutability and Operators

Package a FastAPI/Django + PostgreSQL 16 + Redis 7 + Celery Worker + Nginx reverse-proxy stack using a multi-stage non-root `python:3.12-slim` `Dockerfile`, health-checked `compose.yaml`, Gunicorn + Uvicorn workers, `/readyz`, and `.github/workflows/ci.yml`.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Answer deep "how it works under the hood" technical viva questions across Python 3.12, SQL/PostgreSQL, Django/DRF, FastAPI, Redis, Celery, Kafka, and Docker.
โœ“ Build clean, tested backend modules from scratch under 60โ€“90 minute machine-coding constraints (URL Shortener, Rate Limiter, Reusable JWT/RBAC, Order Workflow).
โœ“ Solve timed Easy & Medium Python DSA problems (`100โ€“150` program target) stating exact Time & Space Complexity before and after coding.
โœ“ Walk through Junior/Mid-level Backend System Design diagrams (URL Shortener, Notification Pipeline, Job Portal, E-Commerce Checkout) clearly.
โœ“ Present your own GitHub commits, SQL queries, migrations, and architecture decisions confidently without memorized buzzwords.
Guide โ†’

`is` vs `==`, small-int interning trap, mutable vs immutable types, pass-by-object-reference, `Decimal` vs `float`, truthiness, and slicing

Subtopics Covered (8):
  • `is` vs `==`
  • Small-int interning trap
  • Mutable vs immutable types
โ†’ What Topic Is Next: Next Topic 23.2: Interview Review: Lists, Tuples, Sets and Dictionary Internals
Guide โ†’

Over-allocated `list` array, `dict` open-addressing compact hash table (`O(1)` avg), hashability requirements (`__hash__` + `__eq__`), `copy` vs `deepcopy`

Subtopics Covered (8):
  • Over-allocated `list` array
  • `dict` open-addressing compact hash table (`O(1)` avg)
  • Hashability requirements (`__hash__` + `__eq__`)
โ†’ What Topic Is Next: Next Topic 23.3: Interview Review: Functions, *args/**kwargs, LEGB Scope and Recursion
Guide โ†’

Mutable default argument trap, late-binding closure trap, LEGB + `nonlocal`, keyword-only `*` args, and recursion stack frames

Subtopics Covered (8):
  • Mutable default argument trap
  • Late-binding closure trap
  • LEGB + `nonlocal`
โ†’ What Topic Is Next: Next Topic 23.4: Interview Review: Python OOP, MRO, Duck Typing and ABCs
Guide โ†’

`__new__` vs `__init__`, `@classmethod` vs `@staticmethod`, `@property`, C3 MRO + cooperative `super()`, `ABC` vs `Protocol`, `@dataclass(slots=True)`

Subtopics Covered (8):
  • `__new__` vs `__init__`
  • `@classmethod` vs `@staticmethod`
  • `@property`
โ†’ What Topic Is Next: Next Topic 23.5: Interview Review: Decorators, Generators, Iterators and Context Managers
Guide โ†’

Parameterized `@decorator(arg)` 3-level function structure, `@wraps`, `Iterator` vs `Iterable`, `yield` memory savings, and `__enter__`/`__exit__`

Subtopics Covered (8):
  • Parameterized `@decorator(arg)` 3-level function structure
  • `@wraps`
  • `Iterator` vs `Iterable`
โ†’ What Topic Is Next: Next Topic 23.6: Interview Review: CPython Memory, Reference Counting, GC and GIL
Guide โ†’

`ob_refcnt` + generational cyclic `gc`, `__slots__` memory optimization, what the GIL locks, and why C extensions / OS I/O syscalls release the GIL

Subtopics Covered (8):
  • `ob_refcnt` + generational cyclic `gc`
  • `__slots__` memory optimization
  • What the GIL locks
โ†’ What Topic Is Next: Next Topic 23.7: Interview Review: Threading vs Multiprocessing vs Asyncio
Guide โ†’

Exact comparison across memory sharing, OS context switching, CPU-bound vs blocking I/O vs high-concurrency non-blocking I/O, and `asyncio.to_thread`

Subtopics Covered (8):
  • Exact comparison across memory sharing
  • OS context switching
  • CPU-bound vs blocking I/O vs high-concurrency non-blocking I/O
โ†’ What Topic Is Next: Next Topic 23.8: Interview Review: Python DSA Patterns (Arrays, Strings, Trees, Graphs)
Guide โ†’

Pattern recognition: sorted array -> Two Pointers / Binary Search; contiguous subarray -> Sliding Window / Prefix Sum + Dict; Top-K -> `heapq`; shortest unweighted p...

Subtopics Covered (8):
  • Pattern recognition: sorted array -> Two Pointers / Binary Search
  • Contiguous subarray -> Sliding Window / Prefix Sum + Dict
  • Top-K -> `heapq`
โ†’ What Topic Is Next: Next Topic 23.9: Interview Review: Complex SQL Joins, Subqueries, CTEs and Window Functions
Guide โ†’

Top-N per department (`DENSE_RANK`), running totals, YoY/MoM `LAG`, `LEFT JOIN` anti-joins, `EXISTS` vs `IN`/`NOT IN` null trap, and recursive CTEs

Subtopics Covered (8):
  • Top-N per department (`DENSE_RANK`)
  • Running totals
  • YoY/MoM `LAG`
โ†’ What Topic Is Next: Next Topic 23.10: Interview Review: PostgreSQL Indexing, ACID Isolation and Normalization
Guide โ†’

Composite B-Tree leftmost prefix, `EXPLAIN ANALYZE`, MVCC, `READ COMMITTED` vs `REPEATABLE READ`, `SELECT ... FOR UPDATE`, deadlocks, and 1NFโ€“3NF

Subtopics Covered (8):
  • Composite B-Tree leftmost prefix
  • `EXPLAIN ANALYZE`
  • MVCC
โ†’ What Topic Is Next: Next Topic 23.11: Interview Review: Django ORM, Middleware, Signals and N+1 Tuning
Guide โ†’

Lazy QuerySets, `select_related` vs `prefetch_related`, `F()` / `Q()` / `annotate()`, `transaction.atomic()` + `on_commit()`, middleware order, and `AUTH_USER_MODEL`

Subtopics Covered (8):
  • Lazy QuerySets
  • `select_related` vs `prefetch_related`
  • `F()` / `Q()` / `annotate()`
โ†’ What Topic Is Next: Next Topic 23.12: Interview Review: DRF Serializers, ViewSets, Permissions and Throttling
Guide โ†’

`Serializer` vs `ModelSerializer`, `validate_<field>` vs `validate`, `APIView` vs `ModelViewSet`, `has_permission` vs `has_object_permission`, and pagination

Subtopics Covered (8):
  • `Serializer` vs `ModelSerializer`
  • `validate_<field>` vs `validate`
  • `APIView` vs `ModelViewSet`
โ†’ What Topic Is Next: Next Topic 23.13: Interview Review: FastAPI Depends(), Pydantic v2 and Async SQLAlchemy
Guide โ†’

`async def` vs `def` event-loop behavior, Pydantic v2 `ConfigDict`/`response_model`, `Depends` caching & `yield` teardown, `AsyncSession(expire_on_commit=False)`, an...

Subtopics Covered (8):
  • `async def` vs `def` event-loop behavior
  • Pydantic v2 `ConfigDict`/`response_model`
  • `Depends` caching & `yield` teardown
โ†’ What Topic Is Next: Next Topic 23.14: Interview Review: REST API Design, Idempotency and HTTP Status Semantics
Guide โ†’

Resource naming, `PUT` vs `PATCH`, `401` vs `403`, `400` vs `422`, `409` conflict, `429` rate limit, cursor vs offset pagination, and `Idempotency-Key`

Subtopics Covered (8):
  • Resource naming
  • `PUT` vs `PATCH`
  • `401` vs `403`
โ†’ What Topic Is Next: Next Topic 23.15: Interview Review: Stateless JWT, Refresh Rotation and OAuth2 Flows
Guide โ†’

Access + Refresh token lifecycle, token rotation & reuse detection, `HttpOnly` cookie vs memory storage, RBAC vs BOLA/IDOR, password Argon2 hashing, and OAuth2 flows

Subtopics Covered (8):
  • Access + Refresh token lifecycle
  • Token rotation & reuse detection
  • `HttpOnly` cookie vs memory storage
โ†’ What Topic Is Next: Next Topic 23.16: Interview Review: Microservices Boundaries, Saga and Circuit Breakers
Guide โ†’

Database-per-service, Dual-Write & Transactional Outbox, Choreography vs Orchestration Saga, Circuit Breaker states, Backoff + Jitter, and Correlation IDs

Subtopics Covered (8):
  • Database-per-service
  • Dual-Write & Transactional Outbox
  • Choreography vs Orchestration Saga
โ†’ What Topic Is Next: Next Topic 23.17: Machine-Coding Lab: Reusable JWT Auth & RBAC Middleware Module
Guide โ†’

Machine-coding challenges #1, #2 & #5: Python Employee Management App + Reusable JWT Authentication Module + Role-Based Authorization (`Admin`, `Manager`, `Member`)

Subtopics Covered (8):
  • Machine-coding challenges #1
  • #2 & #5: Python Employee Management App + Reusable JWT Authentication Module + Role-Based Authorization (`Admin`
  • `Manager`
โ†’ What Topic Is Next: Next Topic 23.18: Machine-Coding Lab: Cursor/Offset Paginated & Filtered Search API
Guide โ†’

Machine-coding challenges #3 & #4: Complete CRUD REST API + Dynamic Multi-Filter, Full-Text Search, Whitelisted Sorting & Bounded Pagination API

Subtopics Covered (8):
  • Machine-coding challenges #3 & #4: Complete CRUD REST API + Dynamic Multi-Filter
  • Full-Text Search
  • Whitelisted Sorting & Bounded Pagination API
โ†’ What Topic Is Next: Next Topic 23.19: Machine-Coding Lab: Redis Cache-Aside & Sliding-Window API Rate Limiter
Guide โ†’

Machine-coding challenges #7 & #10: Redis Cache-Aside wrapper with TTL/invalidation + Sliding-Window / Token-Bucket API Rate Limiter returning `429` & `Retry-After`

Subtopics Covered (8):
  • Machine-coding challenges #7 & #10: Redis Cache-Aside wrapper with TTL/invalidation + Sliding-Window / Token-Bucket API Rate Limiter returning `429` & `Retry-After`
  • Production Edge-Case & Pitfall Guard (Machine-Coding Lab: Redis Cache-Aside & Sliding-Window API Rate Limiter)
  • Hands-On Python Implementation & Verification (Machine-Coding Lab: Redis Cache-Aside & Sliding-Window API Rate Limiter)
โ†’ What Topic Is Next: Next Topic 23.20: Machine-Coding Lab: Celery + Redis Background Email & Order Workflow
Guide โ†’

Machine-coding challenges #6 & #11: Background Email Notification Service (retries + idempotency) + Transactional Order Processing State Machine (`PENDING -> PAID ->...

Subtopics Covered (8):
  • Machine-coding challenges #6 & #11: Background Email Notification Service (retries + idempotency) + Transactional Order Processing State Machine (`PENDING -> PAID -> SHIPPED / CANCELLED`)
  • Production Edge-Case & Pitfall Guard (Machine-Coding Lab: Celery + Redis Background Email & Order Workflow)
  • Hands-On Python Implementation & Verification (Machine-Coding Lab: Celery + Redis Background Email & Order Workflow)
โ†’ What Topic Is Next: Next Topic 23.21: Machine-Coding Lab: Validated Resume/File Upload & Async Aggregator API
Guide โ†’

Machine-coding challenges #8 & #9: Non-Blocking Async Aggregator API (`asyncio.gather` + `httpx` timeouts) + Secure Multipart File Upload Service (UUID rename, magic...

Subtopics Covered (8):
  • Machine-coding challenges #8 & #9: Non-Blocking Async Aggregator API (`asyncio.gather` + `httpx` timeouts) + Secure Multipart File Upload Service (UUID rename
  • Magic bytes
  • Size cap)
โ†’ What Topic Is Next: Next Topic 23.22: Machine-Coding Lab: URL Shortener Backend with Analytics & TTL
Guide โ†’

Machine-coding challenge #12: Designing & coding a URL Shortener (`POST /shorten` Base62 short code, `GET /{code}` `302` redirect cached in Redis, click counter, opt...

Subtopics Covered (8):
  • Machine-coding challenge #12: Designing & coding a URL Shortener (`POST /shorten` Base62 short code
  • `GET /{code}` `302` redirect cached in Redis
  • Click counter
โ†’ What Topic Is Next: Next Topic 23.23: Interview Review: Pytest Fixtures, Mocking, Docker & Git PR Troubleshooting
Guide โ†’

`conftest.py` fixtures, `patch` lookup rule, `AsyncMock`, multi-stage non-root `Dockerfile`, `compose.yaml` healthchecks, `git rebase` vs `revert`, and CI debugging

Subtopics Covered (8):
  • `conftest.py` fixtures
  • `patch` lookup rule
  • `AsyncMock`
โ†’ What Topic Is Next: Next Topic 23.24: Backend System Design Walkthroughs for Junior/Mid Python Roles
Guide โ†’

Structured 5-step System Design method: 1) Functional & Non-Functional Requirements, 2) Back-of-Envelope Traffic/Storage, 3) API Contracts, 4) PostgreSQL Schema & In...

Subtopics Covered (8):
  • Structured 5-step System Design method: 1) Functional & Non-Functional Requirements
  • 2) Back-of-Envelope Traffic/Storage
  • 3) API Contracts
โ†’ What Topic Is Next: Module 23 Capstone (Week 23 Lab Build: URL Shortener + Sliding-Window Rate Limiter + 120-DSA Portfolio) โ†’ Next Topic 24.1: Capstone Module 1: Authentication Service (Registration, Login, JWT & Refresh Rotation)

Complete the timed Backend Machine-Coding Pack (Base62 URL Shortener + Redis Sliding-Window `429` Rate Limiter + Reusable Auth/Order Workflow) alongside your 120-problem Python 3.12 DSA repository and mock viva defense.

โ€ข Modular, PEP 8 compliant Python 3.12 source code on GitHub
โ€ข README with setup, environment variables, and verification steps
โ€ข Passing edge-case & automated test output

Module Learning & Hands-On Objectives

โœ“ Deliver all 12 independently organized backend modules of the Enterprise Job Portal Backend System with clean Service + Repository separation.
โœ“ Enforce Argon2 password security, JWT access + refresh rotation, strict `Candidate`/`Employer`/`Admin` RBAC, and magic-byte PDF resume validation.
โœ“ Accelerate job search & analytics with PostgreSQL composite indexes + Redis Cache-Aside while processing email notifications via Celery & RabbitMQ/Kafka.
โœ“ Ship complete ER & architecture diagrams, Alembic migrations, OpenAPI/Swagger UI, Postman collection, `>= 80%` Pytest suite, Docker Compose, and GitHub Actions CI.
โœ“ Pass the Final Live Architecture Presentation & Line-by-Line Technical Viva demonstrating genuine independent backend engineering competency.
Guide โ†’

Email registration, Argon2id password hashing, enumeration-safe login, `15m` JWT access tokens, `7d` rotated/blacklisted refresh tokens, and rate limiting

Subtopics Covered (8):
  • Email registration
  • Argon2id password hashing
  • Enumeration-safe login
โ†’ What Topic Is Next: Next Topic 24.2: Capstone Module 2: User Management & Role-Based Profiles
Guide โ†’

Account profile (`GET/PATCH /users/me`), role assignment (`CANDIDATE`, `EMPLOYER`, `ADMIN`), active-account status enforcement, and audit timestamps

Subtopics Covered (8):
  • Account profile (`GET/PATCH /users/me`)
  • Role assignment (`CANDIDATE`
  • `EMPLOYER`
โ†’ What Topic Is Next: Next Topic 24.3: Capstone Module 3: Candidate Profile & Skills Management
Guide โ†’

Headline, bio, experience years, current/expected CTC, notice period, portfolio links, and normalized Many-to-Many `Skill` tags

Subtopics Covered (8):
  • Headline
  • Bio
  • Experience years
โ†’ What Topic Is Next: Next Topic 24.4: Capstone Module 4: Employer & Verified Company Profile Management
Guide โ†’

Company onboarding, slug generation, website/industry/headquarters metadata, recruiter ownership, and Admin verification workflow (`is_verified`)

Subtopics Covered (8):
  • Company onboarding
  • Slug generation
  • Website/industry/headquarters metadata
โ†’ What Topic Is Next: Next Topic 24.5: Capstone Module 5: Job Lifecycle Management (Draft, Publish, Update, Archive)
Guide โ†’

Job creation (`DRAFT`), validation (`max_salary >= min_salary`), state machine (`DRAFT -> PUBLISHED -> CLOSED / ARCHIVED`), and employer-scoped management

Subtopics Covered (8):
  • Job creation (`DRAFT`)
  • Validation (`max_salary >= min_salary`)
  • State machine (`DRAFT -> PUBLISHED -> CLOSED / ARCHIVED`)
โ†’ What Topic Is Next: Next Topic 24.6: Capstone Module 6: High-Speed Job Search, Multi-Facet Filtering & Redis Caching
Guide โ†’

Keyword search, `city`, `is_remote`, `skills`, `experience`, `salary_min` filters, whitelisted sorting, bounded pagination, composite PostgreSQL indexes, and Redis C...

Subtopics Covered (8):
  • Keyword search
  • `city`
  • `is_remote`
โ†’ What Topic Is Next: Next Topic 24.7: Capstone Module 7: Idempotent Job Application & Status Tracking Workflow
Guide โ†’

`POST /jobs/{id}/apply` (`UNIQUE (job_id, candidate_id)` preventing duplicate applications -> `409`), cover note, resume snapshot, and status pipeline (`APPLIED -> S...

Subtopics Covered (8):
  • `POST /jobs/{id}/apply` (`UNIQUE (job_id
  • Candidate_id)` preventing duplicate applications -> `409`)
  • Cover note
โ†’ What Topic Is Next: Next Topic 24.8: Capstone Module 8: Secure Resume Upload, Validation & Storage Service
Guide โ†’

Chunked `UploadFile` streaming (`<= 5 MB`), `.pdf`/`.docx` allowlist, `%PDF-` magic-byte header verification, UUID storage key, and authorized download access

Subtopics Covered (8):
  • Chunked `UploadFile` streaming (`<= 5 MB`)
  • `.pdf`/`.docx` allowlist
  • `%PDF-` magic-byte header verification
โ†’ What Topic Is Next: Next Topic 24.9: Capstone Module 9: Celery + RabbitMQ/Kafka Background Email Notifications
Guide โ†’

Post-commit Outbox/on-commit dispatch to Celery + Redis/RabbitMQ/Kafka sending Application Confirmation, Employer New-Applicant Alert, and Status-Update emails with...

Subtopics Covered (8):
  • Post-commit Outbox/on-commit dispatch to Celery + Redis/RabbitMQ/Kafka sending Application Confirmation
  • Employer New-Applicant Alert
  • Status-Update emails with retries & DLQ
โ†’ What Topic Is Next: Next Topic 24.10: Capstone Module 10: Admin Moderation & Platform Governance APIs
Guide โ†’

Admin-only endpoints (`/api/v1/admin/*`): verifying companies, suspending abusive users (`is_active=False`), moderating flagged jobs, and viewing audit logs

Subtopics Covered (8):
  • Admin-only endpoints (`/api/v1/admin/*`): verifying companies
  • Suspending abusive users (`is_active=False`)
  • Moderating flagged jobs
โ†’ What Topic Is Next: Next Topic 24.11: Capstone Module 11: Hiring Funnel & Application Reporting Analytics
Guide โ†’

SQL `GROUP BY` / `FILTER` / Window aggregations reporting applications per job, stage conversion rates (`Applied -> Shortlisted -> Offered`), top skills in demand, a...

Subtopics Covered (8):
  • SQL `GROUP BY` / `FILTER` / Window aggregations reporting applications per job
  • Stage conversion rates (`Applied -> Shortlisted -> Offered`)
  • Top skills in demand
โ†’ What Topic Is Next: Next Topic 24.12: Capstone Module 12: OpenAPI 3 / Swagger UI Specification & Postman Suite
Guide โ†’

Complete tagged OpenAPI 3 documentation (`/docs` & `/redoc`), typed request/response/error schemas, ER diagram, architecture diagram, and turnkey `postman_collection...

Subtopics Covered (8):
  • Complete tagged OpenAPI 3 documentation (`/docs` & `/redoc`)
  • Typed request/response/error schemas
  • ER diagram
โ†’ What Topic Is Next: Next Topic 24.13: Capstone Pytest Suite, Multi-Container Docker Compose & GitHub Actions CI
Guide โ†’

Unit + Integration `pytest` suite (`>= 80%` coverage across Auth, RBAC, Search, Apply, Upload, Analytics), multi-stage non-root `Dockerfile`, `compose.yaml` (`api`,...

Subtopics Covered (8):
  • Unit + Integration `pytest` suite (`>= 80%` coverage across Auth
  • RBAC
  • Search
โ†’ What Topic Is Next: Next Topic 24.14: Final Architecture Presentation, Live API Demo & Line-by-Line Technical Viva
Guide โ†’

Presenting ER schema, service/repository architecture, JWT/RBAC security, Redis/Celery/Broker flows, query execution plans, test suite, and live Q&A defense

Subtopics Covered (8):
  • Presenting ER schema
  • Service/repository architecture
  • JWT/RBAC security
โ†’ What Topic Is Next: Module 24 Capstone โ†’ End-of-Course Live Client Project: Enterprise Job Portal Backend System

Design, develop, secure, test, document, containerize, automate in CI/CD, deploy, and defend a complete production-grade Enterprise Job Portal Backend System comprising 12 independently organized backend modules (`Authentication`, `User Management`, `Candidate Management`, `Employer Management`, `Job Management`, `Search`, `Applications`, `Resume Management`, `Notifications`, `Admin Management`, `Reporting`, and `Swagger/OpenAPI`).

โ€ข Complete 12-Module Enterprise Job Portal Backend Source Code on GitHub
โ€ข Database ER Diagram + System Architecture Diagram + Versioned Migration Scripts
โ€ข Swagger/OpenAPI Documentation + Turnkey Postman Collection & Environment
โ€ข Automated Pytest Unit & Integration Suite (>= 80% Coverage) + Green GitHub Actions CI
โ€ข Multi-Stage Docker + Docker Compose + Nginx Deployment + Live Presentation & Viva
๐ŸŽ“ Like the 24-Module (610-Topic) Syllabus? Experience It Live First!

Attend Your 1st Weekend Live Class Free With Active Working IT Professionals

Verify your email OTP in 15 seconds to receive the live Zoom/Meet demo link, complete 24-module PDF, and personalized roadmap for Python Backend Developer โ€“ Industry-Ready Career Program.

๐Ÿ“„ Download Syllabus PDF
Hands-On Industry Stack โ€ข 26 Core Technologies

Technologies, Frameworks & Tools You Will Master

โœ“ Taught Live by Working IT Professionals
Python 3.12 (Core & Advanced) Logo

Python 3.12 (Core & Advanced)

Core Language
Python OOP & Dataclasses Logo

Python OOP & Dataclasses

Core Language
Decorators, Generators & Iterators Logo

Decorators, Generators & Iterators

Core Language
Threading, Multiprocessing & Asyncio Logo

Threading, Multiprocessing & Asyncio

Core Language
Python DSA (120+ Problems) Logo

Python DSA (120+ Problems)

Core Language
Git & GitHub PR Workflow Logo

Git & GitHub PR Workflow

Version Control
PostgreSQL 16 & Complete SQL Logo

PostgreSQL 16 & Complete SQL

Enterprise RDBMS
SQLite & MySQL Fundamentals Logo

SQLite & MySQL Fundamentals

Relational Queries
SQLAlchemy 2.0 & Alembic Logo

SQLAlchemy 2.0 & Alembic

Async Python ORM
MongoDB & PyMongo Fundamentals Logo

MongoDB & PyMongo Fundamentals

NoSQL Document DB
Django 5 Logo

Django 5

Full-Stack Python
Django REST Framework (DRF) Logo

Django REST Framework (DRF)

Full-Stack Python
FastAPI & Pydantic v2 Logo

FastAPI & Pydantic v2

High-Speed API
REST APIs, Swagger & OpenAPI Logo

REST APIs, Swagger & OpenAPI

Typed API Schema
JWT & OAuth 2.0 Fundamentals Logo

JWT & OAuth 2.0 Fundamentals

App & Cloud Security
Redis 7 Caching & Locks Logo

Redis 7 Caching & Locks

In-Memory Cache
Celery & Celery Beat Logo

Celery & Celery Beat

Distributed Queues
RabbitMQ & Apache Kafka Fundamentals Logo

RabbitMQ & Apache Kafka Fundamentals

Event Streaming
Pytest, unittest, Ruff & mypy Logo

Pytest, unittest, Ruff & mypy

Test Automation
Docker & Docker Compose Logo

Docker & Docker Compose

Containers
Linux CLI & Nginx Logo

Linux CLI & Nginx

OS & Scripting
Gunicorn & Uvicorn ASGI/WSGI Logo

Gunicorn & Uvicorn ASGI/WSGI

Core Engineering
GitHub Actions CI/CD & AWS Fundamentals Logo

GitHub Actions CI/CD & AWS Fundamentals

CI/CD Pipelines
pip, venv, Poetry & Postman Logo

pip, venv, Poetry & Postman

Core Engineering
LeetCode Problem Solving Logo

LeetCode Problem Solving

Trainer Coding Prep
HackerRank Coding Prep Logo

HackerRank Coding Prep

Trainer Coding Prep
Course Overview โ€ข Freshers & Working Pros

What You Will Learn & Why It Matters on Real Jobs

๐Ÿ‘จโ€๐Ÿ’ป 100% Working IT Pro Trainers
What Is This Course?

Python Backend Developer โ€“ Industry-Ready Career Program teaches you how modern tech companies design, build, test, and deploy reliable Python Backend, Django & FastAPI Engineering software using Python 3.12 (Core & Advanced), Python OOP & Dataclasses, Decorators, Generators & Iterators, Threading, Multiprocessing & Asyncio, Python DSA (120+ Problems) โ€” explained in clear everyday language before writing real production code.

Who Should Join?

Suitable for both complete beginners (guided step-by-step from Day 1 setup and core logic) and technical students/working professionals aiming for production architecture mastery.

Key Engineering Capabilities You Will Build:

  • โ€ข Core & Advanced Python 3.12: Write clean, modular, type-annotated Python programs using collections, OOP, decorators, generators, context managers, and concurrency (`threading`, `multiprocessing`, `asyncio`).

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

  • โ€ข Data Structures & Algorithms in Python: Solve 100โ€“150 Easy and Medium coding problems across all 20 DSA categories with clear Big-O time & space justification.

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

  • โ€ข PostgreSQL, SQL & SQLAlchemy 2.0: Design normalized 3NF relational databases, tune composite indexes with `EXPLAIN ANALYZE`, write complex joins/CTEs/window functions, and implement N+1-free SQLAlchemy 2.0 + Alembic persistence (plus MongoDB fundamentals).

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

  • โ€ข Django 5 & Django REST Framework: Build, secure, document, cache, and test complete database-driven business backends with custom User models, serializers, ViewSets, filtering, pagination, and SimpleJWT RBAC.

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

  • โ€ข FastAPI & Microservices Fundamentals: Develop high-performance asynchronous APIs with Pydantic v2, `Depends()` DI, Async SQLAlchemy, service boundaries, Saga compensation, Circuit Breakers, and `Idempotency-Key` safety.

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

  • โ€ข Redis, Celery & Event Brokers: Implement Cache-Aside caching, distributed locks, Celery background/scheduled email & invoice jobs, RabbitMQ exchanges/DLQs, and Apache Kafka partitioned event streams.

    Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.

Student Learning Outcomes (By End of Course):

Recommended LTS Baseline: Python 3.12, PostgreSQL 16 (primary RDBMS), SQLAlchemy 2.0, Alembic, Django 5.x, Django REST Framework 3.15+, FastAPI, Pydantic v2, Uvicorn & Gunicorn, Redis 7, Celery 5, RabbitMQ 3 / Apache Kafka (KRaft), Pytest 8, Ruff, and Docker Compose. Trainers verify package compatibility before every cohort.
  1. 1. Core & Advanced Python 3.12: Write clean, modular, type-annotated Python programs using collections, OOP, decorators, generators, context managers, and concurrency (`threading`, `multiprocessing`, `asyncio`).
  2. 2. Data Structures & Algorithms in Python: Solve 100โ€“150 Easy and Medium coding problems across all 20 DSA categories with clear Big-O time & space justification.
  3. 3. PostgreSQL, SQL & SQLAlchemy 2.0: Design normalized 3NF relational databases, tune composite indexes with `EXPLAIN ANALYZE`, write complex joins/CTEs/window functions, and implement N+1-free SQLAlchemy 2.0 + Alembic persistence (plus MongoDB fundamentals).
  4. 4. Django 5 & Django REST Framework: Build, secure, document, cache, and test complete database-driven business backends with custom User models, serializers, ViewSets, filtering, pagination, and SimpleJWT RBAC.
  5. 5. FastAPI & Microservices Fundamentals: Develop high-performance asynchronous APIs with Pydantic v2, `Depends()` DI, Async SQLAlchemy, service boundaries, Saga compensation, Circuit Breakers, and `Idempotency-Key` safety.
  6. 6. Redis, Celery & Event Brokers: Implement Cache-Aside caching, distributed locks, Celery background/scheduled email & invoice jobs, RabbitMQ exchanges/DLQs, and Apache Kafka partitioned event streams.
  7. 7. Pytest, Linux, Docker, Nginx & CI/CD: Enforce `>= 80%` Pytest coverage + `Ruff`/`Black`/`mypy`, collaborate via GitHub PRs, containerize with non-root multi-stage Docker Compose + Nginx + Gunicorn/Uvicorn, automate GitHub Actions CI/CD, and defend complete backend systems in interviews.

Weekend-Only Live Batches

Taught live by active Working IT Professionals between 7:00 AM and 8:00 PM IST (choose any slot based on trainer availability).

Batch Available (Sat โ€“ Sun Only): 2 Hours / Day โ€ข 7:00 AM to 8:00 PM IST (choose any slot based on trainer availability)

Mon โ€“ Fri Guided Practice: Real GitHub repository builds, LeetCode/HackerRank coding & โ‰ฅ90% Mock/AI Interview gates.

BATCH-PBCP-2026 ONGOING

Python Backend Developer (Django, FastAPI & Microservices) โ€” 6-Month Live Career Cohort

Satโ€“Sun Live + Weekday Guided Labs & Python DSA โ€ข 05:00 PM โ€“ 07:30 PM IST (25 Hrs/Week Intensive Roadmap)

Starts: 21 Nov 2026

Eligibility

Prerequisites

  • โ€ข No prior Python, SQL, Django, or FastAPI experience required โ€” Week 1 starts from programming fundamentals and Python 3.12 installation.
  • โ€ข Consistent 25 hours/week commitment across live concept sessions, coding labs, GitHub assignments, and continuous Python DSA practice.
  • โ€ข Ideal for B.Tech / BCA / MCA / B.Sc IT students, non-CS beginners, career switchers, and working developers upgrading to 2026 production standards.
Live Client Production Deployment & Verified Internship Showcase ๐Ÿš€ Live Client Production Project + Internship Letter
End-of-Course Production Deployment

Enterprise Job Portal Backend System

Role: Python Backend Developer Project Intern

After completing all 24 progressive hands-on module projects during live classes, students join our mentor-led Client Production Sprint to build, test, and deploy "Enterprise Job Portal Backend System" to live cloud production โ€” earning an Official Verified Internship Letter detailing their exact technical contributions.

Domain: Live Enterprise Python Backend, Django & FastAPI Engineering Production Engagement โ€ข Infra: Python 3.12, FastAPI, Django REST Framework, PostgreSQL, SQLAlchemy, Redis, Celery, RabbitMQ/Kafka, JWT RBAC, Pytest, Docker Compose & GitHub Actions CI/CD

Certified on Your Official Internship Confirmation Letter:

  • โœ“ Architected and implemented 'Enterprise Job Portal Backend System' using Python 3.12 (Core & Advanced), Python OOP & Dataclasses, Decorators, Generators & Iterators, Threading, Multiprocessing & Asyncio, Python DSA (120+ Problems) under Senior Working IT Professional code review.
  • โœ“ Engineered production authentication/RBAC, schema migrations, input validation, caching/security hardening, and clean modular layers.
  • โœ“ Completed automated unit/integration test suites, Docker/IaC packaging, and Git pull-request review sprints.
  • โœ“ Deployed and defended the complete production build with observability, runbooks, and 1-on-1 architecture viva sign-off.
ID: MAA-2026-XXXX QR + BARCODE

1. Graduation Certificate

Certifies PBCP module mastery, Mock/AI Viva scores & GitHub repos.

ID: MAA-INT-XXXX VERIFY 24ร—7 โ†’

2. Client Internship Letter

Employer BGV-verifiable proof of live production deployment contributions.

Complete End-to-End Job Curriculum • Annual CTC Scope & Optional High-ROI Certifications

Career Scope, Salary Packages & Optional Certifications for Better Position & Higher CTC

Python Backend Developer โ€“ Industry-Ready Career Program already covers 100% of the end-to-end engineering stack required for IT placement โ€” no “next course” is needed. Below are the 100% optional, curriculum-matched industry certifications genuinely worth taking if you want a better position and higher CTC package, backed by MockAttempt’s 100% Exam-Success Mentorship where our Working IT Professional trainers ensure you succeed in every exam.

Direct Job Roles After This Course
๐Ÿ’ผ Python Backend Developer โ€“ Industry-Ready Career Program Developer ๐Ÿ’ผ Associate Python Backend, Django & FastAPI Engineering Engineer ๐Ÿ’ผ Software Development Engineer (SDE-1)
Top Hiring Industries & Domains
๐Ÿข Global SaaS & Product Companies ๐Ÿข FinTech & Digital Banking ๐Ÿข Cloud & AI Platforms ๐Ÿข Global Capability Centers (GCCs) ๐Ÿข Enterprise Engineering Consulting
Fresher / Entry-Level (0โ€“1 Yr) โ‚น4.5 โ€“ โ‚น8.5 LPA โ€ข $55Kโ€“$85K Global

Hands-on module projects, topic-wise MCQ mocks, AI interviews & live client internship proof.

Mid-Level Product Engineer (1โ€“3 Yrs) โ‚น9.5 โ€“ โ‚น19.0 LPA โ€ข $85Kโ€“$130K Global

Production architecture, performance tuning & automated testing mastery.

Senior / Multi-Stack Specialist (3โ€“6+ Yrs) โ‚น20.0 โ€“ โ‚น38.0+ LPA โ€ข $130Kโ€“$185K+ Global

Accelerated when paired with the optional curriculum-matched global vendor certifications below.

100% Optional Position & CTC Upgrade • Complete Stack Already Covered in This Program

Worthwhile Curriculum-Matched Certifications for Better Position & Higher Package (100% Exam-Success Support)

Selected strictly from Python Backend Developer โ€“ Industry-Ready Career Program modules โ€” zero filler badges, only globally respected exams that unlock higher SDE/Architect shortlists and stronger CTC offers.

๐Ÿ›ก๏ธ 100% Optional • Guaranteed Exam-Success Mentorship
Python Institute Logo
Python Institute EXAM: PCAP-31-03
Optional #1

Certified Associate Python Programmer (PCAP)

๐Ÿ’ฐ โ‚น9.5 โ€“ โ‚น22.0 LPA โ€ข $80Kโ€“$125K Global ๐ŸŽฏ Python Backend, Django & FastAPI Engineer

Already Taught in Your Curriculum: Python 3.12 OOP, Modules, Exceptions, Iterators, Closures & Standard Library

โœ“ M3: Module 3: Python Functions, Modules and Except... โœ“ M1: Module 1: Introduction to Python and Programmi...

Why Worth Taking: Globally recognized vendor-neutral Python credential valued by backend, data, and AI product teams.

โœ… How We Ensure Exam Success: Complete PCAP-31-03 code-output drills, timed mock exams & 1-on-1 Python Architect mentorship.

OpenJS / Linux Foundation Logo
OpenJS / Linux Foundation EXAM: JSNSD
Optional #2

OpenJS Node.js Services Developer

๐Ÿ’ฐ โ‚น14.0 LPA โ€“ โ‚น30.0 LPA (API & Security Exam) ๐ŸŽฏ Principal REST API, Security & Microservices Engineer

Already Taught in Your Curriculum: Express REST APIs, Input Validation, OWASP Security, Rate Limiting & HTTP Architecture

โœ“ M15: Module 15: Django Authentication, Security and... โœ“ M13: Module 13: Django Fundamentals and Architectur...

Why Worth Taking: Validates production HTTP service architecture, authentication hardening, and input/attack mitigation in Node.js.

โœ… How We Ensure Exam Success: Hands-on Express security drills, mock service scenarios & 1-on-1 Backend Architect code review.

MongoDB Inc. Logo
MongoDB Inc. EXAM: C100DEV
Optional #3

MongoDB Certified Associate Developer (Node.js)

๐Ÿ’ฐ โ‚น10.0 LPA โ€“ โ‚น24.0 LPA (+25% Data Backend Edge) ๐ŸŽฏ Polyglot Backend & NoSQL Data Engineer

Already Taught in Your Curriculum: MongoDB Document Modeling, Aggregation Pipelines, ESR Compound Indexes & Transactions

โœ“ M12: Module 12: MongoDB and NoSQL Fundamentals

Why Worth Taking: Directly proves production schema design, aggregation performance, and Node.js driver mastery.

โœ… How We Ensure Exam Success: Aggregation pipeline labs, ESR index explain() benchmarks & full C100DEV mock exams.

100% Optional Choice • We Stand Behind Your Success in Every Recommended Certification Exam (PCAP-31-03, JSNSD, C100DEV)

Your Python Backend Developer โ€“ Industry-Ready Career Program cohort already prepares you completely for placement. If you opt in for certification mentorship to target higher MNC/GCC positions and top-band packages, our Working IT Pro trainers guide you with hands-on blueprint labs, timed mock simulators, and 1-on-1 revision until you clear every exam.

Curriculum Governance & E-E-A-T Faculty Review

Architected & Audited by Ravi Shankar Mishra (Founder & Lead Architect, MockAttempt Academy) & Active Production Engineers

Every module, GitHub lab, 50-MCQ assessment, and 4-axis Spoken AI Viva in Python Backend Developer โ€“ Industry-Ready Career Program is reviewed quarterly against live enterprise hiring bars and taught in clear English on weekends by active Working IT Professionals.

Program Questions

Frequently Asked Questions โ€” Python Backend Developer โ€“ Industry-Ready Career Program

The complete 6-month (24-week) Python Backend Developer โ€“ Industry-Ready Career Program is โ‚น15,000 All-Inclusive (Incl. 18% GST โ€” zero hidden fees and 0% salary share/ISA). Students can pay โ‚น15,000 upfront or in 3 equal 0% interest installments of โ‚น5,000 each.

Django and Django REST Framework (Month 4) are industry standards for structured, database-driven business backends, while FastAPI + Pydantic + Asyncio (Month 5) powers modern high-performance APIs and microservices. Mastering both makes graduates eligible for the widest spectrum of Python backend roles.

Month 1 (Weeks 1โ€“4): Complete Core Python, Collections, Functions, OOP & File Handling; Month 2 (Weeks 5โ€“8): Decorators, Generators, Concurrency/Asyncio, Python DSA & Git; Month 3 (Weeks 9โ€“12): PostgreSQL, Advanced SQL, SQLAlchemy, Alembic & MongoDB; Month 4 (Weeks 13โ€“16): Django, Django REST Framework, JWT Auth & Production Architecture; Month 5 (Weeks 17โ€“20): FastAPI, Pydantic, Microservices, Redis, Celery, RabbitMQ & Kafka; Month 6 (Weeks 21โ€“24): Pytest, Linux, Nginx, Docker Compose, GitHub Actions CI/CD, Machine-Coding Interviews & Final Capstone.

You build 6 progressive backend systems: (1) Python OOP Employee Management System, (2) Python Inventory Management System, (3) Database-Driven Employee Backend (PostgreSQL + SQLAlchemy + Alembic), (4) Job Portal REST API using Django REST Framework & JWT, (5) E-Commerce Microservices Backend using FastAPI, Redis & Messaging, and (6) Final Capstone: Enterprise Job Portal Backend System.

Yes. A dedicated 6-month Python DSA Coding Lab tracks 120 curated Easy, Medium, and selected Hard Python 3.12 problems across all 20 DSA areas (Complexity, Arrays, Strings, Hashing, Two Pointers, Sliding Window, Prefix Sum, Binary Search, Sorting, Recursion, Backtracking, Linked Lists, Stacks, Queues, Trees/BST, Heaps, Graphs, Greedy, Dynamic Programming & Bit Manipulation).

Included: Core & Advanced Python 3.12, OOP, Concurrency/Asyncio, Python DSA, PostgreSQL/SQL, MongoDB, SQLAlchemy/Alembic, Django, DRF, FastAPI, Pydantic, JWT/OAuth2, Redis, Celery, RabbitMQ/Kafka fundamentals, Pytest, Linux, Nginx, Docker Compose, and GitHub Actions CI/CD. Not included: Java/Spring Boot, React/Angular frontend SPAs, Flutter/Android mobile apps, Deep Learning/Data Science specialization, or advanced Kubernetes administration.

Academic completion requires scoring >= 70% in theory tests, >= 70% in coding/practical tests, >= 70% in project evaluations, and 100% submission of mandatory assignments across a recommended 25 hours/week schedule (600 hours over 24 weeks).

Eligible graduates who satisfy the published attendance, original GitHub project milestones, and MockAttempt assessment mastery gates unlock 6 months (180 days) of curated Python/Django/FastAPI job openings (100+ verified opportunities) plus OA coaching โ€” backed by our 100% net tuition fee refund* protection.

Yes. Week 1 starts from Python installation, variables, loops, and problem-solving fundamentals before progressing step-by-step into OOP, SQL, Django, FastAPI, and Docker.

Yes. Month 6 covers Linux CLI, Gunicorn/Uvicorn, Nginx reverse proxying, multi-container Docker Compose (Python + PostgreSQL + Redis), GitHub Actions CI/CD, and cloud deployment fundamentals.

โšก Free 1st Live Demo โ€ข All-Inclusive Fees (Incl. 18% GST)

Book Free Live Demo or Reserve Batch Seat

+ Add Background, Location or Questions (Optional)