xxxxx/ +- docs +- manage.py
pip install sphinx pip install sphinx sphinx-autodoc-typehints
mkdir docs cd docs sphinx-quickstart
> ソースディレクトリとビルドディレクトリを分ける(y / n) [n]: y > プロジェクト名: <プロジェクト名> > 著者名(複数可): <名前> > プロジェクトのリリース []: <リリースバージョン:0.0.1 等> > プロジェクトの言語 [en]: ja
設定ファイル: docs/source/conf.py を編集
import os import sys
sys.path.insert(0, os.path.abspath("../..")
~(省略)~
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
]
cd .. sphinx-apidoc -o docs/source .
.. toctree:: :maxdepth: 2 :caption: Contents: modules
make html