Writing Beautiful, Simple, and Safe Operations Scripts with Python
summary
A small wrapper around Python’s subprocess called Spix library provides a single typed run() API that handles signals, timeouts, logging, retries and returns a typed result object; it replaces dozens of brittle CI bash scripts at Smitten. Examples show verifying AWS CLI version, running terraform init/plan with retry on "text file busy" and using temporary directories, yielding Python exceptions and stack traces for diagnostics instead of opaque zero return codes. License: MIT.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 0:24The problem with bash
- 5:03Python as a solution
- 20:12Handling pipes
- 20:37Testing strategies
- 22:22Automation and conversion
- 28:27Architecture best practices
- 28:54Script design and conclusion
related talks
38mIt Works on My Machine: Writing Python Code for Any Environment
30mAn Admin's Cornucopia - Python Is More Than Just A Better Bash
30mSolve Your Problem With Sloppy Python
51mBuilding useful project utils in Python
41mEcosystem for Reliable Python Programming
36mCLI applications & TDD: Never write scripts again
01h 26mPackage Your Python Code as a CLI
30mPython Tricks You Can't Live Without
