You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps not your original use case here, but I've built a FastAPI interface with pydantic and SQLAlchemy for a complex astronomy project.
One of the APIs I pull from is a lisp based interface that returns many short forms and ALL CAPS field names and such, many of which need to be "translated" into the actual model I'm goign to be using (which is more lower case, fully named, and snake cased. For returns from the model, I am trying to avoid a whack long set of statements like this in numerous places and for some API responses tht return a lot of fields.
data=resp["result"]["PARAMETERS"]
# Now we have the datalake file path and some calibrate fields we can insert image.fits_headers['pixel_scale'] =data["QUALITIES-INFO"]["PIXEL-SCALE"]
fits_headers['gain'] =data["QUALITIES-INFO"]["GAIN"]
I notice it looks like PyMapMe's use case is more about re-purposing models than mapping fields, but was wondeirng if it could serve the same purpose. In the above, instance I have both a Images model and a Calibration model which reflect my underlying database tables, just nothing that represents the stuff coming back from the lisp API I call.
lemme know! Interesting project now I'm messing more with Python than Go and ruby...
The text was updated successfully, but these errors were encountered:
Perhaps not your original use case here, but I've built a FastAPI interface with pydantic and SQLAlchemy for a complex astronomy project.
One of the APIs I pull from is a lisp based interface that returns many short forms and ALL CAPS field names and such, many of which need to be "translated" into the actual model I'm goign to be using (which is more lower case, fully named, and snake cased. For returns from the model, I am trying to avoid a whack long set of statements like this in numerous places and for some API responses tht return a lot of fields.
I notice it looks like PyMapMe's use case is more about re-purposing models than mapping fields, but was wondeirng if it could serve the same purpose. In the above, instance I have both a Images model and a Calibration model which reflect my underlying database tables, just nothing that represents the stuff coming back from the lisp API I call.
lemme know! Interesting project now I'm messing more with Python than Go and ruby...
The text was updated successfully, but these errors were encountered: