Building a nested CLI parser from a dictionary

Posted on Sat 09 March 2019 in hints-and-kinks • Tagged with Python

Here’s a nice way to initialize a CLI argument parser in Python, with arbitrary levels of subcommands.

Continue reading

A Python one-liner for pretty-printing radosgw utilization

Posted on Thu 17 December 2015 in hints-and-kinks • Tagged with Ceph, Python

In case you need a quick overview of how many radosgw objects live in your Ceph cluster, here‘s how you do that in one (slightly involved) line of Python.

Continue reading