All languages

Python for DevOps

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

Why this exists The earlier pages each teach one skill. A real tool uses them together , and the new skill at this scale is structure and packaging : which module does what, how the pieces are tested separately, how a…

Capstone: logstat in Python, a Packaged Command-Line Tool with pytest Tests and Meaningful Exit Codes

Put the whole track together in one real project: a src-layout package with a pyproject.toml, a parser, a statistics class and an argparse command line that returns its exit status, pytest tests that call the tool without a subprocess, and a console script installed into a virtual environment.

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

Sign in free