Function is_pydantic_basemodel
Source pub fn is_pydantic_basemodel(
py: Python<'_>,
obj: &Bound<'_, PyAny>,
) -> Result<bool, TypeError>
Expand description
Checks if python object is an instance of a Pydantic BaseModel
§Arguments
py - Python interpreter instance
obj - Python object to check
§Returns
Ok(bool) - true if the object is a Pydantic model
Err(TypeError) - if there was an error importing Pydantic or checking