- Install Sphinx
- Run sphinx-quickstart to generate the doc source
cd /path/to/my-python-project mkdir doc cd doc sphinx-quickstart
autodoc: automatically insert docstrings from modules: Y
- edit conf.py, uncomment and modify the following lines(assume python modules are in ../src/):
import os import sys sys.path.insert(0, os.path.abspath('../src'))
- Run sphinx-apidoc to generate reST files for specified modules (in ../src/):
sphinx-apidoc -o . ../src
- Generate html api doc:
make html
No comments:
Post a Comment