Skip to main content

3 posts tagged with "python"

Python techniques and implementation choices.

View All Tags

Getting Started with quiCkLI: Your First Command-Line Application

· 3 min read
Sven Patrick Meier
Creator and maintainer of quiCkLI, an educational Python CLI framework

If you have ever wanted to build a small Python command-line tool but found larger frameworks overwhelming, quiCkLI was designed for you. It is a minimal framework that keeps the essentials visible so you can learn - and build - without unnecessary complexity.

In this first article of the Getting Started with quiCkLI series you will build a greeting tool with exactly three concepts: Application, Argument, and Option.

Getting Started with quiCkLI: Reading Files and Validating Input

· 4 min read
Sven Patrick Meier
Creator and maintainer of quiCkLI, an educational Python CLI framework

In Part 1 you built a greeting tool with a single argument and a flag. In this article you will add two new ideas: validators that reject invalid input before your handler runs, and global options that apply to every command in an application.

The example is quickcat, a minimal file viewer modeled after the Unix cat command.

note

Application.run() reads sys.argv[1:] by default. Pass an explicit list to override, or set auto_sys_argv=False to disable automatic reading.

Getting Started with quiCkLI: Multi-Command Applications

· 4 min read
Sven Patrick Meier
Creator and maintainer of quiCkLI, an educational Python CLI framework

In the first two parts of this series you built a greeting tool and a file viewer. In this final article you will combine everything you have learned to build pyk5l, a kubectl-like multi-command application.

By the end you will understand every primitive in quickli and how they fit together in a realistic application.