Python for security automation
The scripts between your tools are infrastructure too. This is Python built for automation: running commands safely with subprocess, handling files and paths, regex and structured data (JSON, YAML, CSV), calling APIs, error handling with retries, small CLIs, log parsing that scales, secrets and hashing, then dependency hygiene, packaging, and testing so what you write is safe to ship. Fourteen lessons, each with runnable code, expected output, and a self-check.
01
Setup & the automation core
5 lessons01Project layout and venvsIsolated, reproducible, not on the system Python.20 min02Running commands safely with subprocessArgument lists, never shell=True with f-strings.25 min03Files and paths with pathlibRead, write, and walk the filesystem cleanly.18 min04Text and regex for logs & outputExtract fields without fragile string slicing.22 min05Structured data: JSON, YAML & CSVParse and emit the formats tools speak.20 min
02
Talking to the world
3 lessons03
Security automation at scale
3 lessonsProgress is saved in this browser only — no account required.
Final exam
Test yourself on everything
12 questions drawn from all 2 sections — every answer explained as you pick.