The pypinfo
program is a Python3 command-line program to BigQuery installable via pip. If you set up the credentials (a JSON file) you should be able to write:
$ pypinfo -d 1825 blist year
Served from cache: False
Data processed: 250.31 GiB
Data billed: 250.31 GiB
Estimated cost: $1.23
| download_year | download_count |
| ------------- | -------------- |
| 2,017 | 443,067 |
| 2,016 | 391,816 |
| 2,018 | 57,689 |
Some information about the data collection is available at https://packaging.python.org/guides/analyzing-pypi-package-downloads/