pdoc
API Documentation for Python Projects
What it is and what it does
pdoc is a command-line tool that generates standalone HTML API documentation directly from Python source code and docstrings. It parses type annotations, docstrings (including numpydoc and Google styles), and module structure to produce browsable documentation without requiring external build systems. The tool includes a built-in web server with live reloading for development, and outputs self-contained HTML that requires no additional runtime dependencies.
It's designed around simplicity: parse your module, generate docs, done. pdoc respects `__all__` declarations, automatically links identifiers in docstrings to their definitions, and handles forward references in type annotations. For projects with straightforward documentation needs, it offers a lightweight alternative to heavier frameworks, though the description notes that substantially more complex documentation needs may be better served by other tools.
Use it for:
- Generate quick API reference docs for a Python library during development with live-reload feedback.
- Publish standalone HTML documentation for a package without setting up Sphinx or other build infrastructure.
- Create browsable docs for internal tools or scripts where type annotations and docstrings already exist.
- Automatically document class constructors and inherited members by traversing the abstract syntax tree.
- Host API docs on a simple web server during development to review documentation alongside code changes.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
pdoc generates API documentation for Python projects by parsing source code and docstrings into standalone HTML, with a built-in web server and live reloading.
Yes. pdoc is production-stable, actively maintained, permissively licensed, and has low install friction. Install it if you need quick, zero-configuration HTML documentation from Python docstrings and type hints. Skip it only if your project requires the advanced customization or cross-project linking that heavier documentation frameworks provide.
Install
pdoc on PyPI
pip
pip install pdocuv
uv add pdocpoetry
poetry add pdocInstalling pdoc
Before you install
Low friction install with four runtime dependencies (Jinja2, pygments, MarkupSafe, markdown2). Actively maintained with recent commits; last release 291 days ago and repository shows 2511 stars.
License in practice
MIT-0 (public domain equivalent) means you can use, modify, and distribute pdoc with no restrictions or attribution requirements.
Quickstart
pip install pdoc
pdoc your_python_module
# or
pdoc ./my_project.py
# View pdoc's own docs:
pdoc pdoc
Requires Python 3.10 or newer.
Verify before relying
- Whether customizable HTML templates support all common documentation layouts without additional tooling.
- Performance characteristics when documenting very large codebases or deeply nested module hierarchies.
Package facts
| License | MIT-0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — Jinja2, pygments, MarkupSafe, markdown2 |
| Maintenance | actively maintained — 291 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 2,209,751/month — #3,208 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pdoc-16.0.0-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
pdoc3Generates API documentation for Python 3+…
agpl · 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
mkdocstrings-pythonGenerates API documentation for Python projects…
permissive · top 5,000 on PyPI
numpydocA Sphinx extension that parses and renders…
permissive · top 5,000 on PyPI
docstring-to-markdownConverts Python docstrings from…
copyleft · top 5,000 on PyPI
mkdocstrings-python-legacyA legacy Python documentation handler for…
permissive · top 15,000 on PyPI
docstring-parser-forkParses Python docstrings in ReST, Google,…
permissive · top 5,000 on PyPI
pydoctorpydoctor generates API documentation from…
permissive · top 15,000 on PyPI
quartodocquartodoc generates Python API reference…
permissive · top 15,000 on PyPI