Sneha Nair
โ Enrolled๐ Bengaluru, India โข Junior Dev โ Django DRF & FastAPI
๐ Weekend SatโSun (10 AMโ12 PM IST)
Launch full-screen from your iPhone / iPad Home Screen
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.
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 SatโSun (2h/day) live sessions with Working IT Professionals (โฅ85% attendance) and ship 100% original GitHub repositories.
Clear โฅ90% in every Topic Mock Test & Spoken MockAttempt AI Interview with unlimited free re-attempts whenever below 90%.
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.
Every month concludes with measurable coding competency, a portfolio repository deliverable, and continuous DSA progression.
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.
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.
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.
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.
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).
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.
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
Published transparently so students compare scope honestly before enrolling:
โ 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.
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.
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.
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*).
Month 1 โ Complete Core and Advanced Python (Weeks 1โ4)
Month 2 โ Advanced Python, DSA and Git (Weeks 5โ8)
Month 3 โ Database, SQL and ORM (Weeks 9โ12)
Month 4 โ Django and Django REST Framework (Weeks 13โ16)
Month 5 โ FastAPI, Microservices and Backend Engineering (Weeks 17โ20)
Month 6 โ Testing, Security, Docker, Deployment and Placement Preparation (Weeks 21โ24)
Module Learning & Hands-On Objectives
Programming concepts, step-by-step algorithms, flowcharts, dry-running, and structured problem-solving
Python history, readability philosophy (PEP 8 / Zen of Python), backend/API/automation/data applications, and the Python 3 ecosystem
Installing Python 3.12 on Windows (`PATH` & `py` launcher) and Linux (`apt`/`pyenv`), verifying `python3` and `pip`
Configuring VS Code (Python + Pylance + Ruff extensions), PyCharm, integrated terminal, and selecting the workspace interpreter
Interactive REPL mode vs `.py` script mode, source -> bytecode (`.pyc` in `__pycache__`) -> Python Virtual Machine (PVM) execution flow
4-space block indentation rules (PEP 8), logical vs physical lines, docstrings, and meaningful single-line `#` comments
Dynamic variable binding, object references, `snake_case` naming rules, multiple assignment, and tuple swapping `a, b = b, a`
Built-in scalar types (`int` arbitrary precision, `float` IEEE-754, `complex`, `bool`, `str`, `NoneType`) and `type()` / `isinstance()`
Implicit numeric promotion (`int` -> `float`) vs explicit constructors (`int()`, `float()`, `str()`, `bool()`) and truthiness rules
Reading console text via `input()`, `print()` (`sep`, `end`, `flush`), and formatted f-string numeric/alignment specifiers
Arithmetic (`+`, `-`, `*`, `/` true division, `//` floor division, `%` modulo, `**` power), comparison, logical (`and`, `or`, `not`), and augmented assignment
Bitwise AND (`&`), OR (`|`), XOR (`^`), NOT (`~`), left shift (`<<`), and right shift (`>>`) on integers
`in` and `not in` across strings, lists, tuples, sets, and dictionary keys, plus `O(1)` `set` vs `O(n)` `list` lookup cost
`is` and `is not`, `id()` memory address checks, singleton `None` checks (`x is None`), vs `==` value comparison
Python evaluation order (`**`, unary `-`, `* / // %`, `+ -`, shifts, bitwise, comparisons, `not`, `and`, `or`) and chained comparisons (`0 <= score <= 100`)
`if`, `elif`, `else` branching, mutually exclusive grade/slab ladders, and concise conditional expressions (`x if cond else y`)
Multi-criteria decision trees vs early-return guard clauses to flatten deeply indented nested `if` blocks
Definite iteration with `for` over iterables and indefinite condition-driven `while` loops (including loop `else`)
Exiting early with `break`, skipping iterations with `continue`, placeholder `pass`, and `for ... else` search patterns
`range(stop)`, `range(start, stop)`, `range(start, stop, step)`, negative reverse steps, `O(1)` lazy memory footprint, and `enumerate()`
Nested row/column loop invariants for right triangles, pyramids, Floydโs number triangle, and character patterns
Reading Python tracebacks bottom-up, distinguishing `SyntaxError` vs `NameError`/`TypeError`/`ValueError`/`ZeroDivisionError`, and strategic state inspection
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.
Module Learning & Hands-On Objectives
Unicode UTF-8 string literals, raw strings `r"..."`, multiline strings, positive `0..n-1` and negative `-1..-n` indexing
Slice notation `s[start:stop:step]`, omitting bounds, negative steps `s[::-1]` reversal, and out-of-range slice safety
`upper()`, `lower()`, `casefold()`, `strip()`/`lstrip()`/`rstrip()`, `removeprefix()`, `removesuffix()`, `split()`, and `" ".join()`
`find()` / `rfind()` (`-1` on miss) vs `index()` / `rindex()` (`ValueError` on miss) and non-overlapping `count()`
`startswith()` (accepting a tuple of prefixes!), `endswith()`, `isdigit()`, `isalpha()`, `isalnum()`, and `isspace()`
Modern f-strings `f"{expr}"`, debug `f"{var=}"`, numeric formatting `:.2f`, `:,`, ISO dates, vs `.format()` templates
Why `str` objects cannot be mutated in-place, `O(n^2)` loop `+=` concatenation penalty vs `O(n)` `"".join(parts)` buffer building
Dynamic array internals of `list`, literal/constructor creation, indexing, slicing, slice assignment, and `len()`/`min()`/`max()`/`sum()`
`append()` (`O(1)` amortized), `extend()`, `insert(0, x)` (`O(n)` shift!), and `remove(val)` (`ValueError` if missing)
`pop()` (`O(1)` tail vs `O(n)` index), `clear()`, in-place `sort(key=..., reverse=...)` vs non-mutating `sorted()`, and `reverse()`
`[expr for x in iterable if cond]`, conditional transformations, flattening 2D matrices, and readability limits
Immutable fixed-structure `tuple` records, single-element trailing comma `(42,)`, tuple packing/unpacking, and hashability as `dict` keys
`.count(value)`, `.index(value)`, memory efficiency of tuples vs lists (`sys.getsizeof`), and immutability of slot bindings
Hash-table backed `set` and immutable `frozenset`, `set()` empty set creation (NOT `{}`!), `O(1)` membership and deduplication
Union (`|` / `.union()`), intersection (`&` / `.intersection()`), difference (`-`), symmetric difference (`^`), and subset/superset (`<=`, `>=`, `isdisjoint`)
`add()`, `update()`, `discard()` (no error if missing) vs `remove()` (`KeyError` if missing), and `pop()`
Insertion-ordered hash map (`dict`, guaranteed since Python 3.7+), hashable keys, `O(1)` read/write/delete, and `del` / `in`
`.keys()`, `.values()`, `.items()` dynamic views, `.get(k, default)`, `.pop(k, default)`, `.setdefault()`, and `|` / `|=` merge operators
`{k_expr: v_expr for item in iterable if cond}`, inverting unique maps, and filtering sensitive keys from logs
Lists of dictionaries, dictionaries of lists/dicts, safe chained `.get()` navigation, and grouping records by category/department
Immutable (`int`, `float`, `bool`, `str`, `tuple`, `frozenset`) vs mutable (`list`, `dict`, `set`) types, hashability, and pass-by-object-reference
`list.copy()`, `dict.copy()`, `s[:]`, and `copy.copy()` โ duplicating the outer container while sharing nested inner object references
`copy.deepcopy()`, recursive cloning of nested graphs, memoization of cyclic references, and memory/CPU trade-offs
Decision matrix: `list` (ordered mutable sequence), `tuple` (immutable fixed record), `set` (`O(1)` unique membership), `dict` (`O(1)` keyed lookup)
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.
Module Learning & Hands-On Objectives
`def` declaration, docstrings (PEP 257), single-responsibility design, invocation, and implicit `None` return
Positional arguments, keyword arguments, positional-only (`/`) and keyword-only (`*`) parameter markers
Default parameter evaluation at `def` definition time (ONCE!) and the `None` sentinel pattern for mutable defaults
Variadic positional `*args` (packed as `tuple`), variadic keyword `**kwargs` (packed as `dict`), and call-site `*` / `**` unpacking
Early-return guard clauses, returning multiple values via tuple packing/unpacking, and consistent return types
Local -> Enclosing -> Global -> Built-in (LEGB) name resolution, `global` vs `nonlocal`, and why mutable global state hurts concurrency
Single-expression anonymous `lambda params: expr` functions for inline sort keys and callbacks vs named `def` functions
Base case + progress toward base case, call stack frames, `sys.getrecursionlimit()` (~1000 in CPython, no tail-call optimization!)
First-class functions passed as arguments (strategy/validator callbacks) and returned from factory functions
Lazy iterator `map(func, *iterables)` transformation vs list/generator comprehensions
Lazy predicate filtering `filter(pred, iterable)`, `filter(None, iterable)` truthy filtering, vs comprehensions
`functools.reduce(fn, iterable, initializer)` cumulative folding vs Pythonic built-ins (`sum`, `min`, `max`, `all`, `any`, `math.prod`)
Creating reusable `.py` modules, module namespace isolation, `sys.modules` import cache, and avoiding circular imports
Multi-directory package hierarchy (`banking/models/`, `banking/services/`), `__init__.py`, `__all__`, and explicit package exports
Absolute imports (`from app.services.auth import verify`), explicit relative imports, `sys.path`, and why `from mod import *` is banned
How Python sets `__name__ == "__main__"` on direct execution vs module path on `import`, protecting CLI entrypoints
Practical backend usage of `os`, `sys`, `math`, `random`/`secrets`, and timezone-aware `datetime` (`datetime.now(timezone.utc)`)
`try` and `except SpecificError as exc:` blocks, exception hierarchy (`BaseException` vs `Exception`), and preserving error context
Handling distinct failure modes with separate `except` clauses vs grouped tuples `except (ConnectionError, TimeoutError) as exc:`
Why `try ... except ... else ... finally` keeps the `try` scope narrow (`else` runs only if no exception; `finally` runs ALWAYS)
Validating invariants with `raise ValueError(...)`, re-raising active exceptions via bare `raise`, and chaining `raise DomainError(...) from exc`
Designing a project base exception (`BankingError(Exception)`) and rich domain subclasses (`InsufficientFundsError`, `AccountNotFoundError`) with attributes
`assert condition, message` for internal developer invariants vs explicit `if ...: raise ValueError(...)` for runtime user validation
Python 3.7+ `breakpoint()`, `pdb` commands (`n` next, `s` step, `c` continue, `l` list, `p` print, `w` where stack), and post-mortem debugging
`logging` module (`DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`), `getLogger(__name__)`, formatters, `StreamHandler` + `RotatingFileHandler`, and `logger.exception...
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`.
Module Learning & Hands-On Objectives
Procedural vs object-oriented design, coupling data + behavior, and the 4 OOP pillars in Python backend architecture
`class` statement, `CapWords` (`PascalCase`) PEP 8 naming, class namespace dictionary (`__dict__`), and docstrings
Class instantiation `obj = ClassName(...)`, unique object identity (`id(obj)`), `isinstance()`, and attribute lookup order
Object initialization via `__init__(self, ...)` (vs `__new__` allocator), validating invariants at construction time
How Python binds `instance.method(x)` to `Class.method(instance, x)` and why explicit `self` is first parameter
Object-specific attributes bound on `self.attr` inside `__init__`, dynamic attribute storage in `obj.__dict__`
Class-level attributes shared across all instances (`company_name`, constants), lookup fallback `obj.__dict__` -> `cls.__dict__`, and mutable class attribute danger
Behavior operating on `self` state, mutator vs query methods, and calling sibling methods via `self.`
`@classmethod` decorator, `cls` class binding (subclass-aware!), and named alternative constructors (`from_dict`, `from_csv_row`)
`@staticmethod` decorator for namespace-grouped pure helper functions requiring neither `self` nor `cls`
Public attributes, `_protected` convention, `__private` name mangling (`_ClassName__attr`), and invariant protection
Deriving specialized `class Sub(Base):` (`is-a` relationship), `super().__init__(...)`, and extending base behavior
Inheriting from multiple bases `class View(AuthMixin, AuditMixin, BaseView):` and cooperative `super()` mixin design
Chained `GrandParent -> Parent -> Child` hierarchies (`Exception -> BankingError -> InsufficientFundsError`) and keeping depth shallow
Multiple sibling subclasses (`SavingsAccount`, `CurrentAccount`, `SalaryAccount`) sharing one common parent (`Account`)
Method overriding across subtypes and Pythonic duck typing ("if it implements `.send()`, treat it as a sender")
Separating WHAT a repository/gateway contract promises from HOW PostgreSQL, Redis, or JSON files implement it
`from abc import ABC, abstractmethod`, preventing instantiation of incomplete subclasses at instantiation time
Strong `has-a` ownership (`Order` owns `OrderLine` items; `EmployeeService` composes a `Repository` + `Logger`) โ "favor composition over inheritance"
Loose `has-a` relationship where child objects (`Employee`) have an independent lifecycle from the container (`Department`)
C3 Linearization algorithm, inspecting `ClassName.mro()` / `__mro__`, and how `super()` follows MRO in diamond hierarchies
Unambiguous developer `__repr__` vs user-friendly `__str__`, container `__len__`, value equality `__eq__` (returning `NotImplemented` on foreign types), and `__lt__`
`@property` computed getters, `@attr.setter` validation mutators, and read-only attributes without breaking `obj.attr` caller syntax
`from dataclasses import dataclass, asdict`, auto-generated `__init__`, `__repr__`, `__eq__`, type annotations, and `__post_init__` validation
`open(path, mode, encoding="utf-8")`, `.read()`, `.readline()`, `.readlines()`, line-by-line lazy iteration `for line in f:`, and `.write()`
Read `r`, truncate-write `w`, append `a`, exclusive-create `x` (`FileExistsError`), binary `rb`/`wb` for images/PDFs
`with open(...) as f:` deterministic `__enter__` / `__exit__` cleanup even when exceptions are raised mid-block
`csv.reader`, `csv.writer`, `csv.DictReader`, `csv.DictWriter`, `writeheader()`, and `newline=""` requirement
`json.dumps()` / `json.dump(..., indent=2)` and `json.loads()` / `json.load()`, `json.JSONDecodeError`, and custom serializers
Binary Python object serialization (`pickle.dumps`/`loads`), Python-only format limitations, and arbitrary code execution security risks
`from pathlib import Path`, `/` path joining, `.resolve()`, `.exists()`, `.is_file()`, `.mkdir(parents=True, exist_ok=True)`, `.glob()`, `.read_text()` / `.write_tex...
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.
Module Learning & Hands-On Objectives
Objects implementing `__iter__` (or sequence `__getitem__`), reusable multi-pass containers (`list`, `dict`) vs single-pass streams
Stateful Iterator Protocol (`__iter__` returning `self` + `__next__` raising `StopIteration` when exhausted)
Manual iteration via `it = iter(obj)` and `next(it, default)` sentinel handling without `StopIteration` crashes
Generator functions pausing frame state at `yield`, `yield from` delegation, and `O(1)` memory streaming
Lazy `(expr for x in iterable if cond)` parenthesized expressions passed directly into `sum()`, `any()`, `all()`, `max()`
`@decorator` syntactic sugar (`fn = decorator(fn)`), preserving `__name__`/`__doc__` metadata with `@functools.wraps(fn)`
Parameterized decorator factories (`@retry(max_attempts=3)`) and bottom-up composition order of stacked `@d1` / `@d2` decorators
Lexical scope capture (`__closure__` cell objects) and late-binding loop variable pitfalls in closures
Class-based context manager protocol (`__enter__` resource acquisition, `__exit__(exc_type, exc_val, tb)` cleanup/rollback)
`from contextlib import contextmanager, suppress, ExitStack` generator-based context managers (`try: yield resource finally: cleanup()`)
Set comprehensions `{...}`, dict comprehensions `{k: v ...}`, and nested comprehensions with filtering
Starred target unpacking `first, *middle, last = seq`, nested tuple unpacking, and `{**d1, **d2}` / `[*a, *b]` literals
Assignment expressions `if (m := pattern.search(line)):` and `while (chunk := f.read(8192)):` avoiding duplicate calls
Python 3.10+ `match subject:` with sequence, mapping (`case {"type": "paid", "amount": amt}:`), class, OR (`|`), guard (`if`), and wildcard (`case _:`) patterns
PEP 484/585/604 modern Python 3.12 syntax (`list[str]`, `dict[str, int]`, `str | None`), return `-> None`, and runtime `__annotations__`
`Any` vs `object`, `Literal`, `TypedDict`, `Final`, `Collections.abc.Callable`, and legacy `Optional`/`Union`/`List` in older codebases
Python 3.12 PEP 695 generic syntax `class Page[T]:` and `def first[T](items: list[T]) -> T:` (plus `TypeVar`/`Generic[T]`)
`from typing import Protocol, runtime_checkable` โ static duck typing without forcing nominal `ABC` inheritance
`@dataclass(frozen=True, slots=True, kw_only=True)`, `field(default_factory=..., repr=False)`, and `replace()` immutable updates
`from enum import Enum, IntEnum, StrEnum, auto` for type-safe finite states (`ApplicationStatus`, `UserRole`)
`Counter.most_common()`, `defaultdict(list)` grouping, `namedtuple` lightweight records, and `deque(maxlen=N)` `O(1)` double-ended queues
`@lru_cache(maxsize=256)` / `@cache` memoization, `cache_info()`, `partial()` argument pre-binding, and `@wraps`
`itertools.chain.from_iterable`, `islice`, `batched` (Python 3.12!), `combinations`, `permutations`, and `groupby`
`re.compile()`, raw patterns `r"..."`, `search` vs `match` vs `fullmatch`, `findall`, `sub`, named groups `(?P<id>...)`, and ReDoS awareness
`os.environ.get("KEY", default)` vs mandatory `os.environ["SECRET_KEY"]` fail-fast startup validation, `.env` loading via `python-dotenv`
Layered `BaseConfig` -> `DevConfig` / `TestConfig` / `ProdConfig` dataclasses, `.env.example` templates, and feature flags
Modern PEP 621 `pyproject.toml` metadata, `src/` vs flat layout, editable installs `pip install -e .`, and tool config (`[tool.pytest]`, `[tool.ruff]`)
`python -m venv .venv`, activation on Windows (`.venv\Scripts\activate`) and Linux (`source .venv/bin/activate`), site-packages isolation
Pinned deterministic `requirements.txt` vs `requirements-dev.txt`, semantic version constraints, and `Poetry` (`poetry.lock`) fundamentals
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.
Module Learning & Hands-On Objectives
Source parsing -> AST -> code objects -> bytecode evaluation loop on the Python Virtual Machine stack frame
CPython reference interpreter vs PyPy/Cython, C extension ABI, and why NumPy/psycopg release the GIL in C code
Inspecting stack-machine opcodes (`LOAD_FAST`, `BINARY_OP`, `RETURN_VALUE`), `.pyc` caching, and Python 3.11+ adaptive specializing interpreter
Private CPython heap, `PyObject` header (`ob_refcnt` + `ob_type`), `pymalloc` small-object arenas, and `tracemalloc` profiling
Immediate deterministic deallocation when `ob_refcnt` drops to `0`, inspecting `sys.getrefcount()`, and strong vs `weakref` references
Why reference cycles (`a.peer = b; b.peer = a`) never hit refcount `0`, generational `gc` (Gen 0/1/2), and `gc.collect()`
Shared references across containers, in-place mutation (`+=` on `list` calls `__iadd__`) vs rebinding (`+=` on `tuple`/`str` creates new object)
Memory graph topology of alias (`=`), shallow copy (`copy.copy`), and deep copy (`copy.deepcopy`) on nested state
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
OS threads inside a single shared-memory process, main thread vs daemon threads, and preemptive context switching
`threading.Thread(target=..., args=...)`, `.start()`, `.join(timeout=...)`, and collecting results via thread-safe `queue.Queue`
Mutual exclusion with `threading.Lock()` (`with lock:`), re-entrant `RLock()` when a locked method calls another locked method on `self`
Check-then-act (`if balance >= amt: balance -= amt`) and read-modify-write (`counter += 1` is multiple bytecodes!) non-atomicity
Circular lock wait (`Thread 1 locks A -> waits B`, `Thread 2 locks B -> waits A`) and prevention via canonical lock ordering (`id` sort) & timeouts
`from concurrent.futures import ThreadPoolExecutor, as_completed`, `executor.submit()`, `executor.map()`, `Future.result(timeout=...)`
Separate OS processes, separate Python heaps + separate GILs for true multi-core CPU parallelism, `spawn` vs `fork` start methods
`concurrent.futures.ProcessPoolExecutor` unified `Future` API, pickling overhead vs chunk size (`chunksize`), and CPU core sizing
Why separate processes do NOT share global variables, passing messages safely via `multiprocessing.Queue` and two-endpoint `Pipe`
Memory footprint, startup latency, GIL impact, crash isolation, and state-sharing trade-offs between threads and processes
Cooperative single-threaded multitasking vs preemptive OS threads, non-blocking sockets (`epoll`/`IOCP`), and why blocking the loop freezes all requests
`async def` coroutine functions, coroutine objects (do nothing until awaited!), and `await` suspension points
`asyncio.run()` lifecycle, ready queue vs I/O selector callbacks, `asyncio.get_running_loop()`, and `asyncio.to_thread()` for legacy sync calls
`asyncio.sleep`, `asyncio.wait_for(coro, timeout=...)`, `asyncio.Semaphore` concurrency throttling, and `asyncio.Queue`
Scheduling coroutines eagerly on the loop with `asyncio.create_task()`, task cancellation (`task.cancel()`), and Python 3.11+ `asyncio.TaskGroup`
`await asyncio.gather(*aws, return_exceptions=True)` result ordering and partial failure handling across concurrent calls
`__aenter__` and `__aexit__` protocol and `@contextlib.asynccontextmanager` for async DB sessions and HTTP client pools
`__aiter__` and `async def __anext__` (`StopAsyncIteration`) consumed via `async for item in stream:`
`async def` containing `yield`, async generator comprehensions, and `contextlib.aclosing()` deterministic cleanup
Using `httpx.AsyncClient(timeout=...)`, connection pooling, `raise_for_status()`, and concurrent outbound REST API calls
Architecture decision matrix: `asyncio` vs `ThreadPoolExecutor` vs `ProcessPoolExecutor` vs Celery/Kafka distributed queues
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.
Module Learning & Hands-On Objectives
Why algorithmic efficiency matters in backend APIs (10ms vs 30s timeout on 100k rows) and structured interview problem-solving
Counting dominant operations across single loops, nested loops, halving loops, and hidden Python library costs (`x in list` is `O(n)`!)
Auxiliary memory vs input memory, recursion call-stack depth `O(h)`, slice copy allocations `arr[i:j]`, and in-place `O(1)` algorithms
Asymptotic growth hierarchy, dropping constants/lower-order terms, best/average/worst cases, and amortized `O(1)` `list.append`
Over-allocated C pointer array backing Python `list`, `O(1)` indexing & tail `append`/`pop`, `O(n)` middle `insert`/`pop(i)`
Single-pass read/write index pointers, Dutch National Flag 3-way partition (`0, 1, 2`), and cyclic index placement
Character frequency arrays (`ord(c) - ord("a")`) / `Counter`, two-pointer palindrome checks, anagram grouping, and center expansion
Complement lookup (`target - x` in `seen`), index mapping, frequency counting, and `OrderedDict` `O(1)` LRU cache design
`O(1)` `set` existence checks, sequence-start detection (`x - 1 not in num_set`), and cycle/duplicate detection
Converging opposite-end pointers (`l = 0, r = n - 1`) on sorted arrays, Container With Most Water, 3Sum, and Trapping Rain Water
Fixed-size `k` rolling window and variable `[l..r]` window expanding `r` and shrinking `l` while invariant is violated
`pref[i + 1] = pref[i] + nums[i]` for `O(1)` range sums, prefix-sum + hashmap (`pref - k`) subarray counting, and difference arrays
Iterative binary search (`l <= r` vs lower-bound `l < r`), `bisect_left` / `bisect_right`, rotated sorted search, and binary search on answer space
In-place comparison sorts, stability definition, and why Insertion Sort runs in `O(n)` on nearly-sorted data
Stable `O(n log n)` Merge Sort, randomized Quick Sort partitioning, Python Timsort `key=` functions, and interval merging
Recurrence relations, divide-and-conquer fast modular exponentiation, recursion trees, and call-stack space analysis
Choose -> Explore -> Unchoose (`path.append` / `dfs` / `path.pop`) template for Subsets, Permutations, Combination Sum, and N-Queens
`ListNode` pointer rewiring, dummy sentinel heads, Floydโs fast/slow tortoise-hare cycle & middle detection, and Doubly Linked List LRU nodes
LIFO stack via Python `list` (`append`/`pop`), balanced brackets, `MinStack`, and monotonic stack (`Next Greater Element`, `Daily Temperatures`)
FIFO queue with `collections.deque` (`append` + `popleft` in `O(1)`), circular queues, and monotonic deque (`Sliding Window Maximum`)
`TreeNode(val, left, right)`, height/depth, diameter, balanced check, symmetric tree, and path sum recursion
Strict BST range invariant `(min_val < node.val < max_val)`, `O(h)` search/insert/delete, Kth smallest via inorder, and BST LCA
Recursive & iterative DFS traversals (`inorder`, `preorder`, `postorder`) and `deque` BFS `levelOrder` / right-side view
`heapq.heappush`, `heappop`, `heapify` (`O(n)`!), max-heap via `-val` negation, Top-K Frequent, Kth Largest, and Merge K Sorted Lists
Directed vs undirected, weighted vs unweighted graphs, `defaultdict(list)` adjacency lists (`O(V + E)` space) vs `V x V` matrices
Shortest unweighted path via `deque`, multi-source BFS (`Rotting Oranges`), and Kahnโs in-degree Topological Sort
Recursive and explicit-stack DFS, connected components, grid flood-fill, and 3-color (`0=unvisited, 1=visiting, 2=done`) directed cycle detection
Greedy-choice property vs DP, earliest-finish-time interval scheduling, Jump Game reachability, and Gas Station circular tour
Overlapping subproblems + optimal substructure, top-down `@lru_cache` memoization vs bottom-up 1D/2D tabulation (Climbing Stairs, House Robber, Coin Change, LIS, LCS...
XOR self-cancellation (`Single Number`), `n & (n - 1)` Brian Kernighan set-bit clearing, `(n & -n)` lowest set bit, and power-of-two check
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`.
Module Learning & Hands-On Objectives
Distributed Version Control (DVCS), auditability, blame history, safe experimentation, and team rollback guarantees
Three-tree model: Working Tree -> Staging Area (`.git/index`) -> Local `.git/objects` DAG (`blob`, `tree`, `commit` SHA-1/SHA-256)
`git config --global user.name`, `user.email`, `init.defaultBranch main`, `core.autocrlf` (Windows `true` vs Linux `input`), and SSH keys
Initializing `.git` at project root, verifying repository boundaries, and immediate `.gitignore` creation before first `git add`
Interpreting untracked, unstaged, staged, ahead/behind remote tracking indicators before every commit
Explicit file staging `git add src/models.py`, interactive hunk staging `git add -p`, and unstaging via `git restore --staged`
Conventional Commits (`feat:`, `fix:`, `refactor:`, `test:`, `docs:`) explaining WHY a change was made in small atomic units
`git log --oneline --graph --decorate --all`, `-p` patch view, `-S "symbol"` pickaxe search, and file history
Unstaged `git diff`, staged `git diff --staged`, and branch-to-branch `git diff main...feat/search` self-review
Lightweight 41-byte `HEAD` pointer mechanics, naming conventions (`feat/...`, `fix/...`, `chore/...`), `-a` listing, and `-d` cleanup
Modern `git switch <branch>` and `git switch -c <new-branch>` vs `git restore` (replacing ambiguous overloaded `git checkout`)
Fast-forward pointer advance vs 3-way merge commit (`--no-ff`) vs Squash & Merge on Pull Requests
Reading `<<<<<<< HEAD`, `=======`, `>>>>>>> branch` markers, resolving semantic intent, running `pytest`, and completing merge
Replaying feature commits linearly atop latest `origin/main` (`git rebase main`), `--continue`/`--abort`, and the Golden Rule of Rebase
`git stash push -u -m "wip: ..."`, `git stash list`, `git stash pop` vs `apply`, and `git stash drop`
`--soft` (moves `HEAD` only), `--mixed` (unstages too), `--hard` (DESTROYS working changes!), and `git reflog` recovery
Creating a new inverse commit via `git revert <sha>` to undo broken commits safely on shared `main` without rewriting history
`git remote -v`, `origin` vs `upstream`, SSH (`git@github.com:...`) vs HTTPS PAT remotes, and `git remote set-url`
Cloning full history vs shallow CI clones `git clone --depth 1`, automatic `origin` remote setup, and post-clone `.venv` bootstrap
Safely downloading remote commits/refs (`origin/main`) via `git fetch --prune` WITHOUT mutating your local working files
`git pull --ff-only` vs `git pull --rebase` and avoiding accidental merge-bubble commits on local branches
Publishing feature branches `git push -u origin feat/search`, branch protection rules, and `--force-with-lease` safety after local rebase
Branch protection on `main`, required status checks, Issue templates, Releases/tags (`v1.0.0`), and Dependabot security alerts
Draft vs Ready PRs, concise PR descriptions (Summary, Changes, Test Plan), linking Issues (`Closes #12`), and addressing review threads
Excluding `__pycache__/`, `*.py[cod]`, `.venv/`, `.env`, `.pytest_cache/`, `.mypy_cache/`, `.ruff_cache/`, `*.log`, `*.sqlite3`, and un-tracking leaked files via `gi...
Writing recruiter- and engineer-ready `README.md`: architecture overview, tech stack, setup commands, `.env` table, sample CLI/API usage, and test commands
GitHub Flow (short-lived feature branches -> PR -> CI -> `main`) vs GitFlow release branches and trunk-based delivery
Checking SQL injection/secrets, mutable defaults, `N+1` queries, missing timeouts, bare `except:`, edge cases, and test coverage
User stories, acceptance criteria, backlog refinement, 1โ2 week Sprints, Definition of Done (code + tests + docs + PR), and standups
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.
Module Learning & Hands-On Objectives
Why flat JSON/CSV files fail under concurrent multi-user writes, durability, crash recovery, and DBMS responsibilities
Relations (tables), tuples (rows), attributes (columns), schemas, catalog metadata, client-server TCP protocol, and WAL durability
PostgreSQL (primary production RDBMS), SQLite (embedded file DB for local/tests), MySQL fundamentals, vs document/key-value stores
Installing PostgreSQL 16 (native & Docker), roles/users, `postgresql.conf`, `pg_hba.conf`, port `5432`, and least-privilege app users
`psql` CLI meta-commands (`\l`, `\c`, `\dt`, `\d+ table`, `\timing`) and visual schema/explain inspection in `pgAdmin`
`CREATE DATABASE ... ENCODING 'UTF8'`, `DROP DATABASE IF EXISTS`, and isolated `dev` / `test` / `prod` databases
`CREATE TABLE IF NOT EXISTS`, `GENERATED ALWAYS AS IDENTITY` (modern SQL standard over legacy `SERIAL`), `ALTER TABLE`, `DROP TABLE`
`BIGINT`/`INTEGER`, exact `NUMERIC(12, 2)` vs `DOUBLE PRECISION`, `VARCHAR(n)`/`TEXT`, `DATE`/`TIMESTAMPTZ` (always timezone-aware!), `BOOLEAN`, `UUID`, `JSONB`
Single & composite `PRIMARY KEY`, `FOREIGN KEY ... REFERENCES ... ON DELETE RESTRICT/CASCADE/SET NULL`, and `UNIQUE` indexes
`NOT NULL` mandatory columns, `CHECK (salary >= 0 AND max_salary >= min_salary)` domain invariants, and server-side `DEFAULT` values
Single-row and multi-row batch `INSERT INTO ... VALUES`, PostgreSQL `RETURNING id`, and idempotent `ON CONFLICT DO NOTHING / DO UPDATE` upserts
Explicit column projection `SELECT id, emp_code, email` vs `SELECT *`, computed expressions, `CASE WHEN ... END`, and `COALESCE()`
Comparison predicates (`=`, `<>`, `<`, `<=`, `>`, `>=`), 3-valued `NULL` logic (`IS NULL` / `IS NOT NULL`), and sargable index-friendly predicates
`SELECT DISTINCT col1, col2` and PostgreSQL `SELECT DISTINCT ON (department_id) ... ORDER BY ...` latest-per-group idiom
Multi-column `ASC`/`DESC` sorting, `NULLS LAST` / `NULLS FIRST`, and deterministic tie-breaker `ORDER BY created_at DESC, id DESC`
Offset pagination (`LIMIT 20 OFFSET 40`) vs Keyset/Cursor pagination (`WHERE (created_at, id) < (...) LIMIT 20`) at deep pages
Targeted `UPDATE ... SET ... WHERE ... RETURNING *`, atomic in-place increments `SET stock = stock - 1 WHERE id = $1 AND stock >= 1`
Guarded `DELETE FROM ... WHERE ... RETURNING id`, `TRUNCATE` vs `DELETE`, and soft-delete (`deleted_at TIMESTAMPTZ`) audit patterns
`AND` binds tighter than `OR` (always parenthesize `OR`!), `IN (...)`, and `NOT EXISTS` vs `NOT IN` null safety
Inclusive `BETWEEN low AND high` (`col >= low AND col <= high`) vs half-open `[start, next_day)` timestamp ranges
`%` (0+ chars) and `_` (1 char) wildcards, PostgreSQL case-insensitive `ILIKE`, escaping literal `%`/`_`, and why leading `'%python%'` skips standard B-Tree indexes
`COUNT(*)` (all rows) vs `COUNT(col)` (non-null only!) vs `COUNT(DISTINCT col)`, `SUM`, `AVG`, `MIN`, `MAX`, and PostgreSQL `FILTER (WHERE ...)`
Grouping by one or multiple columns/expressions and the SQL functional-dependency rule (every non-aggregated `SELECT` column must be grouped)
SQL logical execution order (`FROM -> WHERE -> GROUP BY -> HAVING -> SELECT -> DISTINCT -> ORDER BY -> LIMIT`) and filtering aggregated groups with `HAVING`
Readable column aliases (`AS monthly_ctc`) and concise table aliases (`employees AS e`, `departments AS d`) across joins and subqueries
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`).
Module Learning & Hands-On Objectives
Equi-joins across 2+ tables (`JOIN ... ON e.department_id = d.id`) returning rows with matching keys in both tables
Preserving all left-table rows (`NULL`-extending unmatched right columns), anti-join `WHERE r.id IS NULL`, and `ON` vs `WHERE` filter placement
`RIGHT OUTER JOIN` mechanics and why rewriting `A RIGHT JOIN B` as `B LEFT JOIN A` improves query readability
Preserving unmatched rows from BOTH sides (`FULL OUTER JOIN`) with `COALESCE(a.key, b.key)` for financial reconciliation
Intentional `M x N` Cartesian product (`CROSS JOIN` + `generate_series`) for date-spine matrix reports vs accidental runaway joins
Joining a table to itself using mandatory distinct aliases (`employees AS emp LEFT JOIN employees AS mgr ON mgr.id = emp.manager_id`)
Scalar subqueries (`= (SELECT AVG(salary) ...)`), multi-row `IN` / `ANY` / `ALL`, and derived inline tables in `FROM`
Inner subqueries referencing outer-row columns (`EXISTS (SELECT 1 FROM job_applications a WHERE a.job_id = j.id)`) and semi-join optimization
`WITH cte_name AS (...)` modular named sub-queries for readable multi-stage analytical pipelines and data-modifying CTEs
`WITH RECURSIVE` anchor member + `UNION ALL` recursive member + depth guard for org charts and nested category trees
Computing per-partition metrics via `AVG(salary) OVER (PARTITION BY department_id)` WITHOUT collapsing detail rows like `GROUP BY`
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
`LAG(col, 1, 0) OVER (...)`, `LEAD()`, cumulative running totals `SUM(amt) OVER (ORDER BY dt ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)`
`CREATE OR REPLACE VIEW` stored virtual queries for reusable joins, column masking, and stable reporting contracts
`CREATE MATERIALIZED VIEW`, physical precomputed storage, indexing materialized views, and `REFRESH MATERIALIZED VIEW CONCURRENTLY`
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
Leftmost-prefix rule `(a, b, c)`, equality columns BEFORE range/sort columns (`(status, city, created_at DESC)`), and Index-Only Scans (`INCLUDE`)
Reading `EXPLAIN (ANALYZE, BUFFERS)` bottom-up: `Seq Scan`, `Index Scan`, `Index Only Scan`, `Bitmap Heap Scan`, `Hash Join`, `Nested Loop`, and estimated vs actual...
All-or-nothing multi-statement units (`BEGIN`, `COMMIT`, `ROLLBACK`, `SAVEPOINT`), auto-commit pitfalls, and keeping transactions short
Atomicity (undo/rollback), Consistency (constraints/invariants), Isolation (MVCC snapshots), and Durability (WAL fsync on disk)
Dirty Read, Non-Repeatable Read, Phantom Read, Write Skew anomalies across `READ COMMITTED` (PostgreSQL default), `REPEATABLE READ`, and `SERIALIZABLE`
Pessimistic `SELECT ... FOR UPDATE` / `FOR UPDATE SKIP LOCKED` row locks vs optimistic `version` counter checks (`WHERE id = $1 AND version = $2`)
Why two concurrent transactions updating rows `(1, 2)` vs `(2, 1)` deadlock, PostgreSQL deadlock detector (`deadlock_timeout`), and canonical ID sorting
1NF (atomic columns, no comma-separated `"Python,SQL"` lists!), 2NF (no partial composite-key dependency), 3NF (no transitive non-key dependency), and controlled den...
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)
Crowโs Foot cardinality notation (`||--o{`, `}o--o{`), associative entities carrying metadata (`applied_at`, `status`), and audit columns
Choosing deliberately between `ON DELETE RESTRICT` (financial/orders), `ON DELETE CASCADE` (owned child items), and `ON DELETE SET NULL` (optional manager)
PL/pgSQL `CREATE FUNCTION` vs `CREATE PROCEDURE`, when DB routines help vs why business logic primarily lives in versioned Python services
`BEFORE UPDATE` / `AFTER INSERT` row-level triggers (`NEW`, `OLD`) for automatic `updated_at` stamps and immutable audit trails
Logical backups via `pg_dump -Fc` custom compressed format, `pg_restore`, point-in-time WAL concepts, and verifying restores regularly
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.
Module Learning & Hands-On Objectives
PEP 249 DB-API 2.0 standard (`connect`, `cursor`, `execute`, `commit`, `rollback`), `sqlite3` built-in vs `psycopg` 3 vs `asyncpg`
`psycopg.connect(conninfo)`, `dict_row` row factories returning typed dicts instead of positional tuples, and environment DSN loading
TCP + TLS + PostgreSQL backend process cost per connection, `connect_timeout`, idle-in-transaction timeouts, and clean `close()`
`with conn.cursor() as cur:`, `cur.execute()`, `executemany()`, `fetchone()`, `fetchall()`, `fetchmany(size)`, and server-side cursors
Implementing clean repository `create`, `get_by_id`, `list_paginated`, `update`, and `delete` methods over DB-API cursors
Driver parameter binding (`%s` / `%(name)s` in `psycopg`, `?` in `sqlite3`) keeping SQL AST separate from untrusted user data
Grouping multi-table mutations inside `with conn.transaction():` so exceptions automatically `ROLLBACK` all partial writes
`psycopg_pool.ConnectionPool` and SQLAlchemy `QueuePool` (`pool_size`, `max_overflow`, `pool_pre_ping=True`, `pool_recycle`)
Nested `with pool.connection() as conn:` and `with Session(engine) as session:` guaranteeing connection return to pool on exit
Unified SQLAlchemy 2.0 architecture: Dialect + Pool -> Core SQL Expression Language -> ORM Unit of Work & Identity Map
`MetaData`, `Table`, composable Pythonic `select()`, `insert()`, `update()`, `join()`, and `func.count()` without ORM object overhead
Data Mapper pattern (unlike Active Record), Identity Map (`1` Python instance per PK per `Session`), dirty tracking, and `flush()` vs `commit()`
`create_engine(DATABASE_URL, pool_pre_ping=True, pool_size=10, echo=False)` โ creating ONE module-singleton `Engine` per process
`SessionLocal = sessionmaker(bind=engine, autoflush=False, expire_on_commit=False)`, one `Session` per request/task (NEVER shared across threads!)
`class Base(DeclarativeBase): pass`, `__tablename__`, `Mapped[int] = mapped_column(primary_key=True)`, `Mapped[str | None]`, `String(120)`, `Numeric(12, 2)`
`ForeignKey("departments.id")`, bidirectional `relationship(back_populates=...)`, `1:1` (`uselist=False`), `1:N`, `M:N` `secondary` table, and `cascade="all, delete-...
`session.scalars(select(Employee).where(...).order_by(...)).all()`, `.scalar_one_or_none()`, `session.get(Employee, pk)`, and `func.count()`
How default `lazy="select"` fires an extra SQL query on attribute access `emp.department.name`, and `DetachedInstanceError` outside session scope (plus `MissingGreen...
`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)
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
`alembic init`, configuring `env.py` (`target_metadata = Base.metadata` + `DATABASE_URL` from env), `alembic.ini`, and `alembic_version` tracking table
`alembic revision --autogenerate -m "add_employee_phone"`, ALWAYS reviewing autogenerated `upgrade()`/`downgrade()` scripts, and safe nullable -> backfill -> `NOT NU...
Nested SAVEPOINT transaction rollback fixtures per test (`session.begin_nested()`), factory helpers, and testing real constraint/integrity errors
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`.
Module Learning & Hands-On Objectives
Document, Key-Value (Redis), Wide-Column, and Graph NoSQL families vs relational PostgreSQL tables & PostgreSQL `JSONB`
Databases -> Collections -> JSON-like Documents, Replica Sets (high availability), and Sharding (horizontal partition keys) overview
Binary JSON (`BSON`), 12-byte `ObjectId` (timestamp + random + counter), `Date`, `Decimal128` for money, and the `16 MB` max document size limit
Lazy database/collection creation on first write, explicit `create_collection` with `$jsonSchema` validator rules, and `drop()`
`insert_one` / `insert_many`, `find_one` / `find`, atomic `$set` / `$inc` / `$push` in `update_one`, and `delete_one` / `delete_many`
`$eq`, `$ne`, `$gt`, `$gte`, `$lt`, `$lte`, `$in`, `$nin`, `$and`, `$or`, `$exists`, and array `$all` / `$elemMatch`
Inclusion projection `{"title": 1, "company": 1, "_id": 0}` vs exclusion `{"raw_resume_text": 0}` to cut network payload size
`.sort([("created_at", -1), ("_id", -1)]).skip(offset).limit(page_size)` vs range-based `_id < last_id` cursor pagination
Co-locating `1:1` and bounded `1:few` data (`company.headquarters_address`, `order.shipping_snapshot`) for single-read atomicity
Storing `employer_id` / `user_id` references across separate collections for `1:many` (unbounded) and `many:many` relationships
Single-field, compound `(tenant_id: 1, created_at: -1)` (ESR rule: Equality, Sort, Range), `unique=True`, TTL indexes (`expireAfterSeconds`), and `.explain("executio...
Multi-stage pipeline `[ {"$match": ...}, {"$group": ...}, {"$sort": ...}, {"$limit": ...} ]` placing indexed `$match` FIRST
Left-outer collection join via `{"$lookup": {"from": ..., "localField": ..., "foreignField": ..., "as": ...}}` and why heavy joins signal relational data
Replica-set `with client.start_session() as s: with s.start_transaction():` vs single-document atomicity design
`from pymongo import MongoClient, ASCENDING, DESCENDING`, singleton `MongoClient` thread-safe pooling, Pydantic serialization (`model_dump()`), and error handling
`motor.motor_asyncio.AsyncIOMotorClient` (and PyMongo async API) for non-blocking `await collection.find_one(...)` inside FastAPI `async def` routes
Practical decision checklist: cardinality (`1:few` bounded -> embed; `1:many` unbounded -> reference), read/write ratio, and independent access patterns
Polyglot persistence architecture: PostgreSQL (users, auth, orders, wallets, HR, strict relations) + Redis (cache/locks/queues) + MongoDB (flexible catalogs/events)
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.
Module Learning & Hands-On Objectives
Model-Template-View (MTV) mapping to MVC, URL dispatcher -> Middleware -> View -> ORM Model -> Response lifecycle
Batteries-included Django + DRF (ORM, Admin, Auth, Migrations) vs ASGI type-driven FastAPI (Pydantic, async microservices) vs minimalist WSGI Flask exposure
Isolated `.venv`, installing `Django>=5.1,<5.2` + `psycopg[binary]` + `python-dotenv`, and freezing deterministic dependencies
Django LTS vs feature release cadence, `python -m django --version`, security patch upgrades, and compatibility with Python 3.12
`django-admin startproject config .` clean root-level `manage.py` layout (avoiding double-nested `project/project/` folders!)
`python manage.py startapp jobs`, cohesive bounded Django apps (`accounts`, `companies`, `jobs`, `applications`), and registering `AppConfig` in `INSTALLED_APPS`
Responsibilities of `manage.py`, `config/settings.py`, root `config/urls.py`, synchronous `wsgi.py` (Gunicorn), and async `asgi.py` (Uvicorn)
Loading `SECRET_KEY`, `DEBUG`, `ALLOWED_HOSTS`, and PostgreSQL `DATABASES` strictly from environment variables (`os.environ`)
`path()`, `include()` app URL delegation, `app_name` namespaces, typed converters (`<int:pk>`, `<slug:slug>`, `<uuid:id>`), and `reverse()`
Explicit `def view(request, ...):` handlers, `@require_http_methods(["GET", "POST"])`, and `JsonResponse`
`django.views.View`, HTTP method dispatch (`.get()`, `.post()`), `View.as_view()`, `ListView`/`DetailView`, and method flow (`setup -> dispatch`)
`request.method`, `request.GET` (`QueryDict`), `request.POST`, `request.body`, `request.headers`, `request.META`, `HttpResponse`, `JsonResponse`, status codes
DTL context variables `{{ var }}`, auto-escaping XSS protection, filters (`|date`, `|default`), and tags (`{% if %}`, `{% for %}`, `{% url %}`)
`base.html` master skeleton, `{% block content %}`, `{% extends "base.html" %}`, and reusable `{% include %}` partials
`STATIC_URL`, `STATIC_ROOT`, `collectstatic` (WhiteNoise/Nginx/CDN) vs user-uploaded `MEDIA_URL` / `MEDIA_ROOT` / S3 `STORAGES`
`forms.Form` vs `forms.ModelForm`, explicit `fields = [...]` allowlists, `{% csrf_token %}`, and `form.is_valid()` + `cleaned_data`
Field validators -> `clean_<fieldname>()` single-field normalization -> `clean()` cross-field validation (`max_salary >= min_salary`) -> `ValidationError`
`models.Model` subclasses, implicit `BigAutoField` PK (`DEFAULT_AUTO_FIELD`), `class Meta` (`db_table`, `ordering`, `indexes`, `constraints`), and `__str__`
`CharField`, `SlugField`, `TextField`, `DecimalField(max_digits=12, decimal_places=2)`, `BooleanField`, `DateTimeField(auto_now_add=True)`, `UUIDField`, `TextChoices...
`makemigrations`, `sqlmigrate <app> <num>` (inspecting exact SQL!), `migrate`, `showmigrations`, data migrations (`RunPython`), and zero-downtime awareness
`@admin.register(JobPosting)`, `list_display`, `list_filter`, `search_fields`, `readonly_fields`, `raw_id_fields` / `autocomplete_fields`, and `list_select_related`
Lazy `QuerySet` chaining, exact evaluation triggers (iteration, slicing with step, `len()`, `list()`, `bool()`), QuerySet caching, and `.exists()` / `.count()`
`objects.create()`, `bulk_create()`, `get_or_create()`, `update_or_create()`, `.save(update_fields=[...])`, QuerySet `.update()`, and `.delete()`
Field lookups (`__iexact`, `__icontains`, `__in`, `__gte`, `__isnull`), `Q()` boolean OR/NOT composition, `F()` atomic DB expressions, and `annotate(Count(...))`
Explicit `on_delete=models.CASCADE / PROTECT / SET_NULL`, explicit `related_name="jobs"`, `OneToOneField` (`CandidateProfile`), and `ManyToManyField(..., through=......
`select_related("company", "company__owner")` (`SQL INNER/LEFT JOIN` for FK/OneToOne) vs `prefetch_related("skills", Prefetch(...))` (separate `IN` query for M2M/rev...
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.
Module Learning & Hands-On Objectives
Statelessness, resource-noun URLs (`/jobs`, NOT `/getAllJobs`), uniform interface, representations, and idempotency
Safe (`GET`, `HEAD`, `OPTIONS`) vs Idempotent (`GET`, `PUT`, `DELETE`) vs Non-idempotent (`POST`), and full replacement `PUT` vs partial update `PATCH`
`200 OK`, `201 Created` (+ `Location`), `204 No Content`, `400 Bad Request`, `401 Unauthorized` (unauthenticated!), `403 Forbidden` (unauthorized!), `404`, `409 Conf...
`Content-Type: application/json` vs `multipart/form-data`, `Accept`, `Authorization: Bearer <jwt>`, `X-Request-ID`, and `Retry-After`
Consistent `snake_case` (or camelCase adapter) field naming, ISO-8601 UTC timestamps (`2026-11-18T06:30:00Z`), stringified `Decimal` money (`"85000.00"`), and nullab...
Installing `djangorestframework`, `REST_FRAMEWORK` central settings dict, DRF `Request` (`request.data`, `request.query_params`) & `Response` content negotiation
`serializers.Serializer` for non-model inputs (login, password reset, search filters), `is_valid(raise_exception=True)`, `validated_data`, and `.data`
`serializers.ModelSerializer`, explicit `fields` + `read_only_fields` (`id`, `employer`, `created_at`), `write_only` secrets, nested read vs PK/slug write serializer...
`validate_<field>(self, value)` single-field rules, `validate(self, attrs)` cross-field checks (handling partial `PATCH` with `self.instance`!), and `UniqueTogetherV...
`rest_framework.views.APIView` (auth -> permission -> throttle pipeline BEFORE `get`/`post`/`patch`/`delete` runs) and `@api_view` decorator
`GenericAPIView` (`get_queryset()`, `get_serializer_class()`, `lookup_field`) and concrete `ListCreateAPIView`, `RetrieveUpdateDestroyAPIView`
`ListModelMixin`, `CreateModelMixin`, `RetrieveModelMixin`, `UpdateModelMixin`, `DestroyModelMixin` and `perform_create` / `perform_update` hooks
`ViewSet`, `ReadOnlyModelViewSet`, `ModelViewSet`, switching serializers per action (`if self.action == "list":`), and custom `@action(detail=True, methods=["post"])...
`SimpleRouter` vs `DefaultRouter`, `router.register("jobs", JobViewSet, basename="job")`, trailing slash config, and generated URL names (`job-list`, `job-detail`)
End-to-end `POST 201`, `GET 200` list/detail, `PATCH 200`, `PUT 200`, and `DELETE 204` with PostgreSQL persistence and eager-loaded QuerySets
Installing `django-filter`, `DjangoFilterBackend`, custom `FilterSet` (`min_salary = NumberFilter(field_name="min_salary", lookup_expr="gte")`, `is_remote`, `city__i...
`filters.SearchFilter`, `search_fields = ["title", "company__name", "=job_code"]` (`^` prefix, `=` exact, `@` PostgreSQL full-text search)
`filters.OrderingFilter`, explicit `ordering_fields = ["published_at", "min_salary"]` allowlist, and default `ordering = ["-published_at", "-id"]`
Custom `StandardResultsSetPagination(PageNumberPagination)` (`page_size = 20`, `page_size_query_param = "page_size"`, `max_page_size = 100`) vs `CursorPagination`
`IsAuthenticated`, `IsAuthenticatedOrReadOnly`, `IsAdminUser`, custom `BasePermission` (`has_permission` view-level vs `has_object_permission` row-level!), and `&`/`...
`AnonRateThrottle`, `UserRateThrottle`, `ScopedRateThrottle` (`login: "5/min"`), Redis cache backing, `X-Forwarded-For` proxy config (`NUM_PROXIES`), and `429 Retry-...
`URLPathVersioning` (`/api/v1/jobs/`) vs `NamespaceVersioning` vs `AcceptHeaderVersioning`, `request.version`, and backward-compatible deprecation
Consistent pagination (`count`, `next`, `previous`, `results`) and error envelope (`{"error": {"code": "...", "message": "...", "details": ...}}`) conventions
Writing a custom `EXCEPTION_HANDLER` wrapping DRF `exception_handler(exc, context)`, translating domain/Django `ValidationError` & `IntegrityError` cleanly, never le...
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.
Module Learning & Hands-On Objectives
`django.contrib.auth` architecture: `User`, `AuthenticationBackend`, `authenticate()`, `Permission`, and `Group`
Fields on default `auth.User` (`username`, `email`, `password`, `is_active`, `is_staff`, `is_superuser`, `last_login`, `date_joined`) and why `username`-first is lim...
Defining `class User(AbstractUser):` (`USERNAME_FIELD = "email"`, unique case-insensitive email, `role` enum) and `AUTH_USER_MODEL = "accounts.User"` BEFORE initial...
`POST /api/v1/auth/register/` (`write_only=True` password, `validate_password()` strength validators, normalized lowercase email, atomic profile creation)
`POST /api/v1/auth/login/` generic `"Invalid email or password"` error (preventing account enumeration!), rate throttling, and inactive user rejection
`PASSWORD_HASHERS` (`Argon2PasswordHasher` primary, `PBKDF2PasswordHasher`), per-user cryptographic salt, work factors, and transparent hash upgrades
`PasswordResetTokenGenerator` (`default_token_generator`), `urlsafe_base64_encode(uid)`, single-use time-bounded tokens, and revoking existing refresh tokens on rese...
Stateful `sessionid` (`HttpOnly`, `Secure`, `SameSite=Lax`) cookie + Redis session store (`SESSION_ENGINE`) + mandatory CSRF protection
`rest_framework.authtoken` opaque DB-backed token vs stateless JWT trade-offs (1 DB lookup per request & single non-expiring token per user)
`header.payload.signature` Base64URL anatomy (`alg`, `sub`, `exp`, `iat`, `jti`), HMAC `HS256` vs asymmetric `RS256`, and why JWT payload is SIGNED (tamper-proof), N...
Installing `djangorestframework-simplejwt`, `JWTAuthentication`, `TokenObtainPairView`, `TokenRefreshView`, and custom minimal token claims
Setting `ACCESS_TOKEN_LIFETIME = timedelta(minutes=15)`, skew leeway, `Bearer <token>` verification, and minimizing revocation window
`ROTATE_REFRESH_TOKENS = True`, `BLACKLIST_AFTER_ROTATION = True`, `rest_framework_simplejwt.token_blacklist`, and `POST /auth/logout/` (`TokenBlacklistView`)
Clear architectural separation: Authentication (`request.user` identity -> `401`) vs Authorization (role + resource ownership policy -> `403`)
`IsCandidate`, `IsEmployer`, `IsPlatformAdmin` DRF permission classes + object-level ownership (`application.job.company.owner_id == request.user.id`)
`Group`, `Permission` (`jobs.publish_jobposting`), `user.has_perm()`, and seeding standard staff roles (`Moderator`, `SupportReadOnly`) via migrations/commands
Same-Origin Policy, `OPTIONS` preflight requests, `django-cors-headers` middleware placement (top of `MIDDLEWARE`!), and explicit `CORS_ALLOWED_ORIGINS` allowlist
How browsers auto-attach cookies cross-site, `CsrfViewMiddleware`, `SameSite=Lax/Strict`, and why `Authorization: Bearer` header APIs are immune whereas cookie auth...
Stored vs Reflected XSS, HTML escaping, sanitizing rich-text Markdown/HTML descriptions (`nh3` / `bleach`), and `Content-Type: application/json` (`nosniff`)
Parameterized Django `QuerySet` safety vs dangerous escape hatches (`raw()`, `extra()`, `RawSQL`) when developers interpolate f-strings
`SecurityMiddleware`: `SECURE_SSL_REDIRECT`, `SECURE_HSTS_SECONDS = 31536000`, `SECURE_CONTENT_TYPE_NOSNIFF = True`, `X_FRAME_OPTIONS = "DENY"`, `Content-Security-Po...
Zero secrets in Git, rotating leaked keys immediately, `django-environ` / `pydantic-settings`, AWS Secrets Manager / GitHub Encrypted Secrets
`MultiPartParser` & `FormParser`, `FileField(upload_to=...)` with UUID randomized filenames (preventing path traversal & overwrites!), and S3 `django-storages`
3-layer upload validation: max size (`<= 5 MB`), extension allowlist (`.pdf`, `.docx`), AND magic-byte header inspection (`%PDF-` / ZIP PK header โ never trust clien...
`EMAIL_BACKEND` (`console` in dev, `locmem` in tests, `smtp`/SES in prod), `EmailMultiAlternatives` (plain text + HTML), timeouts (`EMAIL_TIMEOUT = 10`)
Serving interactive `/api/schema/swagger-ui/` and `/api/schema/redoc/` with Bearer JWT `Authorize` button for frontend & QA collaboration
Installing `drf-spectacular`, `AutoSchema`, `@extend_schema(summary=..., request=..., responses={201: ...})` annotations, and CI schema validation (`spectacular --va...
Organizing Postman Collections (`Auth`, `Companies`, `Jobs`, `Applications`), Environment variables (`{{base_url}}`, `{{access_token}}`), post-response token capture...
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.
Module Learning & Hands-On Objectives
Organizing `config/settings/{base,dev,test,prod}.py`, `apps/{accounts,companies,jobs,applications,notifications}/`, and shared `common/` utilities
Bounded domain cohesion per app, unidirectional dependency rules (`applications` -> `jobs` -> `companies` -> `accounts`), avoiding circular FK/service imports
Extracting business write rules (`submit_job_application(*, candidate, job, resume_file)`) into `services.py` keeping DRF ViewSets thin HTTP adapters
Centralizing optimized read queries (`list_published_jobs`, `get_employer_job_detail`) in `selectors.py` with baked-in `select_related`/`prefetch_related`
Writing sync/async-compatible middleware (`__init__(get_response)` + `__call__(request)`), injecting `X-Request-ID` & measuring `X-Response-Time-Ms`
`post_save`, `pre_delete`, `@receiver`, and why explicit `services.py` calls are strongly preferred over hidden implicit `post_save` signal chains!
Writing `class JobQuerySet(models.QuerySet): def published(self): ... def with_relations(self): ...` exposed via `objects = JobQuerySet.as_manager()`
Spotting `SerializerMethodField` per-row queries (`obj.applications.count()` firing `N` `SELECT COUNT(*)` queries!) and fixing with QuerySet `annotate(applications_c...
`@transaction.atomic` / `with transaction.atomic():`, nested savepoints, `select_for_update()` row locks, and `transaction.on_commit()` for Celery/email side effects
`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...
Configuring `django.core.cache.backends.redis.RedisCache` (`REDIS_URL`), TTL tuning, atomic `cache.incr()`, and graceful degradation when Redis restarts
Installing `celery[redis]`, configuring `config/celery.py`, `@shared_task`, `CELERY_TASK_SERIALIZER = "json"` (never pickle!), and passing lightweight IDs (not ORM o...
Starting `celery -A config worker -l info`, idempotent task design, `autoretry_for=(TimeoutError,)`, `retry_backoff=True`, `max_retries=3`, and `CELERY_TASK_TIME_LIM...
Offloading registration welcome, password reset, and application-shortlisted emails to Celery via `transaction.on_commit()` with delivery status tracking
Configuring Django `LOGGING` dict (`version: 1`, JSON/structured formatters, `request_id` filter, `django.request` & `apps` loggers, zero sensitive PII/token logging...
`django.test.TestCase` (per-test DB transaction rollback!) vs `SimpleTestCase` (no DB), `setUpTestData` class-level fixture speedup, and `override_settings`
`rest_framework.test.APITestCase` & `APIClient`, `client.force_authenticate(user=...)` vs real JWT header tests, testing `200/201/204/400/401/403/404/409`
How Django creates/destroys `test_<dbname>`, `--keepdb` local iteration speedup, `--parallel`, and testing real PostgreSQL constraints (`CheckConstraint`, `UniqueCon...
`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
Synchronous PEP 3333 WSGI (`config.wsgi:application` with Gunicorn sync/gthread workers) vs asynchronous ASGI 3.0 (`config.asgi:application` with Uvicorn workers for...
Pre-launch verification: `DEBUG=False`, rotated `SECRET_KEY`, `ALLOWED_HOSTS`, `CSRF_TRUSTED_ORIGINS`, `migrate --noinput`, `collectstatic --noinput`, `/healthz`, lo...
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.
Module Learning & Hands-On Objectives
How FastAPI combines Starlette (ASGI routing/WebSockets/middleware) + Pydantic v2 (Rust `pydantic-core` validation) + automatic OpenAPI 3.1 generation
Installing `fastapi` + `uvicorn[standard]` (`uvloop` + `httptools`), running `uvicorn app.main:app --reload` in dev vs `--no-reload` in prod
Domain/layered layout: `app/{main.py, core/, api/v1/routers/, schemas/, models/, repositories/, services/}` vs single-file tutorials
`@router.get()`, `.post()`, `.put()`, `.patch()`, `.delete()`, operation `summary`/`tags`, and top-to-bottom route matching order (`/users/me` BEFORE `/users/{user_i...
Automatic conversion & `422` validation for `int`, `UUID`, `StrEnum` path parameters, plus `Annotated[int, Path(ge=1)]` constraints
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...
Automatic JSON parsing into Pydantic `BaseModel` parameters, combining Path + Query + Body parameters cleanly, and `Body(embed=True)`
Pydantic v2 Rust `pydantic-core` speed, `model_validate()`, `model_dump(exclude_unset=True)`, `ValidationError` structured JSON details, and `ConfigDict(extra="forbi...
Separating `ProductBase`, `ProductCreate`, `ProductPatch` (all fields optional `| None = None`), `ProductOut` (`from_attributes=True`), and `ProductInDB`
`Field(min_length=2, max_length=120, pattern=...)`, `gt=0`, `ge=0`, `max_digits=12, decimal_places=2`, `EmailStr`, `HttpUrl`, and OpenAPI `examples`
Pydantic v2 `@field_validator("email", mode="before")` (`@classmethod`) normalization and `@model_validator(mode="after")` cross-field invariants
`response_model=ProductOut` (or `-> ProductOut` return annotation), `ConfigDict(from_attributes=True)` ORM serialization, and `response_model_exclude_none`
`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
`from fastapi import Depends`, `Annotated[PaginationParams, Depends()]`, sub-dependencies, per-request dependency caching, and `yield` teardown dependencies
Chaining `get_db -> get_product_repo -> get_product_service`, router-level `dependencies=[Depends(require_auth)]`, and parameterized `Depends(RequireRole("admin"))`...
`Annotated[str | None, Header()] = None` (auto hyphen-to-underscore `x_idempotency_key` <- `X-Idempotency-Key`), `Cookie()`, and setting `HttpOnly` cookies on `Respo...
`file: UploadFile = File(...)` (`SpooledTemporaryFile` spilling to disk), streaming chunk validation (`await file.read(65536)`), magic-byte + size limits, and `await...
`background_tasks.add_task(fn, *args)` running AFTER HTTP response is sent vs when durable Celery + Redis/RabbitMQ is required instead
`raise HTTPException(status_code=..., detail=...)`, `@app.exception_handler(DomainError)` translating pure domain exceptions into clean HTTP responses, and overridin...
`@app.middleware("http")` (`call_next(request)`), adding `X-Request-ID` & `X-Process-Time-Ms` headers, and pure ASGI middleware ordering (LIFO stack!)
`from fastapi.middleware.cors import CORSMiddleware`, explicit `allow_origins` list, `allow_methods`, `allow_headers`, `expose_headers=["X-Request-ID"]`
Customizing `FastAPI(title=..., version="1.0.0", openapi_tags=...)`, `responses={404: {"model": ErrorOut}, 409: ...}`, and disabling `/openapi.json` in locked-down e...
Testing OAuth2/Bearer endpoints directly in `/docs`, `swagger_ui_parameters={"persistAuthorization": True}`, and request/response schema examples
Clean 3-pane `/redoc` reference docs, Markdown descriptions in route docstrings, and exporting static `openapi.json` artifacts in CI
Centralizing `APP_ENV`, `CORS_ORIGINS`, `MAX_UPLOAD_MB` with startup validation and `@lru_cache` singleton injection via `Depends(get_settings)`
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`.
Module Learning & Hands-On Objectives
Application factory `def create_app() -> FastAPI:`, clean layering (`api` -> `services` -> `repositories` -> `models`), and dependency inversion
`APIRouter(prefix="/products", tags=["Products"])`, aggregating into `api_v1_router`, and shared router-level dependencies/responses
`OrderService` orchestrating inventory checks, pricing math, repository writes, and transaction commit/rollback cleanly
Encapsulating `AsyncSession` `select()`, `add()`, `flush()`, eager `selectinload`/`joinedload` queries inside `ProductRepository`
Mapping SQLAlchemy `DeclarativeBase` models cleanly to Pydantic `ConfigDict(from_attributes=True)` schemas without lazy-load surprises
`async def get_db() -> AsyncIterator[AsyncSession]: async with AsyncSessionLocal() as session: yield session` deterministic cleanup
Implementing async `POST` (`201`), `GET` list/detail (`200`/`404`), `PATCH` (`exclude_unset=True`), and `DELETE` (`204`) catching `IntegrityError` -> `409 Conflict`
Async Alembic template (`alembic init -t async migrations`), importing all `models` into `migrations/env.py` so `--autogenerate` sees every table!
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...
`create_async_engine("postgresql+asyncpg://...", pool_pre_ping=True)`, `async_sessionmaker(expire_on_commit=False)`, and `await engine.dispose()` on shutdown
`from pydantic_settings import BaseSettings, SettingsConfigDict`, `SecretStr` (prevents accidental secret printing!), `.env` loading, and startup fail-fast validatio...
`HTTPBearer`, `OAuth2PasswordBearer(tokenUrl="/api/v1/auth/token")`, `OAuth2PasswordRequestForm`, and automatic OpenAPI padlock integration
Form-encoded `username` + `password` -> `{"access_token": "...", "token_type": "bearer"}` RFC 6749 contract vs OAuth2 Authorization Code + PKCE overview
Encoding/verifying JWTs with `PyJWT` (`jwt.encode` / `jwt.decode(..., algorithms=["HS256"])`), `typ` claim (`"access"` vs `"refresh"`!), `exp`, `sub`, and `jti`
Modern `pwdlib` (`PasswordHash.recommended()` using Argon2id, recommended by FastAPI docs over unmaintained `passlib`!), offloading CPU-bound hashing via `asyncio.to...
Checking `user.is_active` + `user.role` (`customer`, `vendor`, `admin`) + resource ownership (`order.user_id == current_user.id`) cleanly
Composable `CurrentUser = Annotated[User, Depends(get_current_active_user)]` and `AdminUser = Annotated[User, Depends(require_roles(Role.ADMIN))]` type aliases
Generic `PaginatedResponse[T]` (`items: list[T]`, `total: int`, `limit: int`, `offset: int`, `has_more: bool`) + parallel/sequential `SELECT COUNT(*)` + `LIMIT/OFFSE...
Typed `ProductFilterParams` dependency building conditional `.where(...)` clauses (`category_id`, `in_stock`, `price_min`, `price_max`, `q` `ilike`)
Mapping validated `Literal["created_at", "price", "name"]` sort keys + `Literal["asc", "desc"]` to whitelisted SQLAlchemy column attributes (NEVER `getattr(Model, ra...
Prefixing `/api/v1` via `APIRouter`, sub-application `app.mount("/api/v2", app_v2)` option for separate OpenAPI docs, and `Sunset`/`Deprecation` headers
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)`
Unified RFC 7807 Problem Details / structured error JSON across `DomainError`, `HTTPException`, `RequestValidationError`, and catch-all `500` handler (preserving `X-...
Formatting every log record as single-line JSON (`timestamp`, `level`, `service`, `request_id`, `method`, `path`, `status_code`, `duration_ms`) with PII redaction
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.
Module Learning & Hands-On Objectives
Well-structured Modular Monolith strengths: single ACID database transaction, in-memory function calls (`ns` vs `ms` network), simple deployment & debugging
Independently deployable, business-capability-aligned services owning their own data and communicating over well-defined network contracts
Fallacies of Distributed Computing: network latency, partial failures, eventual consistency, distributed debugging, CI/CD & DevOps overhead
Cutting boundaries along business capabilities (high internal cohesion, low external chatty coupling) rather than technical layers
Ubiquitous Language, Entities (identity), Value Objects (`Money`, `Address`), Aggregates (transactional consistency boundary), and Domain Events (`OrderPlaced`)
Backward-compatible API & event schema evolution (Expand-and-Contract), independent Git/CI pipelines, and zero lockstep coordinated releases
Request-response blocking chains (`Gateway -> Order -> Inventory -> Payment`), latency addition, and availability multiplication (`0.99^4 = 96%`!)
Internal REST contracts with `httpx.AsyncClient`, typed Pydantic client response validation, connection pooling, and explicit connect/read timeouts
Contract-first `.proto` schemas, binary Protobuf serialization, HTTP/2 multiplexing, generated Python stubs, and when gRPC beats JSON REST
Single north-south entry point (Nginx / Kong / Traefik / FastAPI Gateway): path routing, TLS termination, JWT edge verification, rate limiting, and CORS
Dynamic container IP resolution via Docker Compose DNS / Kubernetes CoreDNS (`http://inventory-service:8003`) vs client-side registry (Consul/Eureka) concepts
12-Factor environment injection, ConfigMaps/Secrets, startup schema validation via `pydantic-settings`, and dynamic feature-flag concepts
Strict rule: ONLY `inventory-service` reads/writes `inventory_db`! Other services access inventory strictly via API or published domain events
Why 2-Phase Commit (`2PC` / XA) locks struggle across independent services/brokers, eventual consistency, and the Dual-Write Problem (DB commit succeeds, Kafka publi...
Sequencing local ACID transactions across services (`Order PENDING -> Reserve Stock -> Charge Payment -> Order CONFIRMED`) + compensating undo actions (`Release Stoc...
Decoupled producers & consumers (`OrderPlaced`, `StockReserved`, `PaymentCaptured`), Event Notification vs Event-Carried State Transfer, and schema versioning
Smart broker / flexible routing (`RabbitMQ` AMQP task/work queues) vs distributed append-only commit log (`Apache Kafka` high-throughput replayable event streams)
Retrying ONLY transient errors (`502/503/504`, `ConnectTimeout`) โ NEVER `400/401/403/404/422`! โ with exponential backoff `2^attempt` + random jitter (`tenacity`)
Explicit connect timeout (`2s`) + read timeout (`3s`) on EVERY outbound socket (HTTP, DB, Redis, SMTP) so hung dependencies never exhaust worker pools
State machine: `CLOSED` (normal) -> failure threshold exceeded -> `OPEN` (fail fast `< 1ms` without calling dead downstream!) -> cooldown -> `HALF_OPEN` probe -> `CL...
Storing `Idempotency-Key` (`UNIQUE (user_id, idempotency_key)`) + request payload hash + cached response in PostgreSQL/Redis AND `processed_events(event_id PK)` for...
Three pillars: Structured Logs (what happened), Metrics โ RED rate/errors/duration histograms (`prometheus-client`), and Distributed Traces (`OpenTelemetry` spans)
Generating `X-Correlation-ID` at the API Gateway and forwarding it automatically on every outbound `httpx` header AND every Celery/RabbitMQ/Kafka message header!
Zero-trust internal security: verifying `aud` (audience) + `iss` (issuer) claims on internal service JWTs, HMAC webhook signatures (`hmac.compare_digest`), and priva...
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`.
Module Learning & Hands-On Objectives
Single-threaded event-loop command execution (atomic individual commands!), sub-millisecond RAM latency, RDB snapshots vs AOF persistence, and eviction policies (`al...
`STRING` (JSON cache, atomic `INCR`), `HASH` (field maps), `LIST` (queues), `SET` (unique tags/online users), and `ZSET` Sorted Sets (leaderboards & sliding-window r...
`redis.asyncio.from_url(REDIS_URL, decode_responses=True)`, connection pooling, `pipeline()` batching multiple commands in 1 network roundtrip, and `SET ... NX EX`
Namespaced versioned cache keys (`prod:v1:product:{id}`), JSON Pydantic `model_dump_json()` / `model_validate_json()`, and measuring cache hit ratio
Mandatory `ex=` TTL on every cache key, TTL jitter (`300 + random.randint(0, 45)`) preventing Cache Avalanche (mass simultaneous expiration!), and caching negative `...
Explicit `await redis.delete(key)` AFTER PostgreSQL commit on `PATCH`/`DELETE` (delete rather than overwrite to avoid concurrent write-order races!)
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...
`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"...
Producer (FastAPI/Django) -> Message Broker (Redis/RabbitMQ) -> Celery Worker Pool -> Result Backend architecture
Prefork (`--concurrency=4`) vs I/O pools, `task_acks_late = True` + `worker_prefetch_multiplier = 1` for fair, crash-safe long-task distribution
Idempotent task functions taking primitive JSON arguments (`order_id: str`), explicit `soft_time_limit` / `time_limit`, and structured task correlation logging
`beat_schedule` (`crontab(minute="*/15")`), expiring unpaid pending orders after 30 minutes, and running STRICTLY ONE `celery beat` scheduler instance!
`autoretry_for=(httpx.TransportError,)`, `retry_backoff=True`, `retry_jitter=True`, `max_retries=5`, and handling final `MaxRetriesExceededError` alerts
`AsyncResult(task_id)` polling (`PENDING`, `STARTED`, `SUCCESS`, `FAILURE`), `result_expires = 3600` (preventing Redis RAM bloat!), and `ignore_result=True` on fire-...
AMQP 0-9-1 model: Producer -> Exchange -> Binding (Routing Key) -> Durable Queue -> Consumer, virtual hosts (`vhost`), and management UI (`:15672`)
`Direct` (exact routing key), `Topic` (wildcard `order.*`, `#.failed` pattern matching!), and `Fanout` (broadcast to ALL bound queues ignoring routing key)
`durable=True` queue declaration, `DeliveryMode.PERSISTENT` (`delivery_mode=2`) messages, idempotent startup topology declaration, and `prefetch_count`
Designing hierarchical `<domain>.<entity>.<event>` routing keys (`ecom.order.placed`, `ecom.payment.captured`) for clean observability and selective subscription
`aio_pika.connect_robust()` auto-reconnecting async channels, publishing Pydantic JSON bytes with `message_id` & `correlation_id`, and `queue.iterator()` consumption
Manual acknowledgement AFTER DB commit (`async with message.process(requeue=False):`) vs `auto_ack=True` data-loss danger, and `nack(requeue=True vs False)`
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
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!)
KRaft mode (modern ZooKeeper-less Kafka!), Brokers, Topics split into ordered Partitions (`P0, P1, P2`), Partition Leaders/Replicas, and Partition Key hashing (`hash...
`aiokafka.AIOKafkaProducer` / `confluent-kafka`, `acks="all"` durability, `enable_idempotence=True`, batching (`linger_ms`), and partition `key`
`AIOKafkaConsumer`, `auto_offset_reset="earliest"`, deserializing + validating Pydantic schemas, error isolation (DLQ topic `<topic>.dlq`), and idempotent DB dedupli...
`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...
Disable `enable_auto_commit=False` and call `await consumer.commit()` ONLY AFTER your PostgreSQL transaction commits (At-Least-Once + Idempotency)!
Wiring the complete 6-service E-Commerce workflow (`User`, `Product`, `Inventory`, `Order`, `Payment`, `Notification`) over FastAPI + PostgreSQL + Redis + Celery + R...
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.
Module Learning & Hands-On Objectives
Arrange-Act-Assert (AAA) structure, deterministic repeatability (no sleep/network/clock flakiness!), and catching regressions in CI before deploy
Fast pure-Python Unit tests (70%) + real-DB/API Integration tests (25%) + end-to-end smoke workflows (5%)
Red (write failing test specifying requirement) -> Green (minimal passing implementation) -> Refactor (clean up while keeping tests green)
`unittest.TestCase`, `setUp`/`tearDown`, `self.assertEqual`/`assertRaises`, and why Djangoโs `django.test.TestCase` subclasses `unittest.TestCase`
Installing `pytest` + `pytest-asyncio` + `pytest-cov`, configuring `[tool.pytest.ini_options]` in `pyproject.toml`, `-k` filter, `-x` stop-on-first-fail, `--lf` last...
Descriptive `test_<unit>_<scenario>_<expected>()` naming (`test_apply_job_when_already_applied_returns_409`), plain `assert` introspection
Rich `pytest` diffing on dicts/lists, `pytest.approx()` for floats, and `with pytest.raises(InsufficientFundsError, match="Balance"):`
`@pytest.fixture(scope="function" | "module" | "session")` in `conftest.py`, composable dependency injection, `yield` teardown, and `tmp_path` built-in fixture
Running 12 boundary/invalid input cases cleanly via `@pytest.mark.parametrize("payload,expected_status", [...], ids=[...])` without copy-pasting 12 functions
Dummy, Fake (`FakePaymentGateway`), Stub, Spy, and Mock โ choosing lightweight in-memory Fakes/Protocol implementations vs `unittest.mock`
`patch("app.services.orders.payment_client", autospec=True)`, `MagicMock`, `AsyncMock` (for `await` coroutines!), `return_value`, `side_effect`, and `assert_called_o...
Verifying HTTP status code + response JSON schema + response headers + actual database state mutation + queued side effects on every endpoint test
Testing Django views, middleware headers, redirects, and template context using `django.test.Client` and `pytest-django` (`@pytest.mark.django_db`)
`APIClient()` `format="json"` requests, multipart `SimpleUploadedFile("resume.pdf", b"%PDF-1.7...", content_type="application/pdf")` upload tests, and `django_assert...
Sync `TestClient(app)` vs native async `async with httpx.AsyncClient(transport=ASGITransport(app=app), base_url="http://test") as ac:` + `app.dependency_overrides`
Nested SAVEPOINT rollback per test: create tables once per session, open outer transaction + SAVEPOINT per test, and `rollback()` in `< 3ms` after each test!
Testing full vertical slices (`HTTP Router -> Pydantic -> Service -> SQLAlchemy -> PostgreSQL -> Redis Cache`) together with real containers in CI
Testing valid Bearer JWT, missing header (`401`), malformed token (`401`), expired `exp` token (`401`), wrong signature (`401`), and refresh token misused as access...
Systematic RBAC & BOLA/IDOR matrix testing: Candidate calling Employer route (`403`), Employer B editing Employer Aโs job (`403`/`404`), non-admin calling `/admin/*`...
Testing missing required fields, extra forbidden fields, negative quantities, empty strings, oversized `10 MB` uploads, duplicate `409` submissions, and `404` missin...
`pytest --cov=app --cov-branch --cov-report=term-missing --cov-fail-under=80`, branch coverage vs line coverage, and inspecting uncovered error branches
Configuring `Ruff` (10โ100x faster Rust linter replacing Flake8 + isort + pyupgrade + bandit rules: `E`, `F`, `I`, `B` bugbear, `UP`, `S` security) via `ruff check ....
`black --check .` / `ruff format --check .` zero-debate PEP 8 formatting (`line-length = 88/100`) eliminating style bikeshedding in PR diffs
Running `mypy app`, `disallow_untyped_defs = true`, `check_untyped_defs = true`, catching `None` attribute errors (`Optional` narrowing) before code ever runs!
`.pre-commit-config.yaml` (`ruff`, `black`/`ruff-format`, `mypy`, `detect-secrets`, `check-yaml`, `no-commit-to-branch` on `main`) catching issues in `< 1s` locally
Small cohesive functions, explicit typing, cyclomatic complexity bounds, structured error handling, security checklist, and empathetic actionable PR feedback
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`.
Module Learning & Hands-On Objectives
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
`pwd`, `ls -lah`, `cd`, `mkdir -p`, `cp -r`, `mv`, `rm` (careful with `-rf`!), `cat`, `head`, `tail -f`, `grep -rn`, and `find`
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
`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`...
`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...
`export KEY=VAL`, `env`/`printenv`, subshell inheritance, `EnvironmentFile=` in `systemd`, and avoiding secrets on CLI arguments (visible in `ps aux`!)
`ssh-keygen -t ed25519`, `~/.ssh/authorized_keys`, disabling password auth & root login in `/etc/ssh/sshd_config`, `~/.ssh/config`, and `scp`/`rsync`
`ufw` firewall (`allow OpenSSH`, `allow 80,443/tcp`, keep `5432`/`6379` private!), disk usage (`df -h`, `du -sh`), log rotation (`logrotate`), and unattended securit...
Shared Linux kernel namespaces (`pid`, `net`, `mnt`, `user`) + `cgroups` resource limits vs full guest-OS hypervisor VMs, solving "works on my machine"
Docker Desktop (WSL 2 backend on Windows) & Docker Engine CE on Ubuntu Linux, verifying `docker info` and BuildKit
`docker` CLI -> REST socket -> `dockerd`/`containerd` -> OCI runtime (`runc`), UnionFS copy-on-write layers, and Registries (GHCR `ghcr.io`, ECR, Docker Hub)
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` +...
Ephemeral stateless containers, PID 1 signal forwarding (`exec` form `CMD ["gunicorn", ...]`, NEVER shell string form!), exit code diagnosis, and `--restart unless-s...
Stage 1 (`builder` compiling wheels into `/opt/venv`) -> Stage 2 (`runtime` copying `/opt/venv` + `app/`), `.dockerignore`, `PYTHONDONTWRITEBYTECODE=1`, `PYTHONUNBUF...
`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...
Named Docker volumes (`postgres_data:/var/lib/postgresql/data`, `redis_data:/data`, `media_uploads`) surviving `docker compose down` vs `down -v` (DESTROYS volumes!)
Custom bridge networks (`frontend_net` for `nginx <-> api`, `backend_net` internal for `api <-> db/redis`), automatic Docker DNS service-name resolution
Authoring `compose.yaml` (`api`, `worker`, `beat`, `db`, `redis`, `nginx`) with `depends_on: db: condition: service_healthy` so `api` waits until PostgreSQL actually...
Docker Compose variable substitution `${POSTGRES_PASSWORD:?required}`, `env_file`, Docker/GitHub Secrets, and never baking credentials into image `ENV` or `ARG` laye...
`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...
`redis:7-alpine`, `redis-cli ping` healthcheck, `--appendonly yes` AOF durability for Celery/rate-limit state, `--maxmemory` bounds, and password/ACL auth
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...
`uvicorn` event loop (`uvloop`), HTTP parser (`httptools`), `--proxy-headers`, `--timeout-keep-alive`, and graceful shutdown drain
Running `gunicorn app.main:app -k uvicorn_worker.UvicornWorker --workers 2 --graceful-timeout 30 --max-requests 2000 --max-requests-jitter 200` (process supervision...
Zero-surprise release sequence: Pull image -> Run DB migrations (backward-compatible!) -> Healthcheck new container -> Swap traffic -> Verify `/readyz` & logs
Automated quality gates on every PR (CI) vs automated staging/production artifact promotion on `main` merge/tag (CD)
Triggers (`on: [push, pull_request]`), Ubuntu runners, `actions/setup-python@v5` (`cache: "pip"`), PostgreSQL 16 + Redis 7 `services:` containers, and GitHub Encrypt...
Chaining `lint` (`ruff check`, `ruff format --check`, `mypy`) + `test` (`alembic upgrade head`, `pytest --cov-fail-under=80`) + `docker` (`docker/build-push-action`)...
Practical backend AWS literacy: `IAM` least-privilege roles (no root keys!), `EC2` + Security Groups, `S3` private buckets + presigned resume URLs (`boto3`), and man...
Separating Liveness `/healthz` (is Python process alive? `200`) from Readiness `/readyz` (can it query PostgreSQL `SELECT 1` & `PING` Redis? `200` vs `503`), plus Se...
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`.
Module Learning & Hands-On Objectives
`is` vs `==`, small-int interning trap, mutable vs immutable types, pass-by-object-reference, `Decimal` vs `float`, truthiness, and slicing
Over-allocated `list` array, `dict` open-addressing compact hash table (`O(1)` avg), hashability requirements (`__hash__` + `__eq__`), `copy` vs `deepcopy`
Mutable default argument trap, late-binding closure trap, LEGB + `nonlocal`, keyword-only `*` args, and recursion stack frames
`__new__` vs `__init__`, `@classmethod` vs `@staticmethod`, `@property`, C3 MRO + cooperative `super()`, `ABC` vs `Protocol`, `@dataclass(slots=True)`
Parameterized `@decorator(arg)` 3-level function structure, `@wraps`, `Iterator` vs `Iterable`, `yield` memory savings, and `__enter__`/`__exit__`
`ob_refcnt` + generational cyclic `gc`, `__slots__` memory optimization, what the GIL locks, and why C extensions / OS I/O syscalls release the GIL
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`
Pattern recognition: sorted array -> Two Pointers / Binary Search; contiguous subarray -> Sliding Window / Prefix Sum + Dict; Top-K -> `heapq`; shortest unweighted p...
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
Composite B-Tree leftmost prefix, `EXPLAIN ANALYZE`, MVCC, `READ COMMITTED` vs `REPEATABLE READ`, `SELECT ... FOR UPDATE`, deadlocks, and 1NFโ3NF
Lazy QuerySets, `select_related` vs `prefetch_related`, `F()` / `Q()` / `annotate()`, `transaction.atomic()` + `on_commit()`, middleware order, and `AUTH_USER_MODEL`
`Serializer` vs `ModelSerializer`, `validate_<field>` vs `validate`, `APIView` vs `ModelViewSet`, `has_permission` vs `has_object_permission`, and pagination
`async def` vs `def` event-loop behavior, Pydantic v2 `ConfigDict`/`response_model`, `Depends` caching & `yield` teardown, `AsyncSession(expire_on_commit=False)`, an...
Resource naming, `PUT` vs `PATCH`, `401` vs `403`, `400` vs `422`, `409` conflict, `429` rate limit, cursor vs offset pagination, and `Idempotency-Key`
Access + Refresh token lifecycle, token rotation & reuse detection, `HttpOnly` cookie vs memory storage, RBAC vs BOLA/IDOR, password Argon2 hashing, and OAuth2 flows
Database-per-service, Dual-Write & Transactional Outbox, Choreography vs Orchestration Saga, Circuit Breaker states, Backoff + Jitter, and Correlation IDs
Machine-coding challenges #1, #2 & #5: Python Employee Management App + Reusable JWT Authentication Module + Role-Based Authorization (`Admin`, `Manager`, `Member`)
Machine-coding challenges #3 & #4: Complete CRUD REST API + Dynamic Multi-Filter, Full-Text Search, Whitelisted Sorting & Bounded Pagination API
Machine-coding challenges #7 & #10: Redis Cache-Aside wrapper with TTL/invalidation + Sliding-Window / Token-Bucket API Rate Limiter returning `429` & `Retry-After`
Machine-coding challenges #6 & #11: Background Email Notification Service (retries + idempotency) + Transactional Order Processing State Machine (`PENDING -> PAID ->...
Machine-coding challenges #8 & #9: Non-Blocking Async Aggregator API (`asyncio.gather` + `httpx` timeouts) + Secure Multipart File Upload Service (UUID rename, magic...
Machine-coding challenge #12: Designing & coding a URL Shortener (`POST /shorten` Base62 short code, `GET /{code}` `302` redirect cached in Redis, click counter, opt...
`conftest.py` fixtures, `patch` lookup rule, `AsyncMock`, multi-stage non-root `Dockerfile`, `compose.yaml` healthchecks, `git rebase` vs `revert`, and CI debugging
Structured 5-step System Design method: 1) Functional & Non-Functional Requirements, 2) Back-of-Envelope Traffic/Storage, 3) API Contracts, 4) PostgreSQL Schema & In...
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.
Module Learning & Hands-On Objectives
Email registration, Argon2id password hashing, enumeration-safe login, `15m` JWT access tokens, `7d` rotated/blacklisted refresh tokens, and rate limiting
Account profile (`GET/PATCH /users/me`), role assignment (`CANDIDATE`, `EMPLOYER`, `ADMIN`), active-account status enforcement, and audit timestamps
Headline, bio, experience years, current/expected CTC, notice period, portfolio links, and normalized Many-to-Many `Skill` tags
Company onboarding, slug generation, website/industry/headquarters metadata, recruiter ownership, and Admin verification workflow (`is_verified`)
Job creation (`DRAFT`), validation (`max_salary >= min_salary`), state machine (`DRAFT -> PUBLISHED -> CLOSED / ARCHIVED`), and employer-scoped management
Keyword search, `city`, `is_remote`, `skills`, `experience`, `salary_min` filters, whitelisted sorting, bounded pagination, composite PostgreSQL indexes, and Redis C...
`POST /jobs/{id}/apply` (`UNIQUE (job_id, candidate_id)` preventing duplicate applications -> `409`), cover note, resume snapshot, and status pipeline (`APPLIED -> S...
Chunked `UploadFile` streaming (`<= 5 MB`), `.pdf`/`.docx` allowlist, `%PDF-` magic-byte header verification, UUID storage key, and authorized download access
Post-commit Outbox/on-commit dispatch to Celery + Redis/RabbitMQ/Kafka sending Application Confirmation, Employer New-Applicant Alert, and Status-Update emails with...
Admin-only endpoints (`/api/v1/admin/*`): verifying companies, suspending abusive users (`is_active=False`), moderating flagged jobs, and viewing audit logs
SQL `GROUP BY` / `FILTER` / Window aggregations reporting applications per job, stage conversion rates (`Applied -> Shortlisted -> Offered`), top skills in demand, a...
Complete tagged OpenAPI 3 documentation (`/docs` & `/redoc`), typed request/response/error schemas, ER diagram, architecture diagram, and turnkey `postman_collection...
Unit + Integration `pytest` suite (`>= 80%` coverage across Auth, RBAC, Search, Apply, Upload, Analytics), multi-stage non-root `Dockerfile`, `compose.yaml` (`api`,...
Presenting ER schema, service/repository architecture, JWT/RBAC security, Redis/Celery/Broker flows, query execution plans, test suite, and live Q&A defense
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`).
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.
Python 3.12 (Core & Advanced)
Core LanguagePython OOP & Dataclasses
Core LanguageDecorators, Generators & Iterators
Core LanguageThreading, Multiprocessing & Asyncio
Core LanguagePython DSA (120+ Problems)
Core LanguageGit & GitHub PR Workflow
Version ControlPostgreSQL 16 & Complete SQL
Enterprise RDBMSSQLite & MySQL Fundamentals
Relational QueriesSQLAlchemy 2.0 & Alembic
Async Python ORMMongoDB & PyMongo Fundamentals
NoSQL Document DBDjango 5
Full-Stack PythonDjango REST Framework (DRF)
Full-Stack PythonFastAPI & Pydantic v2
High-Speed APIREST APIs, Swagger & OpenAPI
Typed API SchemaJWT & OAuth 2.0 Fundamentals
App & Cloud SecurityRedis 7 Caching & Locks
In-Memory CacheCelery & Celery Beat
Distributed QueuesRabbitMQ & Apache Kafka Fundamentals
Event StreamingPytest, unittest, Ruff & mypy
Test AutomationDocker & Docker Compose
ContainersLinux CLI & Nginx
OS & ScriptingGunicorn & Uvicorn ASGI/WSGI
Core EngineeringGitHub Actions CI/CD & AWS Fundamentals
CI/CD Pipelinespip, venv, Poetry & Postman
Core EngineeringLeetCode Problem Solving
Trainer Coding PrepHackerRank Coding Prep
Trainer Coding PrepPython 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.
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:
Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.
Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.
Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.
Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.
Purpose: Directly required by Python Backend, Django & FastAPI Engineering engineering teams to ship reliable client systems.
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.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.
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
๐ Live Client Production Project + Internship Letter
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:
1. Graduation Certificate
Certifies PBCP module mastery, Mock/AI Viva scores & GitHub repos.
2. Client Internship Letter
Employer BGV-verifiable proof of live production deployment contributions.
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.
Hands-on module projects, topic-wise MCQ mocks, AI interviews & live client internship proof.
Production architecture, performance tuning & automated testing mastery.
Accelerated when paired with the optional curriculum-matched global vendor certifications below.
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.
Already Taught in Your Curriculum: Python 3.12 OOP, Modules, Exceptions, Iterators, Closures & Standard Library
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.
Already Taught in Your Curriculum: Express REST APIs, Input Validation, OWASP Security, Rate Limiting & HTTP Architecture
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.
Already Taught in Your Curriculum: MongoDB Document Modeling, Aggregation Pipelines, ESR Compound Indexes & Transactions
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.
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.
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.
Matching Career Roadmaps:
Weekend Live PBCP Cohorts Across Top IT Hiring Hubs:
Book Free Live Demo or Reserve Batch Seat