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-4.4.0.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

sphinx_click-4.4.0-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file sphinx-click-4.4.0.tar.gz.

File metadata

  • Download URL: sphinx-click-4.4.0.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.15

File hashes

Hashes for sphinx-click-4.4.0.tar.gz
Algorithm Hash digest
SHA256 cc67692bd28f482c7f01531c61b64e9d2f069bfcf3d24cbbb51d4a84a749fa48
MD5 85131f869706d8926f52c068bf9883cc
BLAKE2b-256 48bf8e5c3e7865d909a64ed2bd89dcc835f3c542fec857c8bdf38ee8b682af14

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for sphinx_click-4.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2821c10a68fc9ee6ce7c92fad26540d8d8c8f45e6d7258f0e4fb7529ae8fab49
MD5 b344b9ee8a44bee13c5b9ad9a4a1baa2
BLAKE2b-256 cecd00689d6d6e20159509499c79b76c143a2ac5fdcd5c44089119e47e3d674d

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