interrogate
Interrogate a codebase for docstring coverage.
What it is and what it does
Interrogate is a command-line tool that analyzes Python source code to measure how thoroughly it is documented with docstrings. It scans modules, classes, functions, and methods to identify which have docstrings and which do not, then reports coverage as a percentage. The tool is designed to integrate into CI/CD pipelines to enforce documentation standards on new code and to assess code quality and maintainability in existing projects.
The package depends on click for CLI handling, colorama for colored output, tabulate for formatted reporting, attrs for data structures, py for filesystem utilities, and tomli for configuration parsing. It can generate SVG coverage badges by default, with optional PNG output available through an extras install (though PNG generation requires additional system libraries). The tool supports configuration via pyproject.toml or setup.cfg files.
Use it for:
- Enforce minimum docstring coverage thresholds in CI/CD pipelines to prevent undocumented code from being merged.
- Audit an unfamiliar codebase to assess documentation quality as part of code review or onboarding.
- Generate and display docstring coverage badges in project README or documentation sites.
- Track documentation coverage trends over time by running interrogate in regular builds.
- Identify specific undocumented functions and classes with verbose output for targeted documentation efforts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Interrogate scans a Python codebase to measure and report docstring coverage across modules, classes, functions, and methods, helping identify undocumented code.
Yes. Interrogate is a lightweight, actively maintained tool with no known vulnerabilities, permissive licensing, and low install friction. It solves a real problem—measuring and enforcing docstring coverage—with a straightforward CLI and CI/CD integration. Install it if you want to track or enforce documentation standards in your Python projects.
Install
interrogate on PyPI
pip
pip install interrogateuv
uv add interrogatepoetry
poetry add interrogateInstalling interrogate
Before you install
Low install friction with six lightweight runtime dependencies (attrs, click, colorama, py, tabulate, tomli). Actively maintained as of August 2026 with stable production status.
License in practice
Licensed under MIT (permissive), allowing use in most projects without restriction.
Quickstart
$ pip install interrogate
$ interrogate /path/to/project
RESULT: PASSED (minimum: 80.0%, actual: 100.0%)
Requires Python 3.8 or above. Optional PNG badge generation requires system libraries (Visual C++ on Windows, cairo/libffi on macOS, cairo/python3-dev/libffi-dev on Linux).
Verify before relying
- Whether the tool integrates with common CI/CD platforms beyond basic exit-code reporting.
- Performance characteristics on very large codebases (number of files/lines where slowdown becomes noticeable).
- Whether custom docstring formats or non-standard documentation patterns are recognized.
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 6 — attrs, click, colorama, py, tabulate, tomli |
| Maintenance | actively maintained — 859 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,536,469/month — #3,797 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: interrogate-1.7.0-py3-none-any.whl
Keywords: documentation, coverage, quality
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
docstr-coverageMeasures docstring coverage in Python source…
permissive · top 15,000 on PyPI
dbt-coverageMeasures documentation and test coverage of dbt…
permissive · top 15,000 on PyPI
coverageCoverage.py measures which lines of Python code…
permissive · top 1,000 on PyPI
docrepDocrep provides utilities to intelligently…
permissive · top 15,000 on PyPI
docstring-inheritanceAutomatically inherits docstrings from parent…
permissive · top 15,000 on PyPI
slipcoverSlipCover is a fast code coverage tool that…
permissive · top 15,000 on PyPI
pytest-markdown-docsA pytest plugin that executes Python code…
permissive · top 15,000 on PyPI
docformatterAutomatically formats Python docstrings to…
permissive · top 5,000 on PyPI
pydocstylepydocstyle is a static analysis tool that…
permissive · top 5,000 on PyPI
pylint-quotesA Pylint plugin that enforces consistent use of…
permissive · top 15,000 on PyPI