docstringargs: Python module for setting up argparse

Chris Angelico rosuav at gmail.com
Mon Apr 20 02:20:14 EDT 2015


Looking for comments, recommendations, advice that I've just wasted
half a day on something utterly useless, whatever it be!

I've just posted a new (single-module) package to PyPI that simplifies
the creation of an argparse UI for a program that consists of a number
of subcommands. It uses function docstrings and, optionally,
annotations, to put together the necessary argparse configs, without
needing all the names to be written out lots of times.

https://github.com/Rosuav/docstringargs
https://pypi.python.org/pypi/docstringargs

Examples are in the source tree:
https://github.com/Rosuav/docstringargs/blob/master/demo.py
https://github.com/Rosuav/docstringargs/blob/master/demo_anno.py

As this is the first project I've pushed up to PyPI, it's entirely
possible - even likely - that I've made a blooper in the metadata
somewhere. It does appear to install fine using pip, but I don't know
if something's going to cause problems down the line somewhere. All
advice gratefully received.

Is this something worth pursuing?

ChrisA



More information about the Python-list mailing list