Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
114 lines (75 sloc) 3.12 KB

Create an argparse.ArgumentParser from function docstrings

docs Documentation Status
tests Travis Requirements Status Coverage
package PyPI Package latest release Supported versions Supported implementations

Welcome! Additionally to the default behaviour of the :class:`argparse.ArgumentParser`, the :class:`funcargparse.FuncArgParser` allows you to

  1. automatically create a parser entirely from the docstring of a function, including the help, metavar, action, type and other parameters
  2. Let's you :ref:`chain subparsers <chain_subparsers>`

There are a lot of argparse extensions out there, but through the use of the docrep package, this package can extract much more information to automate the creation of the command line utility.

See :ref:`getting_started` for more information.

Content

.. toctree::
    :maxdepth: 1

    getting_started
    docstring_interpretation
    api/funcargparse
    changelog


Installation

Simply install it via pip:

$ pip install funcargparse

Or you install it via:

$ python setup.py install

from the source on GitHub.

Requirements

The package only requires the docrep package which we use under the hood to extract the necessary parts from the docstrings.

The package has been tested for python 2.7 and 3.5.

Indices and tables

You can’t perform that action at this time.