skillfed

griffe-typingdoc

Griffe extension for PEP 727 – Documentation Metadata in Typing.

griffe-typingdoc v0.3.1 88.0K downloads/30d#13,755 on PyPI21
Permissive license ISC Active released

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-typingdoc

uv

uv add griffe-typingdoc

poetry

poetry add griffe-typingdoc

Installing 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

Development Status :: 4 - BetaIntended Audience :: DevelopersProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: DocumentationTopic :: Software DevelopmentTopic :: Software Development :: DocumentationTopic :: UtilitiesTyping :: Typed

Tags

PEP 727 documentation metadatainline parameter documentationannotated type hints documentationgriffe extensionmkdocstrings plugintyped documentation generationclass attribute documentation
pep-727mkdocs-plugintype-hints

More Software Development packages