Skip to content

Instantly share code, notes, and snippets.

@chapmanb
Created November 24, 2013 19:32
Show Gist options
  • Save chapmanb/7631323 to your computer and use it in GitHub Desktop.
Save chapmanb/7631323 to your computer and use it in GitHub Desktop.
Get download counts for GitHub releases
#!/usr/bin/env python
"""Get download stats for releases from GitHub.
Needs development version of github3.
pip install github3
pip install git+https://github.com/sigmavirus24/github3.py.git
"""
import github3
repo = github3.repository("chapmanb", "bcbio.variation")
for release in repo.iter_releases():
for asset in release.iter_assets():
print release.name, asset.name, asset.download_count
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment