input_as_python_instance
No overview available.
def input_as_python_instance(
input_value: any,
target_type: type
) - > object
Converts a raw input value into a Python object instance based on a specified type hint or class.
Parameters
| Name | Type | Description |
|---|---|---|
| input_value | any | The raw data to be converted, typically a dictionary or primitive type. |
| target_type | type | The Python class or type hint that defines the structure and type of the resulting instance. |
Returns
| Type | Description |
|---|---|
object | An instance of the specified type, populated with the provided input data. |