Registry / serialization / griffe-typingdoc

griffe-typingdoc

JSON →
library0.3.1pypypi✓ verified 79d ago

Griffe extension for PEP 727 – Documentation Metadata in Typing. Extracts documentation from type annotations (e.g., typing.Annotated with Doc) and attaches them to docstring sections. Current version: 0.3.1. Release cadence: irregular, ~monthly.

pip install griffe-typingdoc
INSTALL
IMPORT
SIG · GRIFFE-TYPINGDOC
G
griffe-typingdoc
serializationpythonv0.3.1
Install
1.7s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TypingDocExtension
from griffe_typingdoc import TypingDocExtension
from griffe_typingdoc import GriffeTypingDoc

Load a Python module and apply the GriffeTypingDoc extension to extract PEP 727 documentation metadata.

import ast from griffe import PythonFile, load_git from griffe_typingdoc import GriffeTypingDoc # Load a module module = load_git('some_package', repo_path='.') # Create an extension instance extension = GriffeTypingDoc() # Apply extension to parse typing doc extension.do(module)
Debug
Known issues
breakingIn version 0.3.1, the dependency changed from 'griffe' to 'griffelib'. Install 'griffelib' separately, or upgrading may break if you had pinned an older Griffe version.
fix
Install griffelib: `pip install griffelib` (or update your requirements).
affects: >=0.3.1
gotchaThe extension only adds docstring sections for elements annotated with `typing.Annotated` using `Doc` (e.g., `Annotated[str, Doc("description")]`). If you use a simple string or another object, it won't be extracted.
fix
Ensure you use `Doc` from `annotated_doc` (e.g., `from annotated_doc import Doc`) and wrap your doc string as `Doc("...")`.
affects: all
gotchaThe extension requires the package to be fully loaded before static analysis starts. Dead code or circular imports may cause incomplete analysis.
fix
Load the entire package with `load_git` or similar before calling `extension.do(...)`.
affects: all
Upgrade
Version history
0.3.1latest on PyPI · released Feb 20, 2026
Audit
Dependencies
griffelibrequiredCore dependency for Griffe introspection (since 0.3.1, replaced griffe).
Agent activity
25 hits · last 30 days
node
20
OpenAI (training)
1
Resources
griffe-typingdoc — pip install griffe-typingdoc · libregistry