sphinx-argparse-cli
Render CLI arguments (sub-commands friendly) defined by the argparse module. For live demo checkout the documentation of tox and mdpo.
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:
| Name | Description |
|---|---|
| module | the module path to where the parser is defined |
| func | the module path to where the parser is defined |
| prog | (optional) the module path to where the parser is defined |
| title | (optional) when provided, overwrites the <prog> - CLI interface title added by default and when empty, will not be included |
| usage_width | (optional) how large should usage examples be - defaults to 100 character |
For example:
.. sphinx_argparse_cli::
:module: a_project.cli
:func: build_parser
:prog: my-cli-program
Metadata
Release files for sphinx-argparse-cli 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sphinx_argparse_cli-1.3.0.tar.gz | 15.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sphinx_argparse_cli-1.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.8 kB
Release files / sphinx_argparse_cli-1.3.0.tar.gz
| Download URL | sphinx_argparse_cli-1.3.0.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83657df78c87fd77f430a05fab42e1b8ce24f62df1e51ecdf2146b1793ed312c
|
|
BLAKE2b-256 checksum How to use checksums |
5a35577f31162c3049674d3b084e6abfddeb3d1c6b7ba6f6a8c48f33effdccbc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|
Release files / sphinx_argparse_cli-1.3.0-py3-none-any.whl
| Download URL | sphinx_argparse_cli-1.3.0-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e56fe509fb71d0eef80a60d6fb2110fb8b5e77ab5bac69e89f0a90b2dc017da5
|
|
BLAKE2b-256 checksum How to use checksums |
eb7a9bd85f4f509eb5c6ac71b22b7df4caaea4aa17f9e7ecad2166a7094e39b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.9.1
|