Closed ChaiBapchya closed 4 years ago
Data is queried using the https://github.com/ofek/pypinfo/ tool, with these commands:
Running the same commands with the --test
option to prints the queries:
$ pypinfo --test --json --indent 0 --limit 4000 --days 30 "" project
SELECT
file.project as project,
COUNT(*) as download_count,
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
DATE_ADD(CURRENT_TIMESTAMP(), -31, "day"),
DATE_ADD(CURRENT_TIMESTAMP(), -1, "day")
)
WHERE
details.installer.name = "pip"
GROUP BY
project,
ORDER BY
download_count DESC
LIMIT 4000
$ pypinfo --test --json --indent 0 --limit 4000 --days 365 "" project
SELECT
file.project as project,
COUNT(*) as download_count,
FROM
TABLE_DATE_RANGE(
[the-psf:pypi.downloads],
DATE_ADD(CURRENT_TIMESTAMP(), -366, "day"),
DATE_ADD(CURRENT_TIMESTAMP(), -1, "day")
)
WHERE
details.installer.name = "pip"
GROUP BY
project,
ORDER BY
download_count DESC
LIMIT 4000
Thanks!
What's the query being used for retrieving the data about the PyPi packages?