pdoc
$ pdoc Official Low Riskpdoc (pdoc) inspects Python packages, type annotations, and Google/NumPy/reST docstrings to render clean static HTML API documentation (pdoc my_pkg -o ./docs) with zero conf.py boilerplate. Always pass -o <dir> for finite builds, since omitting -o starts an interactive HTTP preview server.
pip install pdoc Rendering Python module docstrings and type signatures into static HTML via pdoc requires importing the local Python environment directly.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Clean non-interactive -o static export and --docformat flags, though omitting -o starts a blocking server and there is no --json output.
- Zero-config
pdoc <pkg> -o ./docsfinite static build - No
--jsonoutput; omitting-olaunches dev server
Writes only to -o directory, though inspecting packages requires Python import execution of target modules.
- Imports target Python modules at runtime to inspect signatures
Pure Python package with minimal dependencies, easy to install via pip or uvx across OSes.
- Lightweight PyPI package (
mitmproxy/pdoc)
Fastest zero-config Python API doc tool supporting type hints, Mermaid diagrams, MathJax, and Google/NumPy/reST docstrings.
- Single-command HTML output with built-in search
Maintained by the mitmproxy team (mitmproxy/pdoc) under permissive MIT-0.
- Active upstream releases under
mitmproxy/pdoc
Self-hosted crisp documentation at pdoc.dev/docs/pdoc.html.
- Official docs at pdoc.dev/docs/pdoc.html
Security, Auth & Guardrails
None required; renders local Python packages offline.
100% free, offline, and open-source (MIT-0).
# pdoc Agent Rules - Always pass `-o <output_dir>` in automated runs; omitting `-o` launches a blocking HTTP server. - Run `pdoc` inside the target project's virtualenv so all imports resolve cleanly. - Note `pdoc` imports target Python modules at runtime; only run against trusted repositories.
Agent-Ready Command Recipes
Safe Read-Only Queries
pdoc --version
Prints the installed pdoc version without importing target packages.
Controlled Writes & Previews
pdoc my_pkg -o ./docs --docformat google
Exports standalone HTML API documentation for my_pkg into ./docs using Google-style docstring parsing.
Strengths for Agents
- + Zero-config single-command HTML generation (
pdoc pkg -o ./docs) with native Python type-hint support. - + Supports Google, NumPy, and reStructuredText docstrings plus built-in search.
Caveats & Pitfalls
- ! Omitting
-ostarts a live HTTP server and opens a browser unless-n(--no-browser) is set. - ! Python-only and requires importing target modules (unsafe on untrusted code).