Skip to main content

sphinx meets pydoc.

Project description

Turn docstrings into man pages using Sphinx, and view the result with man.


python -mpip install git+

Tests can be run with pytest.


speedoc [--opts ...]

Options are passed as is to python -msphinx. By default, sphinx is invoked as

# $tmpdir1, $tmpdir2 are set up by speedoc.
# -bman: build a man page; -q: quietly
python -msphinx $tmpdir1 $tmpdir2 -bman -q -Dextensions=sphinx.ext.napoleon

with a minimal that sets man_pages = [("contents", obj_name, "\n", "", "3")]. To use, e.g., numpydoc instead of sphinx.ext.napoleon, call

speedoc -Dextensions=sphinx.ext.autodoc,numpydoc

(With numpydoc≥0.9, it is not necessary anymore to explicitly load autodoc.)

Options to man can be passed by setting the (standard) MANOPT environment variable. For example, justification can be disabled with

MANOPT=--nj speedoc ...


Q:Docstrings are rendered terribly!
A:Invalid RST formatting is very common :-(

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for speedoc, version 0.2
Filename, size File type Python version Upload date Hashes
Filename, size speedoc-0.2-py3-none-any.whl (4.6 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page