monty’s loadfn
currently doesn’t automatically take care of deserializing to MPDataDoc
(or better the original type corresponding to the endpoint, i.e. SummaryDoc
). You’d have to hand the dict to the SummaryDoc
constructor explicitly. Something like:
from emmet.core.summary import SummaryDoc
data = loadfn("...")
for d in data:
doc = SummaryDoc(**d)
Tagging @munrojm to help with the details if needed.