Hi here, I was playing a bit with the python inge...
# getting-started
b
Hi here, I was playing a bit with the python ingestion library and I found very convenient the way the python classes are generated from the data model and allow to interact with high level objects. It is really a pleasure to work with it. However, due to the problem I’m solving, ingesting data is only one of the aspects I have to deal with. The other is getting and showing information from the Datahub GMS api. This side of the problem is proving a little more challenging as there is no ready-to-use library (afaik) to convert the json documents into python objects. This, imho would result in cleaner code (no need to mix two different client with different abstraction levels), and would also be very convenient for seamless get-modify-ingest operations. Therefore I have a couple of questions: • Is there any plan to add a rest client using the same high level python object abstractions? • Is there currently a way to perform the deserialisation of the json objects from the REST api into python classes? Many thanks!
b
Hey Claudio! We totally agree that the Python SDK should provide rich abstractions for retrieving and updating metadata, as opposed to just ingesting it. We're in the progress of moving our GraphQL API to our backend service, at which point it will begin to become the de-facto API for this type of programmatic interaction. The reason we like GraphQL here is that we can get away from Rest.li-encoded JSON objects that our API currently returns (as you hinted at). The idea is to eventually write a Python SDK wrapper over this GraphQL API to return strongly-typed, easy to use Python objects. For now, there unfortunately is no "get" support in our Python framework - it is a one-way door via the ingestion pipeline. I think what you've suggested would be very useful for the entire community! cc @mammoth-bear-12532 -