Sphinx

Sphinx is a documentation generation tool. It began as a way to produce Python documentation, but it is branching out to other languages, notably C/C++. It can produce output in several formats, including HTML, LaTeX, ePub, man pages, and plain text, among others. It accepts reStructuredText and builds upon the Docutils suite, adding a few pieces of markup along the way.

Installation and startup

Sphinx can be installed using pip:

pip install sphinx

Installation will add several scripts to the path. The first one we will examine is named sphinx-quickstart. It will set up a prompt the user for information and then a source directory, a configuration file, and some skeleton files:

bash-4.1$ sphinx-quickstart
Welcome to the Sphinx 1.3.6 quickstart ...

Get Mastering IPython 4.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.