Stage 7 · Master
Python for DevOps
Python automation for engineers who already know one language — files, APIs, cloud SDKs, data processing, and building the operational tools SREs actually use.
Prerequisite
SRE fundamentals.
What this course leaves you with
- Automate Azure and Kubernetes from Python
- Build incident tooling and bots
- Write runbook automations and exporters
Why this stage matters — Python automation is live — now add AI to the workflow.
Progress
0 of 36 lessons complete. Progress is stored locally in your browser so you can pick the path back up later.
course completion
Python for Operators
Fast-track Python for engineers who already know Go or another language — focus on the operational patterns.
- 01Python Quick StartSyntax, types, collections, comprehensions — Python for engineers who know code.8 min
- 02Files, Paths & OSpathlib, os, shutil — read configs, walk directories, and manipulate files.7 min
- 03Running Subprocessessubprocess.run, Popen, capture output, handle errors, and run shell commands.7 min
- 04Error Handlingtry/except/finally, custom exceptions, logging, and exit codes.6 min
- 05Virtual Environments & pipvenv, pip, requirements.txt, pyproject.toml, and dependency pinning.6 min
- 06Testing with pytestUnit tests, fixtures, parametrize, mocking, and CI integration.7 min
Automation Scripts
The scripts you'll actually write on-call — log parsing, config management, and data transformation.
- 01Log Parsing & AnalysisParse structured logs (JSON, logfmt), aggregate metrics, and summarize incidents.7 min
- 02Config File ManagementParse YAML, JSON, TOML, INI — validate, transform, and regenerate configs.7 min
- 03CSV & Report GenerationRead/write CSV, generate HTML/Markdown reports, and email summaries.7 min
- 04Scheduling & Cron AlternativesAPScheduler, Celery beat, and building scheduled tasks in Python.6 min
- 05Concurrent I/O with asyncioasync/await, aiohttp, concurrent HTTP calls, and asyncio task groups.8 min
- 06Building CLI ToolsClick, argparse, Typer — build polished CLIs with help text and subcommands.7 min
HTTP APIs & REST
Call, build, and secure REST APIs in Python — the backbone of every integration script.
- 01requests & httpxGET/POST/PUT/DELETE, auth, sessions, retries, and async HTTP with httpx.7 min
- 02Working with JSON APIsParse responses, handle pagination, error status codes, and rate limits.7 min
- 03Building APIs with FastAPIRoutes, path/query params, Pydantic models, validation, and OpenAPI docs.8 min
- 04Webhook HandlersReceive and verify GitHub, Slack, and Alertmanager webhooks in FastAPI.7 min
- 05API AuthenticationAPI keys, Bearer tokens, OAuth2, and JWT validation.7 min
- 06API Testingpytest with httpx.TestClient, mock servers, and contract testing.7 min
Cloud SDKs & Azure Automation
Automate Azure resources from Python — the azure-sdk, ARM deployments, and operational scripts.
- 01Azure SDK for Pythonazure-identity, DefaultAzureCredential, and the azure-mgmt-* namespace.7 min
- 02Managing Azure ResourcesCreate, list, delete VMs, AKS clusters, and storage accounts via SDK.8 min
- 03Key Vault from PythonRead secrets, manage certificates, and rotate credentials programmatically.7 min
- 04Azure Storage SDKUpload/download blobs, manage SAS tokens, and monitor storage usage.7 min
- 05Azure Monitor SDKQuery metrics, pull logs, and create alerts programmatically.7 min
- 06Azure Automation RunbooksDeploy Python runbooks, schedules, and Hybrid Runbook Workers.7 min
Kubernetes & Container Automation
Automate Kubernetes from Python — operators, health checks, and custom tooling.
- 01kubernetes Python ClientList pods, exec into containers, watch events, and apply manifests from Python.8 min
- 02Simple Controllers in PythonWatch custom resources, reconcile state, and implement simple operators.8 min
- 03Docker SDK for PythonBuild, run, and inspect containers programmatically for testing pipelines.7 min
- 04Image Scanning AutomationTrivy, Grype — scan images in CI and fail builds on critical CVEs.7 min
- 05Helm & Helmfile AutomationRun helm from Python, parse chart values, and generate dynamic configs.7 min
- 06Kubernetes Reporting ToolsGenerate resource utilization, cost, and compliance reports from cluster state.7 min
Observability & Incident Tools
Build the internal tools SRE teams run during incidents — Prometheus queries, runbook automation, PagerDuty bots.
- 01Prometheus Python ClientInstrument applications, expose metrics, and build custom exporters.7 min
- 02Querying Prometheus APIinstant queries, range queries, and building monitoring dashboards from Python.7 min
- 03Alertmanager & PagerDuty APISilence alerts, query active incidents, and automate escalation logic.7 min
- 04OpenTelemetry for PythonAuto-instrumentation, custom spans, trace propagation, and exporting to Jaeger.8 min
- 05Runbook Automation BotsSlack/Teams bots that run runbook steps on demand during incidents.8 min
- 06Capstone: Incident Response ToolBuild a tool that silences alerts, collects diagnostics, and posts an incident summary.9 min