- HTML 62.5%
- Python 37%
- Java 0.5%
| appendices | ||
| articles | ||
| demos | ||
| exercises | ||
| extra | ||
| solutions | ||
| tutorial | ||
| .gitignore | ||
| PRG404-Advanced-Python-Programming-Exercises.html | ||
| PRG404-Advanced-Python-Programming-Exercises.pdf | ||
| PRG404-Advanced-Python-Programming.html | ||
| PRG404-Advanced-Python-Programming.pdf | ||
| README.md | ||
| ruff.toml | ||
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.htmlif 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 exampledemos/08-decorators/). A slide that shows a demo names it at the bottom, for exampledemo06 · bold_tag_decorator, which is the filedemos/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/andtutorial/: 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
-
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. -
-
Install the interpreter the course uses :
uv python install 3.14This needs no administrator rights and leaves any Python already on the machine alone.
-
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.