Skip to content

[FEAT] Make consumed PUs easily accessible #560

@SlowMo24

Description

@SlowMo24

What is the problem? Please describe.

To retrieve the processing units consumed by a request, one has to intercept the data retrieval and resolve the response headers before decoding the response manually like

    def _get_actual_pus(data: DownloadResponse) -> float:
        actual_pus = float(data.headers['x-processingunits-spent'])

Here's the solution

It would be nice to be able to just say e.g. data.pus.

Alternatives

Leave it as is, the interested person will find this solution

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions