Skip to content
eBook Charts
US
Command-Line Tools in Python

Command-Line Tools in Python

Imad Muratspahic

$28.99

Buy on Amazon View on Apple Books

Prefer it in print? See every format on Amazon →

Price on Apple Books. Amazon’s price may differ.

Read a lot? Try Kindle+ * · Compare subscriptions

Published
Genres
ComputersComputers & Internet

Description

Your script works for you. Now a colleague, a scheduler and a pipeline need to run it, and none of them can read your source. This book turns a script into a tool other people and programs can trust. Follow one running example, a stock tracker for a small shop, from the first parser to an installable package. Parse arguments and subcommands with argparse, merge settings from flags, environment variables, files and defaults, print tables or JSON and CSV, handle pipes and standard input, design exit codes that mean something, log with verbosity levels, compare the same tool in click, test it at three levels, and ship a wheel that installs a real command. Every listing was run and every output shown is real.