Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Python DevOps Automation

Hands-on practice repo for learning Python as applied to DevOps and cloud (AWS) automation — scripting fundamentals, subprocess handling, filesystem operations, boto3/AWS automation, and testing with pytest.

This is built for educational purposes, not a polished tool library: each dayN_topic folder is a self-contained set of small scripts written to practice one concept, along with tests for each. Code quality and scope grow as the days progress.

Structure

.
├── day1_scripting_basics/
│   ├── check_env.py
│   ├── test_check_env.py
│   └── ...
├── day2_subprocess/
│   └── ...

Each script is runnable standalone and follows a consistent pattern: CLI args via argparse, explicit exit codes, and a main() function structured for testability (no logic executed at import time).

Running

Requires Python 3.10+ and pytest.

pip install -r requirements.txt

Run all tests from the repo root:

pytest -v

Run a single day's tests:

pytest day1_scripting_basics/ -v

Run tests matching a keyword:

pytest -k "config" -v

Run an individual script directly, e.g.:

python day1_scripting_basics/check_env.py --env staging --verbose

Progress log

Day Topic Notes
1 Scripting fundamentals — argparse, env vars, exit codes, precedence logic, pytest basics (monkeypatch, capsys) parse_args
2 Subprocess — shelling out to CLI tools, capturing output/exit codes subprocess, try/except
3 Filesystem operations — directories, metadata, and cleanup patterns pathlib, tmp_path

(updated as new days are added)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages