{ "info": { "author": "Stephen Finucane", "author_email": "stephen@that.guru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Framework :: Sphinx :: Extension", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Documentation", "Topic :: Documentation :: Sphinx", "Topic :: Utilities" ], "description": "====================\nsphinxcontrib-apidoc\n====================\n\n.. image:: https://travis-ci.org/sphinx-contrib/apidoc.svg?branch=master\n :target: https://travis-ci.org/sphinx-contrib/apidoc\n\nA Sphinx extension for running `sphinx-apidoc`_ on each build.\n\nOverview\n--------\n\n*sphinx-apidoc* is a tool for automatic generation of Sphinx sources that,\nusing the `autodoc `_ extension, documents a whole package in\nthe style of other automatic API documentation tools. *sphinx-apidoc* does not\nactually build documentation - rather it simply generates it. As a result, it\nmust be run before *sphinx-build*. This generally results in ``tox.ini`` files\nlike the following:\n\n.. code-block:: ini\n\n [testenv:docs]\n commands =\n sphinx-apidoc -o doc/api my_code my_code/tests\n sphinx-build -W -b html doc doc/_build/html\n\nThis extension eliminates the need to keep that configuration outside Sphinx.\nInstead, this functionality can be enabled and configured from your\ndocumentation's ``conf.py`` file, like so:\n\n.. code-block:: python\n\n extensions = [\n 'sphinxcontrib.apidoc',\n # ...\n ]\n apidoc_module_dir = '../my_code'\n apidoc_output_dir = 'reference'\n apidoc_excluded_paths = ['tests']\n apidoc_separate_modules = True\n\nConfiguration\n-------------\n\nThe *apidoc* extension uses the following configuration values:\n\n``apidoc_module_dir``\n The path to the module to document. This must be a path to a Python package.\n This path can be a path relative to the documentation source directory or an\n absolute path.\n\n **Required**\n\n``apidoc_output_dir``\n The output directory. If it does not exist, it is created. This path is\n relative to the documentation source directory.\n\n **Optional**, defaults to ``api``.\n\n``apidoc_excluded_paths``\n An optional list of modules to exclude. These should be paths relative to\n ``apidoc_module_dir``. fnmatch-style wildcarding is supported.\n\n **Optional**, defaults to ``[]``.\n\n``apidoc_separate_modules``\n Put documentation for each module on its own page. Otherwise there will be\n one page per (sub)package.\n\n **Optional**, defaults to ``False``.\n\n``apidoc_toc_file``\n Filename for a table of contents file. Defaults to ``modules``. If set to\n ``False``, *apidoc* will not create a table of contents file.\n\n **Optional**, defaults to ``modules``.\n\n``apidoc_module_first``\n When set to ``True``, put module documentation before submodule\n documentation.\n\n **Optional**, defaults to ``False``.\n\n``apidoc_extra_args``\n Extra arguments which will be passed to ``sphinx-apidoc``. These are placed\n after flags and before the module name.\n\n **Optional**, defaults to ``[]``.\n\nMigration from pbr\n------------------\n\n`pbr`_ has historically included a custom variant of the `build_sphinx`_\ndistutils command. This provides, among other things, the ability to generate\nAPI documentation as part of build process. Clearly this is not necessary with\nthis extension.\n\nThere are two implementations of the API documentation feature in *pbr*:\n*autodoc_tree* and *autodoc*. To describe the difference, let's explore how one\nwould migrate real-world projects using both features. Your project might use\none or both: *autodoc_tree* is enabled using the ``autodoc_tree_index_modules``\nsetting while *autodoc* is enabled using the ``autodoc_index_modules``\nsetting, both found in the ``[pbr]`` section of ``setup.cfg``.\n\nautodoc_tree\n~~~~~~~~~~~~\n\nAs *autodoc_tree* is based on *sphinx-apidoc*, migration is easy. Lets take\n`python-openstackclient`_ as an example, looking at minimal versions of\n``setup.cfg`` and ``doc/source/conf.py``:\n\n.. code-block:: ini\n\n [build_sphinx]\n all_files = 1\n build-dir = doc/build\n source-dir = doc/source\n\n [pbr]\n autodoc_tree_index_modules = True\n autodoc_tree_excludes =\n setup.py\n openstackclient/volume/v3\n openstackclient/tests/\n openstackclient/tests/*\n api_doc_dir = contributor/api\n\n.. code-block:: python\n\n extensions = ['']\n\nOnce migrated, this would look like so:\n\n.. code-block:: ini\n\n [build_sphinx]\n all_files = 1\n build-dir = doc/build\n source-dir = doc/source\n\n.. code-block:: python\n\n extensions = ['sphinxcontrib.apidoc']\n\n apidoc_module_dir = '../../openstack'\n apidoc_excluded_paths = [\n 'volume',\n 'tests'\n ]\n apidoc_output_dir = 'contributor/api'\n\nThere are a couple of changes here:\n\n#. Configure ``apidoc_module_dir`` in ``conf.py``\n\n With the *autodoc_tree* feature, API documentation is always generated for\n the directory in which ``setup.cfg`` exists, which is typically the\n top-level directory. With this extension, you must explicitly state which\n directory you wish to build documentation for using the\n ``apidoc_module_dir`` setting. You should configure this to point to your\n actual package rather than the top level directory as this means you don't\n need to worry about skipping unrelated files like ``setup.py``.\n\n#. Configure ``apidoc_excluded_paths`` in ``conf.py``\n\n The ``apidoc_excluded_paths`` setting in ``conf.py`` works exactly like the\n ``[pbr] autodoc_tree_excludes`` setting in ``setup.cfg``; namely, it's a\n list of fnmatch-style paths describing files and directories to exclude\n relative to the source directory. This means you can use the values from the\n ``[pbr] autodoc_tree_excludes`` setting, though you may need to update\n these if you configured ``apidoc_module_dir`` to point to something other\n than the top-level directory.\n\n#. Configure ``apidoc_output_dir`` in ``conf.py``\n\n The ``apidoc_output_dir`` setting in ``conf.py`` works exactly like the\n ``[pbr] api_doc_dir`` setting in ``setup.cfg``; namely, it's a path relative\n to the documentation source directory to which all API documentation should\n be written. You can just copy the value from the ``[pbr] api_doc_dir``\n setting.\n\n#. Remove settings from ``setup.cfg``\n\n Remove the following settings from the ``[pbr]`` section of the\n ``setup.cfg`` file:\n\n - ``autodoc_tree_index_modules``\n - ``autodoc_tree_excludes``\n - ``api_doc_dir``\n\n You may also wish to remove the entirety of the ``[build_sphinx]`` section,\n should you wish to build docs using ``sphinx-build`` instead.\n\nOnce done, your output should work exactly as before.\n\nautodoc\n~~~~~~~\n\n*autodoc* is not based on *sphinx-apidoc*. Fortunately it is possible to\ngenerate something very similar (although not identical!). Let's take\n`oslo.privsep`_ as an example, once again looking at minimal versions of\n``setup.cfg`` and ``doc/source/conf.py``:\n\n.. code-block:: ini\n\n [build_sphinx]\n all_files = 1\n build-dir = doc/build\n source-dir = doc/source\n\n [pbr]\n autodoc_index_modules = True\n api_doc_dir = reference/api\n autodoc_exclude_modules =\n oslo_privsep.tests.*\n oslo_privsep._*\n\n.. code-block:: python\n\n extensions = ['']\n\nOnce migrated, this would look like so:\n\n.. code-block:: ini\n\n [build_sphinx]\n all_files = 1\n build-dir = doc/build\n source-dir = doc/source\n\n.. code-block:: python\n\n extensions = ['sphinxcontrib.apidoc']\n\n apidoc_module_dir = '../../oslo_privsep'\n apidoc_excluded_paths = ['tests', '_*']\n apidoc_output_dir = 'reference/api'\n apidoc_separate_modules = True\n\nMost of the changes necessary are the same as `autodoc_tree`_, with some\nexceptions.\n\n#. Configure ``apidoc_module_dir`` in ``conf.py``\n\n With the *autodoc* feature, API documentation is always generated for\n the directory in which ``setup.cfg`` exists, which is typically the\n top-level directory. With this extension, you must explicitly state which\n directory you wish to build documentation for using the\n ``apidoc_module_dir`` setting. You should configure this to point to your\n actual package rather than the top level directory as this means you don't\n need to worry about skipping unrelated files like ``setup.py``.\n\n#. Configure ``apidoc_excluded_paths`` in ``conf.py``\n\n The ``apidoc_excluded_paths`` setting in ``conf.py`` differs from the\n ``[pbr] autodoc_exclude_modules`` setting in ``setup.cfg`` in that the\n former is a list of fnmatch-style **file paths**, while the latter is a list\n of fnmatch-style **module paths**. As a result, you can reuse most of the\n values from the ``[pbr] autodoc_exclude_modules`` setting but you must\n switch from ``x.y`` format to ``x/y``. You may also need to update these\n paths if you configured ``apidoc_module_dir`` to point to something other\n than the top-level directory.\n\n#. Configure ``apidoc_output_dir`` in ``conf.py``\n\n The ``apidoc_output_dir`` setting in ``conf.py`` works exactly like the\n ``[pbr] api_doc_dir`` setting in ``setup.cfg``; namely, it's a path relative\n to the documentation source directory to which all API documentation should\n be written. You can just copy the value from the ``[pbr] api_doc_dir``\n setting.\n\n#. Configure ``apidoc_separate_modules=True`` in ``conf.py``\n\n By default, *sphinx-apidoc* generates a document per package while *autodoc*\n generates a document per (sub)module. By setting this attribute to ``True``,\n we ensure the latter behavior is used.\n\n#. Replace references to ``autoindex.rst`` with ``modules.rst``\n\n The *autodoc* feature generates a list of modules in a file called\n ``autoindex.rst`` located in the output directory. By comparison,\n *sphinx-apidoc* and this extension call this file ``modules.rst``. You must\n update all references to ``autoindex.rst`` with ``modules.rst`` instead. You\n may also wish to configure the ``depth`` option of any ``toctree``\\s that\n include this document as ``modules.rst`` is nested.\n\n#. Remove settings from ``setup.cfg``\n\n Remove the following settings from the ``[pbr]`` section of the\n ``setup.cfg`` file:\n\n - ``autodoc_index_modules``\n - ``autodoc_exclude_modules``\n - ``api_doc_dir``\n\n You may also wish to remove the entirety of the ``[build_sphinx]`` section,\n should you wish to build docs using ``sphinx-build`` instead.\n\nOnce done, your output should look similar to previously. The main change will\nbe in the aforementioned ``modules.rst``, which uses a nested layout compared\nto the flat layout of the ``autoindex.rst`` file.\n\nLinks\n-----\n\n- Source: https://github.com/sphinx-contrib/apidoc\n- Bugs: https://github.com/sphinx-contrib/apidoc/issues\n\n.. Links\n\n.. _sphinx-apidoc: http://www.sphinx-doc.org/en/stable/man/sphinx-apidoc.html\n.. _sphinx_autodoc: http://www.sphinx-doc.org/en/stable/ext/autodoc.html\n.. _pbr: https://docs.openstack.org/pbr/\n.. _build_sphinx: https://docs.openstack.org/pbr/latest/user/using.html#build-sphinx\n.. _python-openstackclient: https://github.com/openstack/python-openstackclient/tree/3.15.0\n.. _oslo.privsep: https://github.com/openstack/oslo.privsep/tree/1.28.0\n\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sphinx-contrib/apidoc", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "sphinxcontrib-apidoc", "package_url": "https://pypi.org/project/sphinxcontrib-apidoc/", "platform": "", "project_url": "https://pypi.org/project/sphinxcontrib-apidoc/", "project_urls": { "Bug Tracker": "https://github.com/sphinx-contrib/apidoc/issues", "Homepage": "https://github.com/sphinx-contrib/apidoc", "Source Code": "https://github.com/sphinx-contrib/apidoc" }, "release_url": "https://pypi.org/project/sphinxcontrib-apidoc/0.3.0/", "requires_dist": [ "pbr", "Sphinx (>=1.6.0)" ], "requires_python": "", "summary": "A Sphinx extension for running 'sphinx-apidoc' on each build", "version": "0.3.0" }, "last_serial": 4339451, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3fe4e7441e6278a137c1b336fbe07412", "sha256": "c1d0d2d5305268ae236dd9609f56539c587044c8bcd88b5ee2e644c94cec3ac8" }, "downloads": -1, "filename": "sphinxcontrib_apidoc-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3fe4e7441e6278a137c1b336fbe07412", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 10872, "upload_time": "2018-03-28T13:49:13", "url": "https://files.pythonhosted.org/packages/6c/4f/02d654a73b06a36e629bbd2c5211d35b00e5cd27b8fa3fc5f7420464d518/sphinxcontrib_apidoc-0.1.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "87cb1ee1af2383ea455b4dc17e6c7ccc", "sha256": "3433dcff45e7a6832a25ded3fe46b6a8bd99152840964756b167624d0d9cde05" }, "downloads": -1, "filename": "sphinxcontrib-apidoc-0.1.0.tar.gz", "has_sig": false, "md5_digest": "87cb1ee1af2383ea455b4dc17e6c7ccc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7021, "upload_time": "2018-03-28T13:49:14", "url": "https://files.pythonhosted.org/packages/6c/65/1a9ea0d57405f4d7b0449d75a21b8d35120e798bef701614b58e99b0d27d/sphinxcontrib-apidoc-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f24e287c428bfb19ba3eac74d690abba", "sha256": "8ec39bab6f9af1d62a4c537e12167f9dd8a0b2cd47ba426e6ae5b6fb64e7349c" }, "downloads": -1, "filename": "sphinxcontrib_apidoc-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f24e287c428bfb19ba3eac74d690abba", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6865, "upload_time": "2018-04-05T09:02:48", "url": "https://files.pythonhosted.org/packages/44/0e/e4a051c13c03fa044c10be7419cc843a94944e2917cf2b8cdf6c02b268d4/sphinxcontrib_apidoc-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e0d3581942ff6e83ecf3c91890a83953", "sha256": "7e45161753714c8a0537d8eb90f36d2ad665e2a0389f1473be0142a5c126c356" }, "downloads": -1, "filename": "sphinxcontrib-apidoc-0.2.0.tar.gz", "has_sig": false, "md5_digest": "e0d3581942ff6e83ecf3c91890a83953", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13731, "upload_time": "2018-04-05T09:02:49", "url": "https://files.pythonhosted.org/packages/29/8f/c01b3a7adfc1dc2077efe81644726c78351e2b8a7bbe17df2da414673b9d/sphinxcontrib-apidoc-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "ab956ab7c4fdccd7a06b9a09aaf12bc0", "sha256": "bbcb2ef4a0b658052be9dafb94ff8547b96341af2c5a462a23a9348fff21d3a8" }, "downloads": -1, "filename": "sphinxcontrib_apidoc-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ab956ab7c4fdccd7a06b9a09aaf12bc0", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6912, "upload_time": "2018-04-06T08:26:45", "url": "https://files.pythonhosted.org/packages/ad/96/1bf495fa89fa189b6484bbfe2b03d4a4fecde947e0f6d68efe0997a73b8d/sphinxcontrib_apidoc-0.2.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a39688db32dbbd9f3987e7f049e203fb", "sha256": "4051899e7546621d34ec3bae789ce21aa6288c8def0e3f8af9b333782f2305f4" }, "downloads": -1, "filename": "sphinxcontrib-apidoc-0.2.1.tar.gz", "has_sig": false, "md5_digest": "a39688db32dbbd9f3987e7f049e203fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13849, "upload_time": "2018-04-06T08:26:46", "url": "https://files.pythonhosted.org/packages/02/3f/1d8d5682e57716e621b888c8a266f04a8df88ee9ee39daca3c95ad773c9b/sphinxcontrib-apidoc-0.2.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "f46d301b87ff95590236e6df31ac1ffd", "sha256": "6671a46b2c6c5b0dca3d8a147849d159065e50443df79614f921b42fbd15cb09" }, "downloads": -1, "filename": "sphinxcontrib_apidoc-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f46d301b87ff95590236e6df31ac1ffd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8525, "upload_time": "2018-10-04T08:37:01", "url": "https://files.pythonhosted.org/packages/60/8d/a426a9f7f9ffc8e02d377ca82e3f005817ccf0141b85dbb8653aad13901b/sphinxcontrib_apidoc-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "baf2ad8a88918b04b54d0655aa273a82", "sha256": "729bf592cf7b7dd57c4c05794f732dc026127275d785c2a5494521fdde773fb9" }, "downloads": -1, "filename": "sphinxcontrib-apidoc-0.3.0.tar.gz", "has_sig": false, "md5_digest": "baf2ad8a88918b04b54d0655aa273a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15396, "upload_time": "2018-10-04T08:37:03", "url": "https://files.pythonhosted.org/packages/57/55/23f6919551a5e0a824f0effc3a85dd1cbc8df225196c0f6b82c7cea38299/sphinxcontrib-apidoc-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f46d301b87ff95590236e6df31ac1ffd", "sha256": "6671a46b2c6c5b0dca3d8a147849d159065e50443df79614f921b42fbd15cb09" }, "downloads": -1, "filename": "sphinxcontrib_apidoc-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f46d301b87ff95590236e6df31ac1ffd", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8525, "upload_time": "2018-10-04T08:37:01", "url": "https://files.pythonhosted.org/packages/60/8d/a426a9f7f9ffc8e02d377ca82e3f005817ccf0141b85dbb8653aad13901b/sphinxcontrib_apidoc-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "baf2ad8a88918b04b54d0655aa273a82", "sha256": "729bf592cf7b7dd57c4c05794f732dc026127275d785c2a5494521fdde773fb9" }, "downloads": -1, "filename": "sphinxcontrib-apidoc-0.3.0.tar.gz", "has_sig": false, "md5_digest": "baf2ad8a88918b04b54d0655aa273a82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15396, "upload_time": "2018-10-04T08:37:03", "url": "https://files.pythonhosted.org/packages/57/55/23f6919551a5e0a824f0effc3a85dd1cbc8df225196c0f6b82c7cea38299/sphinxcontrib-apidoc-0.3.0.tar.gz" } ] }