griffe-typingdoc
Griffe extension for PEP 727 – Documentation Metadata in Typing.
What it is and what it does
Griffe TypingDoc is a plugin for the Griffe documentation tool that extends mkdocstrings to support PEP 727 inline documentation metadata. It allows developers to document function parameters, class attributes, return types, and module-level variables directly within their type hints using Python's Annotated type, rather than relying solely on docstrings. This approach keeps documentation closer to the code and enables richer, more structured metadata.
The extension integrates into the mkdocstrings Python handler as a configuration option, processing Annotated hints during documentation generation. It depends on griffelib for core functionality and typing-extensions for compatibility across Python versions. The package is actively maintained and supports modern Python versions from 3.10 onward.
Use it for:
- Document function parameters inline using Annotated without writing separate docstring descriptions
- Add structured metadata to class attributes that gets rendered in generated API documentation
- Maintain documentation closer to type definitions for better code-documentation alignment
- Generate richer API docs in MkDocs projects that already use mkdocstrings
- Adopt PEP 727 conventions in a codebase to standardize documentation metadata format
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Griffe extension that enables inline documentation of function parameters, class attributes, return types, and variables using Python's Annotated type hint, following PEP 727 conventions.
Yes, if you use MkDocs with mkdocstrings and want to adopt PEP 727 inline documentation metadata. Low install friction, active maintenance, permissive license, and no known vulnerabilities make it safe to adopt. Not relevant if you don't use mkdocstrings or prefer traditional docstring-only documentation.
Install
griffe-typingdoc on PyPI
pip
pip install griffe-typingdocuv
uv add griffe-typingdocpoetry
poetry add griffe-typingdocInstalling griffe-typingdoc
Before you install
Low friction install with only two runtime dependencies (griffelib and typing-extensions). Actively maintained with recent commits; last release 175 days ago. Supports Python 3.10 through 3.14.
License in practice
ISC license is permissive, allowing commercial and private use with minimal restrictions.
Quickstart
pip install griffe-typingdoc
# In mkdocs.yml:
plugins:
- mkdocstrings:
handlers:
python:
options:
extensions:
- griffe_typingdoc
Requires Python 3.10 or later; intended for use within a MkDocs project with mkdocstrings configured.
Verify before relying
- Whether this extension works with all mkdocstrings handlers or only the Python handler
- Compatibility with existing Griffe plugins and whether conflicts are possible
- Performance impact on documentation generation for large codebases
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — griffelib, typing-extensions |
| Maintenance | actively maintained — 175 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 88,007/month — #13,755 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: griffe_typingdoc-0.3.1-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
griffe-warnings-deprecatedExtends Griffe to recognize and render PEP 702…
permissive · top 15,000 on PyPI
typeapiProvides a unified API for reflecting and…
permissive · top 15,000 on PyPI
griffe-pydanticExtends Griffe to automatically extract and…
permissive · top 15,000 on PyPI
griffeGriffe extracts the complete structure and…
permissive · top 1,000 on PyPI
mkdocstrings-pythonGenerates API documentation for Python projects…
permissive · top 5,000 on PyPI
mkdocstringsAn MkDocs plugin that automatically generates…
permissive · top 5,000 on PyPI
mkdocstrings-python-legacyA legacy Python documentation handler for…
permissive · top 15,000 on PyPI
griffe2mdGenerates Markdown API documentation from…
permissive · top 15,000 on PyPI
pytkdocsExtracts and serializes Python object…
permissive · top 15,000 on PyPI