Learning Hub / Linux & Scripting
Python for Infrastructure Automation
Beginner → Practitioner9 lessonsAvailable
When a Bash script grows past a page, it is time for Python. Build real infrastructure tools: parse YAML and JSON, call REST APIs, drive Kubernetes and AWS, and ship them as tested command-line tools.
You'll meetvirtualenvJSON / YAMLsubprocessREST APIsargparsekubernetes clientboto3pytest
Start lesson 01 →
What you'll be able to do
- Write clear Python for everyday ops tasks
- Call REST APIs, the Kubernetes API and AWS (boto3) safely
- Build a CLI tool with arguments, logging and tests
Before you start
Linux Level 1. No prior Python needed.
How it works
Each lesson: plain-language idea → how it really works → hands-on. Each section ends with a cheat sheet & self-check.
Curriculum
Lessons marked “Read” are ready; the rest are on the way.
Modules
- 01Python essentials for ops peopleTypes, lists, dicts, loops, functions, virtualenvsRead →
- 02Files, JSON & YAMLRead, transform and write config safelyRead →
- 03Running commands safelysubprocess, exit codes, timeouts, no shell=TrueRead →
- 04HTTP & REST APIsrequests, auth, retries, paginationRead →
- 05Command-line toolsargparse, logging, config filesRead →
- 06Automating KubernetesThe official Python client, watches, patchesRead →
- 07Automating AWS with boto3Sessions, paginators, least-privilege rolesRead →
- 08Testing & packagingpytest, fixtures, packaging a CLIRead →
- 09Capstone: a fleet report toolInventory and health report across clustersRead →
- 📋Cheat sheet & self-checkEvery command from this section on one page, then 26 questions to check yourself.Open →
Real-world scenarios
Work through each one: symptom → misleading signal → evidence → root cause → prevention.
Fine with 10 servers, hangs with 1,000
Timeouts, concurrency and backoff.
The script leaked credentials to the logs
Logging, secrets and redaction.
This site is a public version of my personal engineering knowledge hub. It intentionally excludes confidential company information and internal operational details.