Annotated Doc
A Python library that enables inline documentation of parameters, class attributes, return types, and variables using the `Annotated` type hint. Current version: 0.0.4. Release cadence: irregular, with the latest release on November 10, 2025.
Warnings
- breaking The `Doc` class is located in the `annotated_doc` module, not `annotated-doc` as the package name might suggest.
- gotcha The `Doc` class is intended for inline documentation and should be used within type annotations.
Install
-
pip install annotated-doc
Imports
- Doc
from annotated_doc import Doc
Quickstart
from typing import Annotated
from annotated_doc import Doc
def greet(name: Annotated[str, Doc('The name of the person to greet')]) -> None:
print(f'Hello, {name}!')
greet('Alice')