skillfed

griffe-pydantic

Griffe extension for Pydantic.

griffe-pydantic v1.3.1 305.5K downloads/30d#7,794 on PyPI27
Permissive license ISC Active released

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

uv

uv add griffe-pydantic

poetry

poetry add griffe-pydantic

Installing 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

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 :: UtilitiesTyping :: Typed

Tags

pydantic schema documentationgriffe pydantic extensionauto-document pydantic modelsapi docs for pydanticpydantic type hints in griffegriffe plugin pydantic
pydanticdocumentation-generationapi-docs

More Software Development packages