sphinx-click


Namesphinx-click JSON
Version 5.1.0 PyPI version JSON
download
home_pagehttps://github.com/click-contrib/sphinx-click
SummarySphinx extension that automatically documents click applications
upload_time2023-11-21 16:42:17
maintainer
docs_urlNone
authorStephen Finucane
requires_python>=3.8
licenseMIT License
keywords sphinx click
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ============
sphinx-click
============

.. image:: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml/badge.svg
    :target: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml
    :alt: Build Status

.. image:: https://readthedocs.org/projects/sphinx-click/badge/?version=latest
    :target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest
    :alt: 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.

__ http://www.sphinx-doc.org/
__ http://click.pocoo.org/

Installation
------------

Install the plugin using ``pip``:

.. code-block:: shell

   $ pip install sphinx-click

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

.. code-block:: shell

   $ pip install .

Usage
-----

.. important::

   To document a Click-based application, both the application itself and any
   additional dependencies required by that application **must be installed**.

Enable the plugin in your Sphinx ``conf.py`` file:

.. code-block:: python

   extensions = ['sphinx_click']

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

.. code-block::

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

Detailed information on the various options available is provided in the
`documentation <https://sphinx-click.readthedocs.io>`_.

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`__.

__ https://github.com/kdeldycke/click-extra/
__ https://kdeldycke.github.io/click-extra/sphinx.html


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/click-contrib/sphinx-click",
    "name": "sphinx-click",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "sphinx click",
    "author": "Stephen Finucane",
    "author_email": "stephen@that.guru",
    "download_url": "https://files.pythonhosted.org/packages/9a/9b/5ab964dc1b4a47a0f3bfb6cb48c7a234d95f956e5338ad4e55797f86c4f5/sphinx-click-5.1.0.tar.gz",
    "platform": null,
    "description": "============\nsphinx-click\n============\n\n.. image:: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml/badge.svg\n    :target: https://github.com/click-contrib/sphinx-click/actions/workflows/ci.yaml\n    :alt: Build Status\n\n.. image:: https://readthedocs.org/projects/sphinx-click/badge/?version=latest\n    :target: https://sphinx-click.readthedocs.io/en/latest/?badge=latest\n    :alt: Documentation Status\n\n``sphinx-click`` is a `Sphinx`__ plugin that allows you to automatically extract\ndocumentation from a `Click-based`__ application and include it in your docs.\n\n__ http://www.sphinx-doc.org/\n__ http://click.pocoo.org/\n\nInstallation\n------------\n\nInstall the plugin using ``pip``:\n\n.. code-block:: shell\n\n   $ pip install sphinx-click\n\nAlternatively, install from source by cloning this repo then running ``pip``\nlocally:\n\n.. code-block:: shell\n\n   $ pip install .\n\nUsage\n-----\n\n.. important::\n\n   To document a Click-based application, both the application itself and any\n   additional dependencies required by that application **must be installed**.\n\nEnable the plugin in your Sphinx ``conf.py`` file:\n\n.. code-block:: python\n\n   extensions = ['sphinx_click']\n\nOnce enabled, you can now use the plugin wherever necessary in the\ndocumentation.\n\n.. code-block::\n\n   .. click:: module:parser\n      :prog: hello-world\n      :nested: full\n\nDetailed information on the various options available is provided in the\n`documentation <https://sphinx-click.readthedocs.io>`_.\n\nAlternative\n-----------\n\nThis plugin is perfect to document a Click-based CLI in Sphinx, as it properly\nrenders the help screen and its options in nice HTML with deep links and\nstyling.\n\nHowever, if you are looking to document the source code of a Click-based CLI,\nand the result of its execution, you might want to check out `click-extra`__.\nThe latter provides the ``.. click:example::`` and ``.. click:run::`` Sphinx\ndirectives so you can `capture and render, with full colors, the result of your\nCLI in your documentation`__.\n\n__ https://github.com/kdeldycke/click-extra/\n__ https://kdeldycke.github.io/click-extra/sphinx.html\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Sphinx extension that automatically documents click applications",
    "version": "5.1.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/click-contrib/sphinx-click/issues",
        "Documentation": "https://sphinx-click.readthedocs.io/en/latest",
        "Homepage": "https://github.com/click-contrib/sphinx-click",
        "Source Code": "https://github.com/click-contrib/sphinx-click"
    },
    "split_keywords": [
        "sphinx",
        "click"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c5723f1f052aa00fc4c7e9976eb845eeae25dabf4ee73a27618776f9f44009d0",
                "md5": "3772001a6abc4d531c31804ca7b514b7",
                "sha256": "ae97557a4e9ec646045089326c3b90e026c58a45e083b8f35f17d5d6558d08a0"
            },
            "downloads": -1,
            "filename": "sphinx_click-5.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3772001a6abc4d531c31804ca7b514b7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9704,
            "upload_time": "2023-11-21T16:42:15",
            "upload_time_iso_8601": "2023-11-21T16:42:15.459042Z",
            "url": "https://files.pythonhosted.org/packages/c5/72/3f1f052aa00fc4c7e9976eb845eeae25dabf4ee73a27618776f9f44009d0/sphinx_click-5.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9a9b5ab964dc1b4a47a0f3bfb6cb48c7a234d95f956e5338ad4e55797f86c4f5",
                "md5": "9baf1d4e0fbc83d3c56b5b5fc75b0887",
                "sha256": "6812c2db62d3fae71a4addbe5a8a0a16c97eb491f3cd63fe34b4ed7e07236f33"
            },
            "downloads": -1,
            "filename": "sphinx-click-5.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9baf1d4e0fbc83d3c56b5b5fc75b0887",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 27456,
            "upload_time": "2023-11-21T16:42:17",
            "upload_time_iso_8601": "2023-11-21T16:42:17.531664Z",
            "url": "https://files.pythonhosted.org/packages/9a/9b/5ab964dc1b4a47a0f3bfb6cb48c7a234d95f956e5338ad4e55797f86c4f5/sphinx-click-5.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-21 16:42:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "click-contrib",
    "github_project": "sphinx-click",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "tox": true,
    "lcname": "sphinx-click"
}
        
Elapsed time: 0.16131s