Python · Building Real Applications · Intermediate · 28 min read
Python CLI Tools and Automation: argparse, Typer, subprocess, Exit Codes, Config, Logging and Packaging Scripts
Build command-line tools that other people can trust. Covers CLI design principles, argparse with subcommands, Typer and Click, input validation, reading stdin and files, exit codes and error output, structured and colourful output, running external commands safely with subprocess, configuration layering (defaults, files, environment, flags), logging and verbosity, dry runs, idempotent automation, scheduling, testing CLIs and distributing them as installable commands.
Create an account to start
Create a free account to see what this lesson covers
- Every free lesson in every section, in full
- Track your progress and pick up where you left off
- Free practice questions and an incident simulation
- Takes under a minute: name, email and a password
No card needed. Full access to Python is a paid upgrade you can choose later.