Python for DevOps · zero to on-call
Automate the boring.
Safely.
Logs, APIs, files and alerts with the standard library: scripts that do not hang, leak secrets or fail silently.
Learning Python?
Start from zero, step by step.
Levels in order, each with a broken script to fix in your browser.
Something broken right now?
Paste the error, get the fix.
What the error means, each cause with a check to prove it and its fix, for every common Python error in automation.
Everything you need, from the first script to the 3 a.m. incident.
Fix a broken script. Right here.
Each scenario is a real automation script with a real bug. Edit it, run it, read what it prints.
Guided simulation: your script is not run by Python here. The page reads it and plays out this scenario's world (the API that hangs, the cron environment, the 10 GB log) with output captured from Python 3.13. Practise it further in .
Checks
Run it for real, on your machine
Your path
Eighteen levels, from running Python the right way to the night shift, then AWS automation with boto3 and data hygiene. Each one has a lab on your own machine and scenarios to practise.
Progress is saved in this browser only.
Scripts, tested and ready
The repository's scripts/ need only Python 3.10 or newer; scripts/aws/ adds boto3, pinned in requirements-aws.txt. Every one has --help, safe defaults (changes are dry runs until --apply), JSON output and exit codes for cron and CI, and never prints a secret or personal data. The samples are real runs; the AWS ones ran against botocore's Stubber, as in the tests.
Quiz
Scenario questions for every level. You see right or wrong at once, with the reasoning.
Script X-ray
Paste a Python script: every line explained, risky patterns flagged, missing essentials listed. Nothing leaves your browser; do not paste real secrets.
Stuck on an error?
Paste an error message or a whole traceback, or pick a symptom. Each answer explains what the error means, then each cause with a check that proves it and the fix for it, and how to prevent it, then gives you a safe scenario to break and fix it yourself, so you recognise it next time. Every entry has its own link.
Also as one plain page, readable without JavaScript: all problems and fixes.
Cheat sheet
The recipes and commands people actually use. Try opens the scenario whose fix uses that recipe; Lab needs your own machine.
How Python runs your script
From the shell that starts python3 to the system calls at the bottom. Point at a component, or tab to it, to read what it does and how it breaks.