Skip to main content

Modern Sphinx extension for documenting argparse-based CLI tools

Project description

sphinx-autodoc-argparse

Modern Sphinx extension for documenting argparse-based CLI tools.

A modernized replacement for sphinx-argparse that:

  • Works with Sphinx 8.x and 9.x (no autodoc.mock dependency)
  • Fixes long-standing issues (TOC pollution, heading levels)
  • Provides configurable output (rubrics vs sections, flattened subcommands)
  • Includes Pygments lexers for argparse help output and CLI usage blocks
  • Supports extensibility via renderer classes

Install

$ pip install sphinx-autodoc-argparse

Usage

In your docs/conf.py:

extensions = ["sphinx_autodoc_argparse"]

Then use the .. argparse:: directive:

.. argparse::
   :module: myapp.cli
   :func: create_parser
   :prog: myapp

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_autodoc_argparse-0.0.1a14.tar.gz (42.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sphinx_autodoc_argparse-0.0.1a14-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_autodoc_argparse-0.0.1a14.tar.gz.

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a14.tar.gz
Algorithm Hash digest
SHA256 1fea0bcf4c4c05bc1d7e578eb2ff4126e37e19198e62021d6418223e3bb1aac5
MD5 5aba22def2cef5645f3e7099647d622f
BLAKE2b-256 92d0896145d8c07df88bc311e0e1358bfae9f6ce0ce1a9bd947559bf484655d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a14.tar.gz:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sphinx_autodoc_argparse-0.0.1a14-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a14-py3-none-any.whl
Algorithm Hash digest
SHA256 4dd8ca59b007f8ca56e864e48ed0c60b92d124968ec3bab23ed7e5925a4784f7
MD5 0dfa0a411100fc814255ef7f58720e5a
BLAKE2b-256 1a8aae500f5bed6a9cf5d594cf61815adfde07062fc1ee0097c0405a22565a52

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a14-py3-none-any.whl:

Publisher: release.yml on git-pull/gp-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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