Skip to content

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

@cmenguy

Description

@cmenguy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions