Skip to content

mkdocstrings/griffe-pydantic

Repository files navigation

griffe-pydantic

ci documentation pypi version gitter

Griffe extension for Pydantic.

Installation

pip install griffe-pydantic

Usage

Command-line

griffe dump mypackage -e griffe_pydantic

See command-line usage in Griffe's documentation.

Python

import griffe

griffe.load(
    "mypackage",
    extensions=griffe.load_extensions(
        [{"griffe_pydantic": {"schema": True}}]
    )
)

See programmatic usage in Griffe's documentation.

MkDocs

plugins:
- mkdocstrings:
    handlers:
      python:
        options:
          extensions:
          - griffe_pydantic:
              schema: true

See MkDocs usage in Griffe's documentation.