Skip to main content

render CLI arguments (sub-commands friendly) defined by argparse module

Project description

sphinx-argparse-cli

PyPI PyPI - Implementation PyPI - Python Version PyPI - Downloads PyPI - License check codecov Code style: black

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
.. sphinx_argparse_cli::
  :module: a_project.cli
  :func: build_parser

Project details


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.0.0.tar.gz (12.8 kB view hashes)

Uploaded Source

Built Distribution

sphinx_argparse_cli-1.0.0-py3-none-any.whl (6.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page