Easy to use documentation generator for Python projects.
Documatic is an easy-to-use documentation generator for Python that helps developers generate documentation for their Python packages. This documentation generator supports both HTML and Markdown output, with the default output being Markdown.
Check out documatic's documentation generated by itself.
After installing Documatic, you can generate the documentation for your Python package just by running documatic in the root of your repository.
python -m documatic
That's it, no configuration needed - it will create a docs directory with the documentation.
To install Documatic, clone the repository from GitHub:
git clone https://github.com/aspizu/documatic
Install it using pip:
cd documatic
pip install -e .
To use the HTMLWriter, you need to install the markdown-it-py library:
pip install markdown-it-py
-h, --help
- show the help message and exit--input INPUT
- Path to a directory containing a Python package. This directory must contain an__init__.py
file.--output OUTPUT
- Path to a directory to render documentation into. Will be cleared. Defaults todocs/
--writer WRITER
- Writer used to render documentation files. Available writers:HTMLWriter
,MarkdownWriter
. Defaults toMarkdownWriter
.
The module responsible for parsing documentation, doc_string, has limitations and requires a strict format where sections are indented with 2 spaces and the summary is the first line of the description.
Unfortunately, using ast alone does not allow for the inference of function return types unless a type-hint is present in the signature. However, I have ideas for using the language server from pyright to get more information about the code.
Additionally, the HTMLWriter is unfinished and does not have any styling.