annotated-doc
Document parameters, class attributes, return types, and variables inline, with Annotated.
Decision gist · record as of 2026-08-14
Yes, if you use FastAPI, Typer, SQLModel, or similar frameworks and prefer documentation colocated with type annotations. The zero-dependency install and active maintenance make it low-risk. Skip it if your team is already invested in a docstring format like Google or Sphinx style and prefers centralized parameter documentation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with no runtime dependencies.
- The package is actively maintained with a recent release and no known vulnerabilities.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects.
last release 2026-07-28 (17 days) · last repo commit 2026-08-12 · 80 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 456,245,916 downloads/mo, #88 on PyPI
Alternatives
Verify before relying
pip install annotated-doc
from typing import Annotated
from annotated_doc import Doc
def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
print(f"Hi, {name}!")- Whether documentation strings are accessible at runtime in all Python versions claimed (3.9–3.14)
- How griffe-typingdoc integration works and whether it requires additional setup
- Performance impact of using Annotated with Doc on type checking or IDE responsiveness
What it is and what it does
Annotated Doc lets you write documentation for function parameters, class attributes, return types, and variables directly next to their type annotations using Python's `Annotated` syntax, rather than in separate docstrings. Instead of writing documentation in a docstring block away from the code, you wrap the type with `Annotated[type, Doc("description")]` to keep the documentation close to the symbol it describes.
The package is designed for frameworks like FastAPI, Typer, and SQLModel that benefit from inline documentation accessible at runtime. It eliminates common docstring problems: parameter names defined in only one place (not duplicated), no risk of forgetting to update docs when renaming parameters, and documentation strings available to runtime tools and AI systems. It requires Python 3.9 or later and has no external dependencies.
Use it for
- Document FastAPI route parameters and response types inline while keeping code readable and type-safe.
- Define Typer CLI argument and option documentation directly in function signatures.
- Document SQLModel class attributes alongside their type hints for ORM clarity.
- Generate reference documentation from type annotations using static analysis tools like griffe-typingdoc.
- Keep parameter documentation synchronized with function signatures to prevent drift during refactoring.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you use FastAPI, Typer, SQLModel, or similar frameworks and prefer documentation colocated with type annotations.
The zero-dependency install and active maintenance make it low-risk. Skip it if your team is already invested in a docstring format like Google or Sphinx style and prefers centralized parameter documentation.
Install
annotated-doc on PyPI
Before you install
Low friction installation with no runtime dependencies. The package is actively maintained with a recent release and no known vulnerabilities.
License in practice
MIT license permits unrestricted use, modification, and distribution in both open-source and commercial projects.
Quickstart
pip install annotated-doc
from typing import Annotated
from annotated_doc import Doc
def hi(name: Annotated[str, Doc("Who to say hi to")]) -> None:
print(f"Hi, {name}!")
Verify before relying
- Whether documentation strings are accessible at runtime in all Python versions claimed (3.9–3.14)
- How griffe-typingdoc integration works and whether it requires additional setup
- Performance impact of using Annotated with Doc on type checking or IDE responsiveness
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 17 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 456,245,916 / month, #88 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsOperating System :: OS IndependentProgramming 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.14Programming Language :: Python :: 3.9Topic :: InternetTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Application FrameworksTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed |
Evidence: annotated_doc-0.0.5-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “inline parameter documentation”
- annotated-docProvides a way to document function parameters, class attributes,…
- griffe-typingdocGriffe extension that enables inline documentation of function…
- boto3-stubsProvides type stubs and annotations for boto3 1.43.71, enabling IDE…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
Provides type system extensions for Python programs checked with mypy, including support for special typing constructs that the mypy type checker and mypyc compiler recognize.
See also griffe-typingdoc · targ · annotated-types · docstring-parser · st-annotated-text · attributes-doc · mkdocstrings-python-legacy · sphinx-autodoc-typehints · mkdocstrings-python · mkdocstrings