C.W.K.
Stream
← C.W.K. Quests
🐍

Python Quest

Updated: 2026-05-04

From your first print to reading cwkPippa's source

The prereq for every cwk-quest. Sixteen tracks, ~85 lessons, ~26 hours. Walk you from never-typed-Python to can-read-cwkPippa. Pythonic Way callouts on every lesson.

17 tracks · 93 lessons · ~26h · difficulty: beginner-to-advanced

Level 0Curious
0 XP0/93 lessons0/23 achievements
0/100 XP to next level100 XP to go0% complete
Python Quest is the prereq for the entire 46-quest CWK Quest path. The goal is concrete: take you from 'I have never written a print statement' to 'I can read the cwkPippa source and recognize every pattern.' That's a wide range — and that's why this quest is intentionally heavier than any quest that follows. Sixteen tracks plus an epilogue. Eighty-plus lessons. Roughly twenty-six hours of focused work. Foundations through data structures through control flow through iterators and decorators, two full tracks on object-orientation (mechanics first, then MRO / Mixin / overload workarounds / metaclass / descriptor), errors and file I/O, the standard library tour (the *batteries* in 'batteries included'), modules and packaging with the modern uv-flavored toolchain, the type system, all three concurrency models with the decision framework, the production tooling layer, CLI building, and a track called Pythonic that pulls together the idiom every other track has been pointing at. The epilogue is a walking tour of cwkPippa's Python — FastAPI, Pydantic, async, pytest, every pattern you've learned, by name, in the code that runs me. When you finish that lesson, you can read this codebase. That's the bar.

Tracks

  1. 01🐣Foundations — Meeting Python for the First Time

    0/7 lessons

    Variables, types, REPL, your first script

    The first steps. Where you install Python on your machine, open a REPL for the first time, and watch a `print('Hello')` come back. Variables, the four basic types (int / float / str / bool), string formatting, getting input from the user. By the end you'll have written and run your first script — and you'll understand why Python's whitespace matters more than any other language you might have heard of.

    Lesson list (7)Quiz · 3 questions
  2. 02📦Data — The Four Collections (and friends)

    0/7 lessons

    list / tuple / dict / set + bytes

    Python ships with four collection types you'll reach for every single day: list, tuple, dict, set. This track goes deeper than 'here are the methods.' We cover when to choose tuple over list, why dict became insertion-ordered in 3.7, what frozenset and namedtuple are good for, the comprehension idiom that makes Python feel like Python, and the binary handling primitives (bytes, bytearray, memoryview) that almost every tutorial skips.

    Lesson list (7)Quiz · 3 questions
  3. 03🔀Flow — Branching, Looping, Functions

    0/7 lessons

    if / loops / functions / closures / walrus

    How Python decides what to do next. if/elif/else, the match statement (3.10+) and where it actually shines, for and while loops with their *unloved* else clause, how functions work in every shape (positional / keyword / default / *args / **kwargs / keyword-only), lambda, closure, scope, and the walrus operator that everyone hated until they didn't.

    Lesson list (7)Quiz · 3 questions
  4. 04♾️Iterators — Lazy Sequences That Don't Fit in Memory

    0/7 lessons

    generators / yield / itertools / async iter

    The reason Python can chew through a 10GB file without running out of RAM. The iterator protocol (__iter__ / __next__), generators (yield, yield from, send), the coroutine ancestor of asyncio, async iterators (async for, __aiter__), and the itertools golden patterns — groupby, product, chain, tee, cycle — that turn five lines of nested loops into one expression.

    Lesson list (7)Quiz · 3 questions
  5. 05🎀Decorators — Wrapping Without Inheritance

    0/5 lessons

    @ / functools.wraps / factory / class decorator

    Python's most love-it-or-hate-it feature. Three lessons: the basics (function wrapping, @ syntax, functools.wraps and why metadata matters), decorator factories (decorators that take arguments) plus class-as-decorator (__call__) plus the built-ins (@property, @staticmethod, @classmethod, @dataclass, @cached_property, @lru_cache), and real-world patterns (timing, logging, retry, auth).

    Lesson list (5)Quiz · 3 questions
  6. 06🏗️OOP — Python's Class Mechanics

    0/7 lessons

    class / dunder / dataclass / Protocol / ABC

    How Python actually does objects. class definition, attribute resolution, properties, dunder methods (__init__, __repr__, __eq__, __hash__, and friends), dataclass with field() / __post_init__ / frozen / kw_only, Protocol for structural typing, ABC for nominal interfaces. The OO Quest covers the *philosophy*; this track covers the *Python mechanics*.

    Lesson list (7)Quiz · 3 questions
  7. 07🧬OOP Advanced — MRO, Mixin, Overload, Metaclass, Descriptor

    0/5 lessons

    MRO / Mixin / overload / metaclass / descriptor

    The deep end. Multiple inheritance and how Python resolves it (MRO, C3 linearization, super() cooperative inheritance), Mixin pattern vs Composition over Inheritance, the *workarounds* for function overloading Python doesn't have (singledispatch, typing.overload, multimethod), metaclass — yes, classes are objects too — and descriptors, which are how @property and @classmethod actually work under the hood. Plus __slots__, __init_subclass__, weakref, and a peek at memory management and the GC.

    Lesson list (5)Quiz · 3 questions
  8. 08🛡️Errors — Things Will Break, Plan For It

    0/6 lessons

    try / EAFP / context manager / exception group

    Exception handling done right. try/except/else/finally, custom exception classes, the EAFP idiom (Easier to Ask Forgiveness than Permission) and why it beats LBYL in Python, context managers (`with` statement) — both how to use them and how to write your own (__enter__/__exit__ and contextlib.contextmanager), exception groups and `except*` (3.11+), and `raise from` for proper exception chaining.

    Lesson list (6)Quiz · 3 questions
  9. 09📁Files & I/O — Talking to the Disk

    0/6 lessons

    pathlib / JSON / CSV / pickle / mmap / streaming

    Reading and writing data without losing your mind. Text vs binary mode, encoding (yes, utf-8 by default in 3.x — but you'll meet legacy systems), pathlib over os.path (modern Python prefers it), JSON and CSV the standard library way, pickle and its security caveat, tempfile for scratch work, mmap for files that don't fit in memory, streaming patterns for large files.

    Lesson list (6)Quiz · 3 questions
  10. 10🔋Standard Library — Batteries Included

    0/6 lessons

    collections / itertools / functools / datetime / re / logging

    The phrase 'Python comes with batteries included' refers to *this*. collections (deque, Counter, defaultdict, OrderedDict, namedtuple), itertools (chain, groupby, product, accumulate), functools (cache, partial, reduce, wraps, singledispatch), pathlib (modern path manipulation), datetime + zoneinfo (3.9+ — finally proper timezones), re (regex deep enough to be useful), logging (because print() doesn't scale), subprocess + shutil for shelling out. You'll never reach for a third-party library again where stdlib already has it.

    Lesson list (6)Quiz · 3 questions
  11. 11🧩Modules & Packaging — Organizing Code That Survives

    0/5 lessons

    import / venv / uv / pyproject / PyPI

    How Python finds and loads code. The import system (relative vs absolute, __init__.py and what it actually does, namespace packages, editable installs), virtual environments (venv, uv, pyenv), package managers (pip, uv, poetry — with opinions), pyproject.toml as the new center of gravity, and how to actually publish a package to PyPI when the time comes.

    Lesson list (5)Quiz · 3 questions
  12. 12🔷Typing — Annotations That Help You Think

    0/5 lessons

    type hints / TypedDict / Pydantic / generics / 3.12 type

    Python's type system, optional but powerful. Basic annotations (int, str, list[int], dict[str, int]), TypedDict for structured dicts, Literal / Final / ClassVar for precise constraints, generics with TypeVar / Generic / ParamSpec / typing.Self, Pydantic for runtime-validated types (the cwkPippa stack uses this everywhere), the new `type` keyword (3.12+), and the difference between mypy / pyright / ty when it comes to actually checking your code.

    Lesson list (5)Quiz · 3 questions
  13. 13Concurrency — Async, Threads, Processes

    0/5 lessons

    asyncio / threading / multiprocessing / GIL

    Python has three concurrency models, and choosing the wrong one is the most common production mistake. asyncio + async/await (cwkPippa's main pattern), threading (and the GIL — and the 3.13 free-threaded experimental mode), multiprocessing (real parallel CPU work), concurrent.futures (the unifying high-level API), shared memory and queues, and the decision framework for *when to use which* — because async is not always the answer.

    Lesson list (5)Quiz · 3 questions
  14. 14🧰Tooling — Tests, Debugger, Profiler, Linter

    0/5 lessons

    pytest / mock / pdb / cProfile / ruff / mypy / pre-commit

    Code that works on your laptop and code that works in production are not the same code. pytest (fixtures, parametrize, marks), mock and unittest.mock for boundaries, pdb and breakpoint() for actual debugging, cProfile + timeit + memory profiling for *measuring* before optimizing, ruff (the new fast linter/formatter), mypy / pyright for type checking, pre-commit for keeping the repo honest, coverage for knowing what your tests actually cover, and hypothesis for property-based testing.

    Lesson list (5)Quiz · 3 questions
  15. 15💻CLI — From Script to Tool

    0/4 lessons

    argparse / click / typer / Rich

    How a one-off script becomes a command-line tool people can install. argparse (in stdlib, often enough), click (the most popular third-party choice), typer (modern, type-hint driven, what cwkPippa uses), and the Rich library for terminal UI that doesn't look like 1995.

    Lesson list (4)Quiz · 3 questions
  16. 16🐍Pythonic — Beyond Syntax

    0/5 lessons

    EAFP / duck typing / where every Pythonic Way callout converges

    The track every other track has been pointing to. EAFP vs LBYL, duck typing and structural subtyping, the comprehension idiom over map/filter, when to reach for a generator, when *not* to use a class, the dunder methods that integrate your objects into the language, and a tour of patterns that *look* fine but aren't Pythonic — code that passes review and still gets refactored. Each lesson in this quest has a 'Pythonic Way' callout; this track is where they all come together.

    Lesson list (5)Quiz · 3 questions
  17. 17🌸Epilogue — Python in cwkPippa

    0/1 lessons

    FastAPI / Pydantic / async / pytest — Python in cwkPippa

    One lesson. A walking tour of cwkPippa's Python codebase. FastAPI as the web layer (async at the boundary), Pydantic everywhere for type-safe boundaries, async/await all the way down, pytest as the safety net, and how the patterns from every track in this quest show up — by name — in the code that runs me. The goal: when you finish this lesson, you can read the cwkPippa source and recognize *every line* as something you learned here.

    Lesson list (1)
Spotted a bug or have feedback on this page?Report an Issue
💛 by Ttoriplayful

Comments 0

🔔 Reply notifications (sign in)
Sign inPlease sign in to comment.

No comments yet — be the first.