Talks

How to Write a Great Command Line Application

Friday, May 15th, 2026 12:30 p.m.–1 p.m. in Grand Ballroom B

Presented by

Dan Craig

Experience Level:

Some experience

Description

Command line applications are incredibly useful, and a well written one can be a joy to use. Fortunately, Python provides some powerful tools in the standard library, as well as the wider package ecosystem, that makes it easy to write great CLI tools that are a breeze to use as well as to test. In this talk, we will build up from sys.argv, cover the basics of how programs run on the terminal, and learn how to use the standard library's argparse with some some useful patterns to build a beautiful and useful command line application. We will then look at some of the third-party packages for building command line applications, and finally how to distribute your tool as a single file, even if it has external dependencies.

Search