Page MenuHomePhabricator

Pywikibot Download Statistic
Open, Needs TriagePublic

Description

Here is the downloads statistic from pypi for the last 6 months:

Version Downloads [%]54203
after 14 months
+30041
3.110.0+0.004
3.100.7+0.3
3.922.9+22.8
3.834.4+25.1
3.724.0-32.4
3.67.3-7.5
3.50.2-1.5
3.40.0-0.2
2.70.4-3.5
unknown10.0-3.2
SystemDownloads [%]54203
after 14 months
+30041
Darwin1.0-2.5
Linux86.5+5.9
Windows2.4-0.1
Other0.0+0.01
unknown10.2- 3.2

Source: https://pypistats.org/packages/pywikibot

from collections import Counter
from pywikibot.comms.http import fetch
python_url = 'https://pypistats.org/api/packages/pywikibot/python_minor'
system_url = 'https://pypistats.org/api/packages/pywikibot/system'
result = fetch(<url>)
data = result.json()['data']
c = Counter()
for d in data:
    c[d['category']] += d['downloads']
x = Counter((key, elem * 100 / c.total()) for key, elem in c.items())
pprint(x)