<div dir="ltr">Hi,<div><br></div><div>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 .</div><div><br></div><div>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.</div><div><br></div><div>The top results:</div><div><img src="cid:ii_14e075ee4b7d7ccd" alt="Inline image 1" width="395" height="511"><br></div><div><br></div><div>Later version of the script, printing CSV:</div><div><div><br></div><div>import datetime</div><div>from xmlrpclib import ServerProxy</div><div><br></div><div>now = datetime.datetime.now()</div><div><br></div><div>package_stats = []</div><div><br></div><div>client = ServerProxy('<a href="https://pypi.python.org/pypi">https://pypi.python.org/pypi</a>', use_datetime=True)</div><div><br></div><div><br></div><div>for package in client.search({'name': 'pytest'}):</div><div>Â Â name = package['name']</div><div>Â Â if name.startswith('pytest'):</div><div>Â Â Â Â days_ago = 0</div><div>Â Â Â Â downloads = 0</div><div>Â Â Â Â release = None</div><div>Â Â Â Â for release in client.package_releases(name):</div><div>Â Â Â Â Â Â for url in client.release_urls(name, release):</div><div>Â Â Â Â Â Â Â Â days_ago = round((now - url['upload_time']).total_seconds()/3600/24, 1)</div><div>Â Â Â Â Â Â Â Â downloads += url['downloads']</div><div>Â Â Â Â Â Â break</div><div>Â Â Â Â package_stats.append([name, release, days_ago, downloads])</div><div><br></div><div><br></div><div>for stat in package_stats:</div><div>Â Â print(",".join([str(s) for s in stat]))</div></div><div><br></div><div>---</div><div>Tibor</div></div>