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.1a31.tar.gz (42.8 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.1a31-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a31.tar.gz
Algorithm Hash digest
SHA256 1ca3dfa92d4e53069e573cab936f727b04daa4b48b3c3a02da1ea2579024f569
MD5 e6b6635840d3650a95f7f5f4641c969e
BLAKE2b-256 6fcd5bf51b23a41af75da19c6c9ffcafb7e954fded44bd2103a404dc8d8395a3

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for sphinx_autodoc_argparse-0.0.1a31-py3-none-any.whl
Algorithm Hash digest
SHA256 db4546fc851740ad051d0072c8bcdbda6548a1662d3bdbfb2b0272b67fa1b881
MD5 79aa9e20e4912316128b2f9e96e64250
BLAKE2b-256 f22664faac071dbf00142c2b67d35c54c4e720aa869ae1910b6606bbfa3ecc3e

See more details on using hashes here.

Provenance

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