Is there a Python library that makes it easy to create CLI utilities such as Django control commands?

I want to create a set of command line utilities in python that will be used as follows:

python utility.py command1 -option arg 

Very similar to django control commands. Is there a library that facilitates the creation of such commands?

+4
source share
4 answers

The baker is pretty nice, I think. Optfunc , perhaps as well.

+6
source

Do you just want to create a two-level team? You should use argparse - it is quite simple, similar to optparse, but it simplifies the task of a two-level command and there will be a standard library with Python 2.7.

+3
source

Take a look at the plac . I have not used it since I came across it recently. It looks simple enough.

+2
source

Source: https://habr.com/ru/post/1312174/


All Articles