I've got this data-complex astronomy project I'm working on (pro-bono).
I have a number of different backends I pull from (NASA, Unis,. etc) all who use diff field names for the same thing resulting in lots of tedious (and future error-prone) data parsing and checking code.
Was hoping to use something like pydantic as an in-between translator/mapper of thediff fields to the same schema(s).
Anyone seen something like that?
I haven't looked for a PyPI module to do this, specifically. In the past, I've done simple functions with dict lookups to map keys from one source to a canonical value, or with Pydantic, use alternate constructors that you call depending on which source you're dealing with.
Example at https://pastebin.com/8Xt5EK6R .
@cazabon This is really interesting.
Am gonna play around with it and see if I can bend it to my particular use case.
Thank you!
(the strange thing to me here is I am super surprised there is not a library that handles this already as I imagine it must be a ridiculously common use case across engineering.). Hmmmm...