All languages

Python for DevOps

You're viewing a free preview. Sign in free to read every script.

Why this exists Dictionaries are fine for a five line script, and a mess in a five hundred line one: nobody remembers which keys exist, typos in a key become runtime errors, and nothing validates a value. Once a script…

Python for DevOps: Classes, Dataclasses, Enums, Abstract Classes and Duck Typing

Model your data properly: why a plain class is tedious, dataclasses with validation and immutability, properties and alternative constructors, JSON round trips, Enums instead of magic strings, abstract base classes, and duck typing with composition, all with real output.

Sign in free to read this script, along with the rest of the library.

Sign in free