Working with Command Line using Python!





The command line is where the rubber hits the road.

The session will broadly talk about how to interact with systems and shell environments from within Python. Further expanding to writing command line tools using Python, from (almost) scratch to building them using feature-loaded Python modules.

The following is the outline around topics to be covered during the talk:

  • Working with the Shell
    • Talking to the Interpreter with the sys module.
    • Dealing with the Operating System using the os module.
    • Spawn processes with the subprocess module.
  • Basic introduction to Python function decorators & Classes.
  • Creating Command-Line Tools
    • Using sys.argv.
    • Using argparse.
    • Using click.
    • Using fire.
    • And finally, implementing Plug-ins.


  • Basic knowledge around Python that includes stuffs like:
    • importing modules with import command.
    • writing if/else conditionals
    • writing while and for loops.
    • and that's pretty much all...
  • Basic understanding around linux shell commands.

Video URL:

Content URLs:

The talk will be based on the topics talked about in the following two blogposts (written by me):

  1. [Python for DevOps] Working with the Command Line - Part 1!
  2. [Python for DevOps] Working with the Command Line - Part 2!

Speaker Info:

Priyanka Saggu is a DevOps engineer, currently working at a dataOps organisation, Atlan. She's having an years long experience dealing with highly distributed infrastructure on hybrid cloud platforms, and writing fully automated product releases. She's also an Outreachy'19 alumna under GNOME Foundation.

Speaker Links:

  • Blog:
  • GitHub:
  • GitLab:
  • Twitter:
  • Linkedin:

Section: Developer tools and automation
Type: Talks
Target Audience: Beginner
Last Updated: