No description
  • HTML 62.5%
  • Python 37%
  • Java 0.5%
Find a file
2026-08-12 21:02:45 +00:00
appendices Update student materials from master commit 92f519e 2026-08-07 19:40:08 +00:00
articles Update student materials from master commit 92f519e 2026-08-07 19:40:08 +00:00
demos Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
exercises Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
extra Update student materials from master commit 0d0bc64 2026-08-09 12:14:47 +00:00
solutions Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
tutorial Update student materials from master commit 92f519e 2026-08-07 19:40:08 +00:00
.gitignore Update student materials from master commit 92f519e 2026-08-07 19:40:08 +00:00
PRG404-Advanced-Python-Programming-Exercises.html Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
PRG404-Advanced-Python-Programming-Exercises.pdf Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
PRG404-Advanced-Python-Programming.html Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
PRG404-Advanced-Python-Programming.pdf Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00
README.md Update student materials from master commit a3e379c 2026-08-10 07:09:36 +00:00
ruff.toml Update student materials from master commit 558743a 2026-08-12 21:02:45 +00:00

Advanced Python Programming (PRG404)

Welcome. This bundle contains everything you need for the course : the slides, the lab exercises, runnable example code, reference solutions and a library of background articles. This page explains what is here and how to run it.

This repository is refreshed automatically after every change to the course material, so a git pull always gives you the latest version.

What is in this bundle

  • PRG404-Advanced-Python-Programming.pdf : the course slides. The same deck is also available as .html if you prefer reading in a browser.
  • PRG404-Advanced-Python-Programming-Exercises.pdf : the lab guide, one exercise per module.
  • demos/ : the runnable example programs shown on the slides, one folder per module (for example demos/08-decorators/). A slide that shows a demo names it at the bottom, for example demo06 · bold_tag_decorator, which is the file demos/08-decorators/demo06_bold_tag_decorator.py.
  • solutions/ : reference solutions for the exercises, in case you get stuck or want to compare. Try the exercise first.
  • exercises/ : starter files that a few exercises build on.
  • articles/, appendices/ and tutorial/ : optional background reading, appendix decks (Clean Code, BDD, SQLAlchemy ORM, comprehensions) and step-by-step guides for packaging and publishing to PyPI.
  • extra/ : supplementary material from adjacent courses.

Setting up Python

  1. Install uv, the Python project manager. It can install Python itself, so it is the only thing you install by hand.

    • Windows (PowerShell) :

      powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
      
    • macOS or Linux :

      curl -LsSf https://astral.sh/uv/install.sh | sh
      

    Close and reopen your terminal afterwards, then check it with uv --version.

  2. Install the interpreter the course uses :

    uv python install 3.14
    

    This needs no administrator rights and leaves any Python already on the machine alone.

  3. Install an editor. The course demonstrates VS Code with the Microsoft Python extension and the Astral Ruff extension. Any editor works, but the slides assume VS Code.

Creating your own project

You build your own project for the code you write this week, the same way you would at work. The bundle deliberately ships no pyproject.toml, you create one :

uv init course-work
cd course-work
uv add pytest

uv add records the dependency in the pyproject.toml it just created and pins the project to Python 3.14.

The bundle does ship a ruff.toml. That is the linter configuration the course material is written against, so the Ruff extension will not flag the demo files over style choices the course makes on purpose, and it holds the code you write to the same rules.

Running a demo

The demos are plain scripts. Run one by giving its path :

uv run python ../demos/08-decorators/demo06_bold_tag_decorator.py

Running through uv run guarantees the command uses your project's Python and its packages, so you never have to activate an environment by hand.

Running the tests

Several modules ask you to write tests. Run them from your project with :

uv run pytest

Enjoy the course.