render CLI arguments (sub-commands friendly) defined by argparse module
Project description
sphinx-argparse-cli
Render CLI arguments (sub-commands friendly) defined by the argparse module.
Demo projects:
installation
python -m pip install sphinx-argparse-cli
enable in your conf.py
# just add it to your list of extensions to load within conf.py
extensions = ["sphinx_argparse_cli"]
use
Within the reStructuredText files use the sphinx_argparse_cli
directive that takes, at least, two arguments:
- the module path to where the parser is defined,
- a no argument function within that module that once called returns the constructed argparse parser
- (optional) a program name that overwrites the autodiscovered running argument parser
- (optional) a
:title:
argument which, when provided, overwrites the<prog> - CLI interface
title added by default and when empty, will not be included
.. sphinx_argparse_cli::
:module: a_project.cli
:func: build_parser
:prog: my-cli-program
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sphinx_argparse_cli-1.2.0.tar.gz
(14.1 kB
view hashes)
Built Distribution
Close
Hashes for sphinx_argparse_cli-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 477bfcd9f99c3d89ef1e76202ab5827b07781dffe6fa86a5dd572418554537fb |
|
MD5 | b0be8a1da5617ef5b32262cfab400b31 |
|
BLAKE2b-256 | d4dfd0372ee03502332882adbb590972fd673eb9d93d9a1a74775185df20051c |
Close
Hashes for sphinx_argparse_cli-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1c9dc3ccd4043cbfb2229094951f30e987efe4b2ecb0c76184870248cb648f1 |
|
MD5 | 2fa750d8a44f61875dca9b585e78668f |
|
BLAKE2b-256 | 3942fa32c1aa0ef42dc2f606919ec9a75633d27275a04c77daec84ff3407ff60 |