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.1a16.dev0.tar.gz (42.4 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file sphinx_autodoc_argparse-0.0.1a16.dev0.tar.gz.

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a16.dev0.tar.gz
Algorithm Hash digest
SHA256 ae26ec1c7ec70cf5d932c26cfd4b0149de886f4a2add60f84abe042a4707af99
MD5 35bd7188ddbde7896690f6a65dc330cf
BLAKE2b-256 6164266ce81e0a2e444a7bcf350565bce20c59188409c08fe5c7ab882753e8e6

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a16.dev0.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.1a16.dev0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a16.dev0-py3-none-any.whl
Algorithm Hash digest
SHA256 6ae04dc8aef407f477be641d54d67a302596d3a81a8b003970f004da82b10efc
MD5 5f7712c005bc877e9a8a0322a7ff9a7e
BLAKE2b-256 a72e161a3dcf11c4666e149a313cebff9d2004d473c29bf7dbe498258420fff9

See more details on using hashes here.

Provenance

The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a16.dev0-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