pdoc3
Auto-generate API documentation for Python projects.
What it is and what it does
pdoc3 is a command-line tool and Python library that reads your Python source code and generates formatted API documentation without requiring configuration files or special markup. It parses docstrings in Markdown, numpydoc, and Google-style formats, respects type annotations from PEP 484 and PEP 526, and automatically cross-links referenced identifiers within the documentation.
The tool is designed for minimal setup: point it at a module, package, or import path and it produces browsable HTML documentation. It includes a built-in development web server for previewing changes, supports customizable templates for advanced users, and respects Python conventions like `__all__` and docstring inheritance. It handles both module-level and instance variables by traversing abstract syntax trees.
Use it for:
- Generate API documentation for open-source Python packages without maintaining separate doc configuration or build steps.
- Create quick reference documentation during development using the built-in web server for instant preview.
- Document internal Python projects where minimal configuration and automatic cross-linking reduce maintenance overhead.
- Support multiple docstring formats (Markdown, Google-style, numpydoc) across a mixed codebase without reformatting.
- Publish type-annotated API docs that automatically reflect PEP 484 and PEP 526 type information from source.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Generates API documentation for Python 3+ projects automatically from source code and docstrings, supporting multiple docstring formats and type annotations.
Yes, if you need straightforward API documentation for Python 3.9+ projects and accept AGPL-3.0 licensing. The low install friction, active maintenance, and zero known vulnerabilities make it reliable. The AGPL copyleft license is the main consideration: if your project or use case requires permissive licensing, this is not suitable; otherwise, it's a solid choice for minimal-configuration documentation generation.
Install
pdoc3 on PyPI
pip
pip install pdoc3uv
uv add pdoc3poetry
poetry add pdoc3Installing pdoc3
Before you install
Low install friction with only two runtime dependencies (mako and markdown). Actively maintained with recent commits and a stable production status.
License in practice
Licensed under AGPL-3.0, which requires that any modifications or derivative works be distributed under the same license and that source code be made available to users. This is a copyleft license with stronger obligations than permissive alternatives.
Quickstart
$ pip install pdoc3
$ pdoc your_project
Or in Python:
import pdoc
pdoc.pdoc('your_module')
Requires Python 3.9 or later.
Verify before relying
- Whether the built-in development web server supports live-reload or auto-refresh during documentation preview.
- Performance characteristics when documenting very large projects or deeply nested package hierarchies.
- Whether cross-linking works across multiple separate projects or only within a single module/package.
Package facts
| License | AGPL-3.0 (agpl) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — mako, markdown |
| Maintenance | actively maintained — 512 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 290,724/month — #7,983 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pdoc3-0.11.6-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pdocpdoc generates API documentation for Python…
permissive · top 5,000 on PyPI
mkdocstrings-pythonGenerates API documentation for Python projects…
permissive · top 5,000 on PyPI
quartodocquartodoc generates Python API reference…
permissive · top 15,000 on PyPI
pydoctorpydoctor generates API documentation from…
permissive · top 15,000 on PyPI
mkdocstrings-python-legacyA legacy Python documentation handler for…
permissive · top 15,000 on PyPI
numpydocA Sphinx extension that parses and renders…
permissive · top 5,000 on PyPI
pydocstringformatterAutomatically formats Python docstrings to…
permissive · top 15,000 on PyPI
docstring-parserParses Python docstrings in ReST, Google,…
permissive · top 1,000 on PyPI
sphinx-autodoc2sphinx-autodoc2 generates API documentation for…
permissive · top 15,000 on PyPI
docformatterAutomatically formats Python docstrings to…
permissive · top 5,000 on PyPI