Python for DevOps
You're viewing a free preview. Sign in free to read every script.
Why this exists Almost everything a DevOps script handles starts as text : a log line, an environment variable, a command's output, an API field. Turning that text into the right values, and the right values back into a…
Python for DevOps: Text, f-strings, Numbers and the Traps in Both
Take log lines apart and build reports with str methods and f-strings, understand text versus bytes, and handle numbers correctly: division, rounding, floats versus Decimal, parsing with int(), comparing versions, human-readable sizes, and the file name that silently breaks the standard library.
Sign in free to read this script, along with the rest of the library.
Sign in free