Repolode
pdoc3

pdoc3/pdoc

Auto-generates API documentation for Python 3 projects from modules, packages and docstrings with no special configuration.

Stars
1,187
Forks
146
Open issues
111
Last commit
3 months ago

What is it?

pdoc is a command-line tool that generates HTML API documentation for Python projects. You point it at a module file, a package directory, or an import path, and it renders the public objects with their docstrings and type annotations.

It works with common docstring styles including Markdown, numpydoc and Google-style, supports LaTeX math and some reST directives, and respects __all__ when it is defined. Docstrings for overridden class members are inherited when left unspecified, and module, class and instance variables are documented by traversing the AST. Identifiers are cross-linked automatically.

Output can be customized through templates and docstrings can be overridden with a module-level __pdoc__ dictionary. A built-in development web server previews rendered docs as you edit.

Key features

  • 01Generates HTML docs from a module, package directory or import path.
  • 02Supports Markdown, numpydoc and Google-style docstrings.
  • 03Handles PEP 484 and PEP 526 type annotations.
  • 04Inherits docstrings for overridden class members.
  • 05Cross-links referenced identifiers automatically.
  • 06Allows custom templates and a built-in live preview server.

Use cases

  • Publishing API reference documentation for a Python library.
  • Generating browsable docs for an internal Python package without extra configuration.
  • Previewing docstring rendering while writing documentation.

Quick start

  1. 1

    Install pdoc3 from PyPI

    pip install pdoc3
  2. 2

    Generate docs for your project

    pdoc your_project

Things to know

  • The PyPI package is named pdoc3, not pdoc, so install it under that name.
  • Licensed under AGPL-3.0, a strong copyleft license that may restrict use in closed-source projects.

In collections

Topics

FAQ

What is pdoc?
Auto-generates API documentation for Python 3 projects from modules, packages and docstrings with no special configuration. pdoc is a command-line tool that generates HTML API documentation for Python projects. You point it at a module file, a package directory, or an import path, and it renders the public objects with their docstrings and type annotations.
Is pdoc free to use? What license does it have?
pdoc is open source under the AGPL-3.0 license. Check the license terms before using it in commercial products.
Is pdoc still maintained?
Updated within 6 months. The last commit to pdoc was on Aug 15, 2026.
What can I use pdoc for?
Publishing API reference documentation for a Python library. Generating browsable docs for an internal Python package without extra configuration. Previewing docstring rendering while writing documentation.
How do I install pdoc?
Install pdoc3 from PyPI: pip install pdoc3 Generate docs for your project: pdoc your_project
Where can I get pdoc?
The source code and installation instructions are on GitHub: https://github.com/pdoc3/pdoc

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

Related projects