Skip to content

Course

Python Engineering: Idioms, Packaging, and Production

Python the way senior engineers write it: iterators and the data model that make code feel idiomatic, packaging and testing that let a project grow past one file, and the typing, debugging, and error-handling habits of production Python.

9 lessons

Course Q&A

The Pythonic Core

Iteration, comprehensions, and the dunder data model — why Python code reads the way it does.

  1. 01Iteration the Pythonic Wayfor loops over iterators, comprehensions that read like sentences, and when the one-liner is wrong.18mOpen
  2. 02The Data Model: __dunder__ Methods That Make Classes Behavelen(), +, in, iteration — how Python's protocols let your own types behave like builtins.20mOpen
  3. 03Exceptions That Mean SomethingWhy 'except: pass' is a bug, what custom exceptions buy you, and the exception hierarchy you should actually use.18mMembers

Structure & Packaging

Virtual environments, pyproject.toml, imports, and tests that let a project grow.

  1. 01Virtual Environments and pyproject.tomlWhy every project gets its own venv, what pyproject.toml replaced, and how a real project is laid out.20mOpen
  2. 02Testing with pytest: The Discipline That ScalesWhy test functions beat test classes, fixtures that compose, and the one assert style that reads like Python.20mMembers

Python in Production

Type hints, real error handling, debugging and profiling without guesswork.

  1. 01Type Hints That Earn Their KeepWhere annotations help, where they lie, and the 80/20 of making mypy useful instead of noise.20mMembers
  2. 02Debug and Profile Before You Optimizepdb, logging over print, and cProfile — the tools that turn 'it feels slow' into a file and line number.18mMembers
  3. 03Concurrency in Python: Threads, Processes, and asyncioThe GIL is not a bug and async is not magic — picking the right concurrency model for I/O-bound vs CPU-bound work.25mMembers
  4. 04Logging and Observability: Debugging Production From Your ChairStructured logging, the stdlib logging hierarchy, and why 'print debugging' ends the day your code runs somewhere you can't see.20mMembers