Search code examples
pythonapigithub-apipygithub

Is it possible to access the 'Releases' Tag via PyGithub?


I try to navigate to the releases tag of a specific repository in Github via the PyGithub API. I only can navigate to the repository, but I can't navigate any further. Is there a command in the PyGithub API?

UPDATE

Or is there another Python API that satisfies my demands?


Solution

  • From what I've seen a lot of the python-based github client libraries don't have support for all of the github api endpoints, including releases. However, the github3 library does on its master branch. Install it with pip install https://github.com/sigmavirus24/github3.py/zipball/master

    Here's a functional example of its usage:

    from github3 import GitHub
    gh = GitHub()
    releases = gh.repository("github", "git-lfs").iter_releases()
    for release in releases:
      for asset in release.assets:
        print "Release %s: %s" % (release.name, asset.name)