Building Command-Line Applications with Python

August 01, 2019
This post is part of the "Building CLI Apps with Python" series.


You can do a lot of amazing things with Python. When I started teaching myself Python last year, one of the most interesting things I discovered was how relatively easy it was to create CLI apps. Since I learn best by doing, I went ahead to create norris-cli among other apps, and discovered the possibilities were endless 😄.

Building these kinds of projects is a great way to learn, and it's super fun. To improve my skills and help others learn, I'll be doing a whole series on "Building CLI Apps with Python". I'll start with the basics and go step by step. In the end, we'll put what we've learned into practice by practice project. Of course, what we'll make won't be very useful, but we'll learn enough in the process to go ahead and make something truly useful.

What I'll cover:

  • Setting things up (Python 3.x, pip, Virtualenv, Click, etc)
  • Commands, options & arguments
  • Using Setuptools
  • Prompting users for input
  • CRUD (with an online API) (Practice project)

    • Working with data structures
    • Writing to local files
  • Testing with pytest
  • Practice project
  • Posting a package on Pypi

I hope both the experienced and those just starting out with Python will find this series useful.



ad free site