Skip to main content

Sphinx extension that automatically documents click applications

Project description

Build Status Documentation Status

sphinx-click is a Sphinx plugin that allows you to automatically extract documentation from a Click-based application and include it in your docs.

Installation

Install the plugin using pip:

$ pip install sphinx-click

Alternatively, install from source by cloning this repo then running pip locally:

$ pip install .

Usage

Enable the plugin in your Sphinx conf.py file:

extensions = ['sphinx_click']

Once enabled, you can now use the plugin wherever necessary in the documentation.

.. click:: module:parser
   :prog: hello-world
   :nested: full

Detailed information on the various options available is provided in the documentation.

Alternative

This plugin is perfect to document a Click-based CLI in Sphinx, as it properly renders the help screen and its options in nice HTML with deep links and styling.

However, if you are looking to document the source code of a Click-based CLI, and the result of its execution, you might want to check out click-extra. The latter provides the .. click:example:: and .. click:run:: Sphinx directives so you can capture and render, with full colors, the result of your CLI in your documentation.

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_click-6.0.0.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

sphinx_click-6.0.0-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file sphinx_click-6.0.0.tar.gz.

File metadata

  • Download URL: sphinx_click-6.0.0.tar.gz
  • Upload date:
  • Size: 29.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.9.19

File hashes

Hashes for sphinx_click-6.0.0.tar.gz
Algorithm Hash digest
SHA256 f5d664321dc0c6622ff019f1e1c84e58ce0cecfddeb510e004cf60c2a3ab465b
MD5 55e1d13d1c64fa7e3fe0f1ca60459c02
BLAKE2b-256 db0a5b1e8d0579dbb4ca8114e456ca4a68020bfe8e15c7001f3856be4929ab83

See more details on using hashes here.

File details

Details for the file sphinx_click-6.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sphinx_click-6.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1e0a3c83bcb7c55497751b19d07ebe56b5d7b85eb76dd399cf9061b497adc317
MD5 57766de15c0a743f77d69479e4cc1ce9
BLAKE2b-256 d0d78621c4726ad3f788a1db4c0c409044b16edc563f5c9542807b3724037555

See more details on using hashes here.

Supported by

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