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.mockdependency) - 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_autodoc_argparse-0.0.1a26.tar.gz.
File metadata
- Download URL: sphinx_autodoc_argparse-0.0.1a26.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
336df04f4ec9f2551994af7d117af44c25a9f59c546a07df64f9c62c84b93737
|
|
| MD5 |
f8f50d8f0c62e66eb3a6d6cbf4419151
|
|
| BLAKE2b-256 |
0d93fb05be121852b01a186e41dcf84dd056b0ef3f2d2ebb0764bab3a2db70aa
|
Provenance
The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a26.tar.gz:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_argparse-0.0.1a26.tar.gz -
Subject digest:
336df04f4ec9f2551994af7d117af44c25a9f59c546a07df64f9c62c84b93737 - Sigstore transparency entry: 1629670394
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Branch / Tag:
refs/tags/v0.0.1a26 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Trigger Event:
push
-
Statement type:
File details
Details for the file sphinx_autodoc_argparse-0.0.1a26-py3-none-any.whl.
File metadata
- Download URL: sphinx_autodoc_argparse-0.0.1a26-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92052e37e61c02f64f44b49199b44d259a65616e5e0916343517134bbc8470a7
|
|
| MD5 |
3041baf5be9461ea125009a104fd6447
|
|
| BLAKE2b-256 |
5f256aa07bf9e493951e187dc4b75012d1bd0b3072d9f63e8c751ec6cefd2057
|
Provenance
The following attestation bundles were made for sphinx_autodoc_argparse-0.0.1a26-py3-none-any.whl:
Publisher:
release.yml on git-pull/gp-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sphinx_autodoc_argparse-0.0.1a26-py3-none-any.whl -
Subject digest:
92052e37e61c02f64f44b49199b44d259a65616e5e0916343517134bbc8470a7 - Sigstore transparency entry: 1629671166
- Sigstore integration time:
-
Permalink:
git-pull/gp-sphinx@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Branch / Tag:
refs/tags/v0.0.1a26 - Owner: https://github.com/git-pull
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@16e555f9eaf5fab0eaaae2c5b0af39a5df44263d -
Trigger Event:
push
-
Statement type: