(
model: BaseModel,
include: ModelDumpIncEx = None,
exclude: ModelDumpIncEx = None,
by_alias: bool = False,
exclude_unset: bool = False,
exclude_defaults: bool = False,
exclude_none: bool = False,
)
| 241 | return model.model_config |
| 242 | |
| 243 | def model_dump( |
| 244 | model: BaseModel, |
| 245 | include: ModelDumpIncEx = None, |
| 246 | exclude: ModelDumpIncEx = None, |
| 247 | by_alias: bool = False, |
| 248 | exclude_unset: bool = False, |
| 249 | exclude_defaults: bool = False, |
| 250 | exclude_none: bool = False, |
| 251 | ) -> dict[str, Any]: |
| 252 | return model.model_dump( |
| 253 | # Nested types cannot be inferred correctly |
| 254 | include=cast(Any, include), |
| 255 | exclude=cast(Any, exclude), |
| 256 | by_alias=by_alias, |
| 257 | exclude_unset=exclude_unset, |
| 258 | exclude_defaults=exclude_defaults, |
| 259 | exclude_none=exclude_none, |
| 260 | ) |
| 261 | |
| 262 | def type_validate_python(type_: type[T], data: Any) -> T: |
| 263 | """Validate data with given type.""" |
no outgoing calls