[pytest-dev] pytest plugins popularity

Tibor Arpas tibor.arpas at infinit.sk
Thu Jun 18 17:56:09 CEST 2015


Hi,

I was curious how much usage does pytest and it's plugins get. Of course
that's quite impossible to find out. The only very loosely related thing is
a statistics of downloads from PyPi .

I tried to pick download counts of releases older than 15 days but the
script might have had a bug anyway. The results seem quite plausible so
here you go.

The top results:
[image: Inline image 1]

Later version of the script, printing CSV:

import datetime
from xmlrpclib import ServerProxy

now = datetime.datetime.now()

package_stats = []

client = ServerProxy('https://pypi.python.org/pypi', use_datetime=True)


for package in client.search({'name': 'pytest'}):
    name = package['name']
    if name.startswith('pytest'):
        days_ago = 0
        downloads = 0
        release = None
        for release in client.package_releases(name):
            for url in client.release_urls(name, release):
                days_ago = round((now -
url['upload_time']).total_seconds()/3600/24, 1)
                downloads += url['downloads']
            break
        package_stats.append([name, release, days_ago, downloads])


for stat in package_stats:
    print(",".join([str(s) for s in stat]))

---
Tibor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20150618/23a2b2e6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 100703 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pytest-dev/attachments/20150618/23a2b2e6/attachment-0001.png>


More information about the pytest-dev mailing list