PyCon 2016 in Portland, Or
hills next to breadcrumb illustration

Tuesday 10:50 a.m.–11:20 a.m.

Click: A Pleasure To Write, A Pleasure To Use

Sebastian Vetter

Audience level:
Python Libraries


We have a wide variety of packages and modules in Python that help build commandline tools in different ways. One of the more recent contenders is 'click'. It uses a very intuitive approach to create simple CLIs as well as complex ones. In this talk, I will introduce building CLIs with 'click' and illustrate some of its advantages.


As developers, we spend a lot of time trying to automate task that we have to carry out repeatedly. A likely result is a little (or not so little) commandline tool that supposedly makes our lives easier. The Python standard library and as well as the wider community have come up with a wide range of packages that make it easier and quicker to write a Python script that can handle arguments and options. My personal experience is that they are good, but not great...until I came across `click` a tool written by Armin Ronacher. It's just beautiful to work with and create simple, yet powerful, commandline tools. In this talk, I will take a look at the landscape of Python packages that help building commandline tools such as `argparse` and `docopt`. I will then introduce `click` and illustrate some of the benefits over its alternatives before looking at a concrete example to show some of its main features.