Advise a service for generating documentation for Python

I needed to write documentation for an API written in Python (cherrypy). I would like to automate the process as much as possible, for example, to add a comment with a tag to the function, so that the service itself collects all the functions and their parameters from the file into a reference html file. Is there such a service? I really don't want to do stupid copying.

Author: Ivan Kramarchuk, 2017-01-03

3 answers

A widely used library for generating documentation is Sphinx-both CPython and many Python libraries use it.

The Sphinx autodoc extension can generate documentation from docstrings. Different formats can be used, for example numpydoc allows autodoc to recognize the numpy-specific documentation format used in docstrings.

To quickly view the documentation stored in docstring, you can use pydoc module / command from the standard library. The built-in help() uses pydoc to generate text documentation for viewing in the console.

Examples of other tools for generating documentation for projects written in Python, can be found in the wiki .

 2
Author: jfs, 2017-01-04 14:38:11

One of the most common tools for auto-generating API documentation is called swagger.
If desired, along with the "make me a document on the API description" functionality, you can use an entire ecosystem of open-source tools that make it easier to work with your API in one way or another.

I don't know how popular it is among pythonists, but it can also work with python.

 1
Author: Утка Учится Укрываться, 2017-01-03 16:45:54

I used apidoc quite simply, quickly. Here is page

 1
Author: Igor Lavrynenko, 2017-04-20 09:09:53