sphinx-click


Namesphinx-click JSON
Version 6.0.0 PyPI version JSON
download
home_pagehttps://github.com/click-contrib/sphinx-click
SummarySphinx extension that automatically documents click applications
upload_time2024-05-15 14:49:17
maintainerNone
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": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "sphinx click",
    "author": "Stephen Finucane",
    "author_email": "stephen@that.guru",
    "download_url": "https://files.pythonhosted.org/packages/db/0a/5b1e8d0579dbb4ca8114e456ca4a68020bfe8e15c7001f3856be4929ab83/sphinx_click-6.0.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": "6.0.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": "d0d78621c4726ad3f788a1db4c0c409044b16edc563f5c9542807b3724037555",
                "md5": "57766de15c0a743f77d69479e4cc1ce9",
                "sha256": "1e0a3c83bcb7c55497751b19d07ebe56b5d7b85eb76dd399cf9061b497adc317"
            },
            "downloads": -1,
            "filename": "sphinx_click-6.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "57766de15c0a743f77d69479e4cc1ce9",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9922,
            "upload_time": "2024-05-15T14:49:15",
            "upload_time_iso_8601": "2024-05-15T14:49:15.768031Z",
            "url": "https://files.pythonhosted.org/packages/d0/d7/8621c4726ad3f788a1db4c0c409044b16edc563f5c9542807b3724037555/sphinx_click-6.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "db0a5b1e8d0579dbb4ca8114e456ca4a68020bfe8e15c7001f3856be4929ab83",
                "md5": "55e1d13d1c64fa7e3fe0f1ca60459c02",
                "sha256": "f5d664321dc0c6622ff019f1e1c84e58ce0cecfddeb510e004cf60c2a3ab465b"
            },
            "downloads": -1,
            "filename": "sphinx_click-6.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "55e1d13d1c64fa7e3fe0f1ca60459c02",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 29574,
            "upload_time": "2024-05-15T14:49:17",
            "upload_time_iso_8601": "2024-05-15T14:49:17.044077Z",
            "url": "https://files.pythonhosted.org/packages/db/0a/5b1e8d0579dbb4ca8114e456ca4a68020bfe8e15c7001f3856be4929ab83/sphinx_click-6.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-05-15 14:49: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.22728s