Python for DevOps, worked through day by day. Each folder is a self-contained day with notes, runnable scripts, and sample outputs, focused on the parts of Python you actually reach for when automating infrastructure.
Nothing here is textbook-for-the-sake-of-it: every concept gets pointed at a DevOps situation, like parsing logs, checking thresholds, validating configs or talking to AWS.
- Day 1 - Python basics: data types, strings and string functions, f-strings, numbers, and regex, applied to real tasks like parsing logs, pulling usernames out of AWS ARNs, and extracting IP addresses.
- Day 2 - Keywords and variables: scoping, naming, functions, loops, try/except, and a first server restart automation script.
- Day 3 - Functions, modules, and packages: organising code, imports, virtual environments and requirements files.
- Day 4 - Command-line arguments and environment variables: sys.argv, os.getenv, and why secrets never go inside scripts.
- Day 5 - Operators: arithmetic, relational, logical and identity operators, applied to small automation tasks like a CPU monitor and an auto scaler.
- Day 6 - Conditional handling: if/elif/else used for monitoring-style checks (disk, CPU, deployment validation).
- Day 7 - Lists, tuples, and loops: indexing, slicing, break/continue, and a server checker mini project.
- Day 8 - File handling and exception handling: reading and writing files safely, FileNotFoundError, logging, and a log monitor mini project.
- Day 9 - Dictionaries and sets: the shapes all API and config data comes in, plus a config validator built on set difference.
- Day 10 - GitHub API with requests: calling public and authenticated endpoints, tokens from environment variables, and a URL health checker.
- Day 11 - Boto3 AWS automation: Python controlling AWS, from listing buckets and instances to a stopped instances cost report.
Each day keeps the same layout: notes for the concept, scripts for the examples, and outputs for sample runs.
- aws-cloud-journey : the AWS services these scripts automate, learned hands-on
- terraform-zero-to-pro : the same infrastructure as declarative code