Function get_required_string

Source
pub fn get_required_string(
    dict: &Bound<'_, PyDict>,
    key: &str,
) -> PyResult<String>
Expand description

Helper function to get a required string value from a Python dictionary.

§Returns

Returns the extracted string value or a PyErr if the key is missing or extraction fails.

§Errors

Returns PyErr if the key is missing or value extraction fails.