Created
April 27, 2011 07:57
-
-
Save rgl/943881 to your computer and use it in GitHub Desktop.
outputs the download count of a PPA
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this outputs the download count of a PPA | |
# | |
# See https://api.launchpad.net/+apidoc/devel.html#binary_package_publishing_history | |
# See https://help.launchpad.net/API/launchpadlib | |
from launchpadlib.launchpad import Launchpad | |
cachedir = '/home/rgl/.launchpadlib/cache/' | |
launchpad = Launchpad.login_anonymously('just testing', 'production', cachedir) | |
ppa = launchpad.people['rgl'].getPPAByName(name='elasticsearch') | |
binaries = ppa.getPublishedBinaries(binary_name='elasticsearch', version='0.16.0-0ubuntu1') | |
b1 = binaries[0] | |
print(b1.getDownloadCount()) | |
print(b1.getDailyDownloadTotals(start_date='2011-04-20', end_date='2011-04-21')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I made a userscript for this here: https://gist.github.com/stefansundin/f9df6c5e0fd184c60709