forked from kubernetes-client/python
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add download stat how-to page [skip ci]
Showing
1 changed file
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Download Statistics | ||
|
||
Pypi stores download information in a [BigQuery public dataset](https://bigquery.cloud.google.com/dataset/the-psf:pypi). It can be queried to get detail infomration about downloads. For example, to get number of downloads per version, you can run this query: | ||
|
||
```sql | ||
SELECT | ||
file.version, | ||
COUNT(*) as total_downloads, | ||
FROM | ||
TABLE_DATE_RANGE( | ||
[the-psf:pypi.downloads], | ||
TIMESTAMP("20161120"), | ||
CURRENT_TIMESTAMP() | ||
) | ||
where file.project == "kubernetes" | ||
GROUP BY | ||
file.version | ||
ORDER BY | ||
total_downloads DESC | ||
LIMIT 20 | ||
``` | ||
|
||
More example queries can be found [here](https://gist.github.com/alex/4f100a9592b05e9b4d63) | ||
|
||
Reference: https://mail.python.org/pipermail/distutils-sig/2016-May/028986.html | ||
|