{"id":27030,"library":"griffe-pydantic","title":"Griffe Pydantic","description":"Griffe extension that extracts Pydantic models, fields, validators, and configurations from Python source code for documentation generation. Current version: 1.3.1. Released under MIT license with regular updates.","status":"active","version":"1.3.1","language":"python","source_language":"en","source_url":"https://github.com/mkdocstrings/griffe-pydantic","tags":["pydantic","griffe","documentation","mkdocstrings"],"install":[{"cmd":"pip install griffe-pydantic","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Core dependency as of 1.3.0; replaces griffe","package":"griffelib","optional":false},{"reason":"Required as the extension processes Pydantic models","package":"pydantic","optional":false}],"imports":[{"note":"Main extension class for integration","symbol":"GriffePydanticExtension","correct":"from griffe_pydantic import GriffePydanticExtension"}],"quickstart":{"code":"import griffe\nfrom griffe_pydantic import GriffePydanticExtension\n\next = GriffePydanticExtension()\nloader = griffe.load('my_package', extensions=[ext])\nfor model in loader.modules['my_package'].classes:\n    print(model.name, model.lines)","lang":"python","description":"Load a package and extract Pydantic models with the extension."},"warnings":[{"fix":"pip install griffelib; ensure griffe-pydantic>=1.3.0 and griffelib (not griffe) are installed.","message":"As of griffe-pydantic 1.3.0, the dependency changed from 'griffe' to 'griffelib' (griffe 1.x). Existing installations must be updated to use griffelib.","severity":"breaking","affected_versions":">=1.3.0"},{"fix":"Use the logger named 'griffe_pydantic' instead.","message":"The logger name was changed to 'griffe_pydantic' in 1.1.5; the old logger name may still work but is deprecated.","severity":"deprecated","affected_versions":"<1.1.5"},{"fix":"Use Field() or class attributes for fields; do not expect @property to be treated as a model field.","message":"Properties in Pydantic models are not processed as fields (since 1.1.4). If you rely on properties being documented as fields, update your model design or use @property explicitly for other behavior.","severity":"gotcha","affected_versions":">=1.1.4"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"pip install griffelib","cause":"griffe-pydantic 1.3.0+ requires griffelib, not griffe.","error":"ModuleNotFoundError: No module named 'griffe'"},{"fix":"from griffe_pydantic import GriffePydanticExtension","cause":"Importing incorrectly, e.g., from griffe_pydantic import griffe_pydantic.","error":"AttributeError: module 'griffe_pydantic' has no attribute 'GriffePydanticExtension'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}