Skip to content

[Feature Request] JSON output #29

@ryan-williams

Description

@ryan-williams

Describe the solution you'd like.

pypi [--json] wheels <package> <version>
# or
pypi wheels [--json <field,...>] <package> <version>

I'm trying to estimate the total size of all wheels in a testpypi release (it's one of the q's on the quota-increase request template).

Describe alternatives you've considered if there are any.

I see in the README you mention qypi has JSON output, but this tool's latest release is a couple years more recent, and it has other nice ergonomics, so adding JSON output here would be great.

Additional context if applicable

Here's my current "one-liner":

pypi --repository testpypi wheels tiledbsoma 1.15.0rc0.post386.dev1013776864 \
| perl -ne 'print "$1$2\n" while /Size: ([\d.]+) ([KM])iB/g' \
| numfmt --from=iec \
| jq -n '[inputs]|add' \
| numfmt --to=iec
# 438M

Edit: previous version didn't account for multiple columns of output:

Example

Image

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions