Skip to content

Instantly share code, notes, and snippets.

@alichtman
Created April 1, 2018 22:49
Show Gist options
  • Save alichtman/69eefa54185c6bd6dffca4a0c3db31ad to your computer and use it in GitHub Desktop.
Save alichtman/69eefa54185c6bd6dffca4a0c3db31ad to your computer and use it in GitHub Desktop.
Check PyPi Download Count with Google BigQuery
# Run this query on https://bigquery.cloud.google.com
# to see how many downloads a PyPi package has since TIMESTAMP
```
SELECT COUNT(*) as download_count
FROM TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
TIMESTAMP("2018-03-00"),
CURRENT_TIMESTAMP()
)
WHERE file.project="PYPI_PROJECT_NAME"
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment