A similar procedure could be adapted for mechdpf using python results as well.
The method below uses getattribute which makes the code very generic for extraction of various result fields.
We can typically modify the result_name (in line 8) while keeping the rest of the code intact, effectively serving as a template.