griffe-pydantic
Griffe extension for Pydantic.
What it is and what it does
griffe-pydantic is a plugin that teaches Griffe, a Python API documentation extraction tool, how to understand and document Pydantic models. When you run Griffe on a codebase containing Pydantic classes, this extension automatically extracts their schemas and field definitions, making them visible in your generated documentation. It works at three levels: as a command-line flag to `griffe dump`, as a programmatic extension when loading packages in Python, and as a plugin configuration in MkDocs documentation builds.
The extension is designed for teams using Pydantic for data validation and serialization who want their model schemas to appear automatically in their API docs. It integrates cleanly into existing Griffe workflows without requiring manual schema documentation. The package is actively maintained, supports modern Python versions (3.10 through 3.14), and has no known security vulnerabilities.
Use it for:
- Generate API documentation that includes Pydantic model field types and validation rules automatically.
- Build MkDocs documentation sites where Pydantic schemas appear alongside class docstrings.
- Extract and display Pydantic model structure programmatically for code introspection tools.
- Maintain accurate schema documentation without duplicating Pydantic model definitions in docs.
- Integrate Pydantic schema discovery into CI/CD documentation generation pipelines.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extends Griffe to automatically extract and document Pydantic model schemas, making Pydantic classes visible in API documentation generated through Griffe.
Yes, if you use Pydantic models and generate API documentation with Griffe or MkDocs. The extension is actively maintained, has low install friction, carries a permissive license, and solves a real documentation gap. Install it when you need Pydantic schemas to appear in your generated docs; skip it if you don't use Pydantic or don't use Griffe for documentation.
Install
griffe-pydantic on PyPI
pip
pip install griffe-pydanticuv
uv add griffe-pydanticpoetry
poetry add griffe-pydanticInstalling griffe-pydantic
Before you install
Low friction install with a single runtime dependency (griffelib). Active maintenance with recent commits and Beta-stage stability.
License in practice
ISC license is permissive and imposes minimal restrictions on use, modification, or distribution.
Quickstart
pip install griffe-pydantic
import griffe
griffe.load(
"mypackage",
extensions=griffe.load_extensions(
[{"griffe_pydantic": {"schema": True}}]
)
)
Requires Python 3.10 or later.
Verify before relying
- Whether schema extraction works with all Pydantic v1 and v2 model types or has known limitations.
- Performance impact when processing packages with many Pydantic models.
- Compatibility with specific Griffe versions beyond the runtime dependency.
Package facts
| License | ISC (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — griffelib |
| Maintenance | actively maintained — 175 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 305,547/month — #7,794 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: griffe_pydantic-1.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
griffe2mdGenerates Markdown API documentation from…
permissive · top 15,000 on PyPI
griffe-warnings-deprecatedExtends Griffe to recognize and render PEP 702…
permissive · top 15,000 on PyPI
griffe-typingdocGriffe extension that enables inline…
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
haystack-pydoc-toolsGenerates Docusaurus-compatible Markdown API…
permissive · top 15,000 on PyPI
dydanticDynamically generates Pydantic models from JSON…
permissive · top 5,000 on PyPI
mkdocs-api-autonavAutomatically generates API reference…
permissive · top 15,000 on PyPI
openapi-pydanticProvides Pydantic-based classes that implement…
permissive · top 1,000 on PyPI
mkdocstringsAn MkDocs plugin that automatically generates…
permissive · top 5,000 on PyPI