
Rattlesnake
An interactive exercise runner for learning Python, from basic syntax through advanced language features. It is a fork of Rustlings that keeps the fast Rust CLI, including its file watcher, progress tracking, and hints, while replacing the curriculum and validation pipeline with Python: fix the code, save, and get immediate feedback.
Why I built it
Rustlings was my introduction to Rust programming. Through a tight loop of broken code, failing checks, and immediate feedback it was extremely helpful as an introduction to the language. I wanted to create that exact loop for people learning Python. Nothing quite like it existed for Python as far as I was aware, so I forked Rustlings and rebuilt its exercise pipeline for a new language.
Key features
- 50 hands-on exercises with matching reference solutions, from a gentle 11-exercise intro to metaclasses and asyncio
- Watch mode reruns the current exercise automatically on every save
- Built-in hints, progress tracking, exercise reset, and a check-all command
- Per-exercise validation stages: run, test, lint, and type-check
- Covers decorators, context managers, generators, concurrency, protocols, and more
Tech notes
The CLI is Rust, preserved from Rustlings; the validation pipeline is rebuilt on the Astral toolchain: uv bootstraps the Python 3.12 environment, then each exercise runs through python, pytest, ruff, and the ty type checker as configured per exercise. Curriculum, ordering, and hints live in a single .toml file.
This project served as a great Rust codebase tour.