pydantic.validate_call
Decorators for validating function calls.
Bases: TypedDict
A dictionary-like class for configuring Pydantic models.
Type: str | None
Type: bool
Type: bool
Type: bool
Type: int
Type: int | None
Type: ExtraValues | None
Type: bool
Type: bool
Type: bool
Type: bool
Type: bool
Type: bool
Type: bool
Type: Callable[[str], str] | None
Type: tuple[type, ...]
Type: bool
Type: dict[str, object] | JsonSchemaExtraCallable | None
Type: bool
Type: Literal['always', 'never', 'subclass-instances']
Type: Literal['iso8601', 'float']
Type: Literal['utf8', 'base64']
Type: bool
Type: bool
Type: tuple[str, ...]
Type: bool
def validate_call(
config: ConfigDict | None = None,
validate_return: bool = False,
) -> Callable[[AnyCallableT], AnyCallableT]
def validate_call(__func: AnyCallableT) -> AnyCallableT
Returns a decorated version of the function that validates the arguments and, optionally, the return value.
AnyCallableT | Callable[[AnyCallableT], AnyCallableT] — The decorated function.
The function to be decorated.
The configuration dictionary.
Whether to validate the return value.
Default: TypeVar('AnyCallableT', bound=(Callable[..., Any]))