https://kedro.org/ logo
#random
Title
# random
j

Juan Luis

06/21/2023, 8:41 AM
did you know... that you can query the PyPI download stats in BigQuery? https://packaging.python.org/en/latest/guides/analyzing-pypi-package-downloads/ for example, here I extracted the download counts of Kedro by Python version and week (excuse my SQL skills, I'm a Python person python)
n

Nok Lam Chan

06/21/2023, 10:58 AM
Do you still have the query? I would like to check something or maybe I just need OCR to copy the text from the screenshotlolsob
j

Juan Luis

06/21/2023, 11:15 AM
hahaha I still have the query, one sec
Copy code
SELECT
  REGEXP_EXTRACT(details.python, r"[0-9]+\.[0-9]+") AS python_version,
  EXTRACT(WEEK FROM DATE(timestamp)) AS week_number,
  COUNT(*) AS num_downloads,
FROM `bigquery-public-data.pypi.file_downloads`
WHERE file.project = 'kedro'
  AND DATE(timestamp)
    BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
    AND CURRENT_DATE()
GROUP BY `week_number`, `python_version`
ORDER BY `num_downloads` DESC
👍🏼 1
n

Nok Lam Chan

06/21/2023, 11:28 AM
Seems like majority of the users are using 3.8, and a significant portion are still using 3.6👀 ( Python 3.7 is running out of support next week!)
👀 2
i

Iñigo Hidalgo

06/21/2023, 1:23 PM
3.5 :OOO
😂 1