Real Python materials: one folder per tutorial, one pinned linter
Bonus materials, exercises, and example projects for our Python tutorials
At a glance
- What is it?
- The Real Python materials repository is a directory of tutorial folders held together by a single Ruff configuration: a pinned linter version, a 79 column format, an exclude list that skips migrations and three python315 folders, and no per-project dependencies in its requirements file.
- Who is it for?
- Take a folder from realpython/materials when you are working through the matching Real Python article and want the finished code beside you. Do not treat the repository as an installable package: there are no GitHub releases and the only pinned dependency in `requirements.txt` is `ruff==0.14.1`.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Jupyter Notebook, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- realpython/materials5,221 ★ · +16
| Repository | 2026-09-23 | 2026-11-15 |
|---|---|---|
| realpython/materials | 5.2k | 5.2k |
16 Stars in the last 53 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
One line in requirements.txt, and it is the linter
The requirements file in this repository is one line long, and it is not a dependency for any tutorial:
pip install -r requirements.txtThat installs `ruff==0.14.1` and nothing else. No Django, no arcade, no wxPython, no chatterbot and no celery appears anywhere in the file, even though the tree holds folders for all of them. The contributor notes make the version part of the contract: run the checks against the exact version pinned in that file. So the honest reading of `pip install -r requirements.txt` at the repository root is that you get a style checker for the sample code and nothing runnable.
CI runs Ruff in check mode, so a formatting diff stops the push
On CI the same linter runs in check mode, so that files added to the repository follow PEP 8, and it never writes anything itself. A warning along the lines of `would reformat some_file.py` means the formatter disagrees with the file, not that the file is broken. The documented remedy is local: run both commands in the repository root folder, then commit what they change.
ruff format
ruff check --fixFor a contributor this settles the order of work before a review begins. A pull request that teaches something new and also shifts formatting in neighbouring files fails the checks, so running these two commands before pushing is part of adding the code rather than a cleanup pass afterwards.
Line length is 79 but the linter is told to ignore E501
Two parts of `pyproject.toml` pull against each other. The formatter section sets `line-length = 79`, and the lint section selects `E`, `F` and `RUF100` while ignoring `E501`, the rule that reports a line running past the limit.
[tool.ruff]
target-version = "py314"
line-length = 79[tool.ruff.lint]
select = ["E", "F", "RUF100"]
ignore = ["E501", "I"]What that buys in practice: `ruff format` wraps the code it can at 79 columns, and `ruff check` stays silent about anything the formatter cannot wrap, such as a long URL inside a string. For a reader of the tutorials that is a mild trap. An overlong line in a sample file is not proof that a rule broke, and a clean `ruff check` run is not proof that the file stayed inside the limit.
Isort is configured, then switched off by the ignore list
The configuration sets `force-sort-within-sections = true`, an isort setting for how imports are ordered. The same file's ignore list contains `I`, the prefix that covers the import sorting rules. As written, the preference is declared and then not applied: `ruff check` will neither flag nor reorder the import block in a tutorial file.
[tool.ruff.lint.isort]
force-sort-within-sections = trueTwo things follow for anyone reading or reusing this setup. A folder can teach one import style while the configuration states another, and the checks will not settle it. And if you want the isort behaviour, `I` has to come out of the ignore list, at which point every file it newly touches needs a pass of `ruff check --fix`.
The exclude list spells .devcontainers, the tree has .devcontainer
The `exclude` list has eleven entries and one of them names a path that the top-level listing does not contain: the configuration spells `.devcontainers` with a trailing s, while the directory in the tree is `.devcontainer/`. Read as written, that entry excludes a path with no directory behind it, so whether it silences anything depends on the pattern matching rather than on the author's intent. The other entries do line up. `migrations` and `how-to-indent-in-python/sample_code.py` are among them.
exclude = [
"migrations",
"how-to-indent-in-python/sample_code.py",
"agents-md/run1_main.py",
]Copy those lines as they are, or correct the spelling before you rely on the exclusion to do something.
target-version py314 leaves four folders outside the checks
`target-version = "py314"` tells the linter which interpreter syntax to assume. The exclude list then names three folders that sit past that version: `python315-frozendict/`, `python315-lazy-imports` and `python315-new-features`, plus `ai-benchmark`. Those three folders are where the repository covers the newer release, and they are also where the checks stop. The pairing is consistent with code written against a version the linter's target does not know, but the effect on a reader is a repository with two halves. In most folders the formatting is settled by this configuration. In those four it is settled by whoever wrote the notebook or script, and a snippet copied out of one of them can arrive reformatted by the time you run the formatter elsewhere.
Every tutorial is its own folder and its own dependency problem
The tree is a directory of directories: `add-to-path/`, `advent-of-code/`, `agents-md/`, `ai-debugging/`, `altair-python/`, `arcade-a-primer/`, `arcade-platformer/`, `asyncio-walkthrough/`, `binary-search/`, `bpython/`, `chatterbot/`, `celery-async-tasks/`, `django-migrations/`, `django-vue-graphql/` and roughly forty more where the listing ends. Every name matches an article, so a folder tells you the topic and nothing about the runtime. The primary language for the repository is recorded as Jupyter Notebook, so some of those folders hold notebooks rather than scripts.
advent-of-code/
binary-search/
celery-async-tasks/
django-migrations/What the top-level listing cannot tell you is what a folder needs in order to run. Nothing there and nothing in `requirements.txt` names the packages behind wxPython, Django or the LLM examples.
Support runs through office hours and chat, not the issue tracker
Questions about courses, articles and code are routed to two places: the weekly Office Hours calls and the RP Community Chat. The same page says, without hedging, that 1:1 support through GitHub is not offered because of time constraints. That is a real limit on what a broken sample buys you. The tracker is not the channel described here, so a question filed as an issue is not the route the project points at. The repository state is otherwise current: it is not archived and the last push landed on 2026-11-02. It also publishes no GitHub releases, which means there is no tag to pin when you want to point someone at an exact state of a folder.
Editorial conclusion
Take a folder from realpython/materials when you are working through the matching Real Python article and want the finished code beside you. Do not treat the repository as an installable package: there are no GitHub releases and the only pinned dependency in `requirements.txt` is `ruff==0.14.1`. Before building on any folder, run `ruff format --check` and `ruff check` from the repository root and read the article's installation steps.
Frequently asked questions
Does realpython/materials pin the dependencies needed to run its tutorial projects?
No. The only line in `requirements.txt` is `ruff==0.14.1`, the linter used for code style checks. The packages a specific sample project needs, such as Django or wxPython, are not pinned there.
Which Ruff version do contributors need for realpython/materials?
`ruff==0.14.1`, the version pinned in `requirements.txt`. The contributor notes ask contributors to use that exact Ruff version.
How do I clear a CI warning that says it would reformat a file in realpython/materials?
Run `ruff format` and then `ruff check --fix` in the repository root folder and commit the resulting changes. That is the sequence the README gives for resolving a disagreement between Ruff and the committed formatting.
Where should a question about code from realpython/materials go?
The README points to the weekly Office Hours calls and the RP Community Chat, and states that 1:1 support through GitHub is not available because of time constraints.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/realpython-materials)Star history chart for your README
[](https://hysenlabs.com/projects/realpython-materials)Was this useful?