Built by TharinduX.exe — an interactive, open-source learning platform I created to help people actually learn Python automation, not just read about it.
Learning source & full credit: Python Automation Cookbook by Jaime Buelta (Packt Publishing, 2018). This app is an original, independent study companion built with deep respect for the author's work. All explanations, examples, exercises, quizzes and projects here are written from scratch — no text from the book is reproduced. If you find this useful, please support the author by getting the original book. 🙏
An interactive, local-first learning platform that turns the ideas in the Python Automation Cookbook into a structured 0 → 100 % curriculum: deep lessons, hands-on practice, runnable code exercises, a debugging arena, quizzes, real-world projects, two capstones, spaced revision, and a transparent mastery model — with a beautiful light + dark theme.
It is not a PDF reader and not a static site. It is a learning lab you run on your own machine. Everything — content, practice, execution, and your progress — lives locally.
- 🎨 Colorful UI with light & dark themes — toggle in the top bar, remembers your choice
- 📚 61 lessons across all 10 chapters, organized into 7 mastery levels
- 🧪 143 activities — multiple-choice, output-prediction, debugging, and write-from-scratch coding, all with hints
▶️ Real Python code execution in a sandboxed runner- 🏗️ 10 projects including 2 capstones, each with a full spec
- 📈 Transparent mastery model + spaced revision (opening a page earns nothing)
- 🔍 Search, dependency map, achievements, and an honest coverage audit
- 💻 Runs fully offline — Python + FastAPI + SQLite, no cloud, no account
You need Python 3.10+ and about 30 seconds.
# 1. from the project root, install dependencies
pip install -r requirements.txt
# 2. initialize the local database (creates mastery.db and seeds all content)
python -m backend.db --reset
# 3. run the app
python -m backend.appThen open http://127.0.0.1:8000 in your browser.
That's it. Progress is saved automatically to mastery.db in the project root.
- macOS / Linux:
./run.sh - Windows:
run.bat
Both scripts install dependencies (first run), initialize the database if missing, and start the server.
| Area | What you get |
|---|---|
| Learning Path | 7 levels (Foundations → Capstone) sequencing all 10 chapters into 61 lessons |
| Lessons | Each lesson is a full unit: concept, mental model, how-it-works theory, syntax, worked examples, practice activities, a mastery quiz, and a reflection prompt |
| Practice | 143 activities — multiple-choice, output-prediction, debugging, and write-from-scratch coding — with a 3-tier hint system and reveal-solution (only after you try) |
| Code Lab | A scratchpad that runs real Python in an isolated subprocess |
| Coding Challenges / Debugging Arena | Every code and debug exercise, gathered from all chapters into focused feeds |
| Quiz Center | 61 conceptual mastery checks, browsable by chapter |
| Project Lab | 8 chapter/integration projects + 2 capstones, each with scenario, requirements, constraints, milestones, tests, and evaluation criteria |
| Weak Areas / Revision | Adaptive surfacing of shaky topics + Leitner spaced-repetition scheduling |
| Analytics | Mastery by chapter and a plain-English breakdown of the scoring algorithm |
| Achievements | Milestones unlocked through real work |
| Book Coverage | An honest audit separating content coverage from your mastery |
| Dependency Map | The prerequisite graph across all concepts |
| Search | Across lessons, libraries, concepts, and projects |
| Themes | Polished light & dark themes with a one-click toggle (remembers your choice) |
Opening a lesson earns you almost nothing. Per-lesson mastery (0–100 %) blends weighted signals:
| Signal | Weight | Notes |
|---|---|---|
| Activities solved | 35 % | penalised for hints used and repeated wrong attempts |
| Quiz accuracy | 30 % | latest answer per question |
| Theory read | 15 % | you marked the lesson read |
| Reflection written | 10 % | active recall in your own words |
| Retention | 10 % | time-decay since your last successful review |
Course mastery is the mean of per-lesson mastery. Book coverage is tracked separately — it measures whether the platform teaches a concept in full (theory + example + activity + quiz), never conflated with how well you know it. The Book Coverage page shows both side by side.
Spaced revision uses Leitner intervals (1, 3, 7, 16, 35 days): review a lesson well and it schedules further out; struggle and it returns sooner.
automation-mastery-os/
├── backend/
│ ├── app.py FastAPI app — all API endpoints + serves the frontend
│ ├── db.py SQLite schema, connection, idempotent content seeding
│ ├── mastery.py transparent mastery model, spaced revision, recommendations
│ ├── runner.py sandboxed Python execution for exercises
│ ├── test_app.py 29 in-process API integration tests
│ └── test_browser.py headless-browser smoke test of every page
├── data/
│ ├── curriculum.py all 61 lessons + activities + quizzes (original content)
│ └── projects.py 10 projects incl. 2 capstones
├── frontend/
│ ├── index.html single-page app shell
│ ├── app.css "console + blueprint" design system
│ └── app.js all views, routing, and interactions (vanilla JS, no build)
├── requirements.txt
├── run.sh / run.bat
└── mastery.db created on first init (your progress)
Stack: Python + FastAPI + SQLite on the backend; a dependency-free single-page vanilla-JS frontend. No cloud, no build step, no account.
Content is authored as Python data modules (curriculum.py, projects.py) and
seeded into SQLite. This keeps content separate from logic, makes the coverage
matrix traceable, and lets you edit content and re-seed with
python -m backend.db --reset.
# API + logic (29 checks: content integrity, sandbox safety, mastery movement,
# coverage, projects, search, achievements, static serving)
python backend/test_app.py
# headless browser smoke test (renders all pages, checks for JS errors).
# Requires: pip install playwright && python -m playwright install chromium
python backend/test_browser.pyEvery one of the 27 runnable coding exercises and 7 debugging exercises is verified so its reference solution passes its own tests.
The Code Lab and coding exercises run your Python in a separate subprocess
(python -I), never via exec() in the server. There is a hard wall-clock
timeout (stops infinite loops), an output cap, a throwaway temp working
directory, and a denylist that rejects obviously dangerous calls
(os.system, subprocess, sockets, file writes, etc.) before running.
This is a guardrail, not a hardened jail. It's the right level for a single-user local tool where you run your own code. For untrusted, multi-user use you would run each submission inside a container (Docker with dropped capabilities, no network, read-only filesystem) or a gVisor/nsjail sandbox.
The book's network-, browser-, and account-dependent recipes (Selenium, Twilio SMS, Telegram bots, LibreOffice UNO, live web scraping) are taught conceptually in their lessons and marked as such; the interactive runner targets the deterministic, pure-logic exercises.
A summary of what the platform covers. The live, per-concept version is on the Book Coverage page.
- Source: Python Automation Cookbook, Jaime Buelta, Packt, 1st ed., 2018, 388 pages, ISBN 978-1-78913-380-6. Text layer verified extractable.
- Chapters identified & mapped: 10 / 10
- Recipes → lessons: 61 lessons (one per meaningful recipe/concept)
- Learning levels: 7 (Foundations, Beginner, Practical, Intermediate, Advanced, Professional, Capstone)
- Concepts fully covered (theory + example + activity + quiz): 61 / 61 = 100 %
- Activities: 143 total — 98 multiple-choice, 27 write-from-scratch coding, 11 output-prediction, 7 debugging
- Quiz questions: 61
- Projects: 10 (8 chapter/integration + 2 capstones)
- Libraries/tools taught: 44 (venv, pip, re, parse, argparse, requests, BeautifulSoup, feedparser, Selenium, csv, openpyxl, matplotlib, Jinja2, python-docx, PDF tooling, smtplib/email, logging, pdb, and more)
Lessons per chapter: C1 = 9, C2 = 4, C3 = 9, C4 = 10, C5 = 6, C6 = 5, C7 = 5, C8 = 5, C9 = 4, C10 = 4.
Taught conceptually rather than executed (environment/account-dependent, and noted in-lesson): Selenium browser automation, Twilio SMS send/receive, Telegram bots, LibreOffice UNO macros, and live network scraping. Their techniques (waiting strategies, webhooks, templating, polite crawling) are fully covered; only live execution is out of scope for a local, offline, single-user runner.
ModuleNotFoundError: No module named 'fastapi'
Dependencies aren't installed. Run pip install -r requirements.txt. On some
systems use pip3, or python -m pip install -r requirements.txt.
pip install fails with "externally-managed-environment"
Your OS protects the system Python. Either use a virtual environment
(python -m venv .venv && source .venv/bin/activate, then install), or add
--break-system-packages to the pip command.
Port 8000 already in use
Another process holds the port. Start on a different one:
python -m uvicorn backend.app:app --port 8001 and open that port instead.
The page loads but fonts look plain The UI pulls JetBrains Mono and Inter from Google Fonts. With no internet it falls back to your system monospace and sans fonts — everything still works.
A coding exercise says a call is "blocked"
The sandbox denylist rejected something (file writes, os.system, networking).
Solve the exercise using pure logic / in-memory objects (e.g. io.StringIO
instead of real files) — that's what the exercises are designed around.
I want to start over
Settings → Reset all progress, or delete mastery.db and re-run
python -m backend.db --reset.
Reset progress but keep content
The Reset button (and the /api/reset-progress endpoint) clears attempts,
mastery, revision, and achievements while leaving all curriculum content intact.
- Creator & developer: TharinduX.exe — designed and built this entire platform (backend, frontend, curriculum authoring, mastery engine, themes).
- Knowledge source: Jaime Buelta, author of Python Automation Cookbook (Packt Publishing, 1st ed., 2018, ISBN 978-1-78913-380-6). This project exists because his book is a great teacher. Please support the author by buying the original — this app complements it, it does not replace it.
Copyright note. Every explanation, mental model, example, exercise, quiz and project in this app is original and written independently. No portion of the book's text is reproduced. This is an educational study companion.
This project's code is released under the MIT License (see LICENSE).
The MIT License covers this application's source only — it does not grant any
rights to the Python Automation Cookbook, which remains the intellectual
property of its author and publisher.
Made with care by TharinduX.exe · Learn. Practice. Master.