Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return named tuples or objects instead of raw JSON responses #8

Open
cmenguy opened this issue Feb 1, 2023 · 1 comment
Open

Return named tuples or objects instead of raw JSON responses #8

cmenguy opened this issue Feb 1, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@cmenguy
Copy link
Collaborator

cmenguy commented Feb 1, 2023

Currently when calling most of the functions it just returns a raw JSON response, and you have to manually inspect it to retrieve what you need. It would be nice to instead return a specific object that you can directly extract known fields from.

For example when creating a dataset, to get the dataset ID you need to do something like dataset_response[0].split("/")[-1] but we would like to change it so that we can just do dataset_response.dataset_id

Another example in catalog module to get the table name for a dataset we have to do response[dataset_id]["tags"]["adobe/pqs/table"][0] but it would be so much easier to use response.table_name

@pitchmuc pitchmuc added the enhancement New feature or request label Feb 3, 2023
@pitchmuc
Copy link
Owner

pitchmuc commented Feb 6, 2023

FYI: This should be doable but I do not see this as a blocker and nothing you could not accomplish yourself from the response. So I park it for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants