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 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
.. 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.1.0.tar.gz
(13.3 kB
view hashes)
Built Distribution
Close
Hashes for sphinx_argparse_cli-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f340ecef96681210ceaf6cc1fefab8a806be288b8065c89f790cce248537d088 |
|
MD5 | 085b7a491ed70ba59d77b1178b91c2da |
|
BLAKE2b-256 | 7a2015ad2d04c912b91dea5942c52c1662f110485b3f08adf683143a00adb556 |
Close
Hashes for sphinx_argparse_cli-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5963811c32b35143b3228c9d65e196cfedfcea0160aaf0d3f5196ae5ce9a934b |
|
MD5 | c13329e0618aa5bf4eba116aa52fe851 |
|
BLAKE2b-256 | a00594c182015f6ad81c28f90f0d675115822b9bf31346add3267e4f0bea494e |