griffe_pydantic ¤
griffe-pydantic package.
Griffe extension for Pydantic.
Modules:
-
common–Deprecated. Import from
griffe_pydanticdirectly instead. -
dynamic–Deprecated. Import from
griffe_pydanticdirectly instead. -
extension–Deprecated. Import from
griffe_pydanticdirectly instead. -
static–Deprecated. Import from
griffe_pydanticdirectly instead.
Classes:
-
PydanticExtension–Griffe extension for Pydantic.
Functions:
-
get_templates_path–Return the templates directory path.
PydanticExtension ¤
PydanticExtension(*, schema: bool = False)
Bases: Extension
Griffe extension for Pydantic.
Parameters:
-
schema(bool, default:False) –Whether to compute and store the JSON schema of models.
Methods:
-
on_class_instance–Detect and prepare Pydantic models.
-
on_package–Detect models once the whole package is loaded.
Source code in src/griffe_pydantic/_internal/extension.py
25 26 27 28 29 30 31 32 33 34 | |
on_class_instance ¤
on_class_instance(
*, node: AST | ObjectNode, cls: Class, **kwargs: Any
) -> None
Detect and prepare Pydantic models.
Source code in src/griffe_pydantic/_internal/extension.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
on_package ¤
Detect models once the whole package is loaded.
Source code in src/griffe_pydantic/_internal/extension.py
36 37 38 39 40 41 | |
get_templates_path ¤
get_templates_path() -> Path
Return the templates directory path.
Source code in src/griffe_pydantic/__init__.py
13 14 15 | |
common ¤
Deprecated. Import from griffe_pydantic directly instead.
dynamic ¤
Deprecated. Import from griffe_pydantic directly instead.
extension ¤
Deprecated. Import from griffe_pydantic directly instead.
static ¤
Deprecated. Import from griffe_pydantic directly instead.