Repolode
ml-tooling

ml-tooling/lazydocs

Command-line tool that generates markdown API documentation from Google-style Python docstrings, as a lighter alternative to Sphinx.

Stars
253
Forks
42
Open issues
3
Last commit
15 days ago

What is it?

Lazydocs scans a Python package, module, or specific classes and functions, then writes markdown documentation based on their Google-style docstrings. It can be run from the command line with a single command, or called from Python through its programmatic API. Output defaults to a ./docs folder, and it can also print to stdout.

The generated files work on GitHub's markdown renderer and can be included in an MkDocs site. Each module, class, method, and function can get a link to its source file and line number, using relative paths or a configurable base URL. An optional overview file lists all modules, classes, and functions in one place.

Docstring validation through pydocstyle is available as an opt-in check that stops generation when problems are found. Other options control whether private modules are included, whether a table of contents and timestamp watermark are added, and whether output uses md or mdx format.

Key features

  • 01Generates markdown API docs from Google-style Python docstrings.
  • 02Creates source code links with file paths and line numbers.
  • 03Builds an API overview file listing modules, classes, and functions.
  • 04Integrates with MkDocs sites and GitHub-rendered markdown.
  • 05Optionally validates docstrings with pydocstyle before generating.

Use cases

  • Publishing API reference pages for a Python library alongside its GitHub repository.
  • Adding an auto-generated API Reference section to an MkDocs documentation site.
  • Printing docstring-based documentation to the console while working on a module.

Quick start

  1. 1

    Install lazydocs from PyPI

    pip install lazydocs
  2. 2

    Generate markdown docs for your Python package

    lazydocs path/to/your/package

Things to know

  • Only supports Google-style Python docstrings.

In collections

Topics

#python#documentation#api-docs#markdown#docstring#mkdocs#google-style#api-docs-generator#pydoc#python-api

FAQ

What is lazydocs?
Command-line tool that generates markdown API documentation from Google-style Python docstrings, as a lighter alternative to Sphinx. Lazydocs scans a Python package, module, or specific classes and functions, then writes markdown documentation based on their Google-style docstrings. It can be run from the command line with a single command, or called from Python through its programmatic API. Output defaults to a ./docs folder, and it can also print to stdout.
Is lazydocs free to use? What license does it have?
lazydocs is open source under the MIT license. Check the license terms before using it in commercial products.
Is lazydocs still maintained?
Actively maintained. The last commit to lazydocs was on Oct 23, 2026.
What can I use lazydocs for?
Publishing API reference pages for a Python library alongside its GitHub repository. Adding an auto-generated API Reference section to an MkDocs documentation site. Printing docstring-based documentation to the console while working on a module.
How do I install lazydocs?
Install lazydocs from PyPI: pip install lazydocs Generate markdown docs for your Python package: lazydocs path/to/your/package
Where can I get lazydocs?
The source code and installation instructions are on GitHub: https://github.com/ml-tooling/lazydocs

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects