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.1a27.tar.gz (42.5 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.1a27-py3-none-any.whl (47.3 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a27.tar.gz
Algorithm Hash digest
SHA256 05cf2650c9b0f60cbacea5eddcccbcd18f975f1974f05270fe5b0f3a8439b9c8
MD5 97b6346578377e0f44b33f94b89eaaa5
BLAKE2b-256 f5b0be0aa664550426fd058c77a0e573d41470b9b34f706256aab4a305846399

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a27-py3-none-any.whl
Algorithm Hash digest
SHA256 722765bcc677c8421a84b0949698189b09de055def89e3471bfd8cc82354159a
MD5 8ac1e7596dac398d73e2a004770c4e71
BLAKE2b-256 b080ed1498cba2319ff26821f527a599df4f25d1dfd81665f224b2901b3e71cb

See more details on using hashes here.

Provenance

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