Skip to main content

Python wrapper for the GitHub API (

Project description

Build Status

Eventually this will be a python module to access the GitHub v3 API.

This is not stable yet and there is no backwards compatibility yet. There will likely be some changes which change behavior in the near future.


$ pip install


Every-day Use



Modified BSD license


See the docs for more detailed examples.

>>> from github3 import login
>>> gh = login(username, password)
>>> issue = gh.issue('sigmavirus24', 'Todo.txt-python', 17)
>>> issue.html_url
>>> issue.state
>>> events = issue.list_events()
>>> events
[<Issue Event [#17 - subscribed - sigmavirus24]>, <Issue Event [#17 - assigned - sigmavirus24]>,
 <Issue Event [#17 - referenced - sigmavirus24]>]
>>> events[0].actor
<User [sigmavirus24:None]>
>>> events[0].issue
<Issue [sigmavirus24/Todo.txt-python #17]>
>>> events[0].closed_at
>>> events[0].event
>>> from github3 import login
>>> g = login(username, password)
>>> repo = g.repository('sigmavirus24', 'Todo.txt-python')
>>> sha = repo.create_blob('Testing blob creation', 'utf-8')
>>> sha
>>> blob = repo.blob(sha)
>>> blob.content
>>> blob.decoded
u'Testing blob creation'
>>> blob.encoding
>>> from github3 import login
>>> g = login(username, password)
>>> repo = g.repository('sigmavirus24', '')
>>> tag = repo.tag('cdba84b4fede2c69cb1ee246b33f49f19475abfa')
>>> tag
<Tag [cdba84b4fede2c69cb1ee246b33f49f19475abfa]>
>>> tag.object.sha
>>> tag.object.type


Please see the section of the documentation pertaining to this.


If you want to run the unittests with authentication, simply run:

make alltests

From the root of the repository. If you would rather see what will take place on Travis, run:

make travis
# or
make tests

To test how much of the library is covered:

make coverage_auth
# equivalently
make coverage_all
# or without authentication
make coverage

Depending on which you run, you will see different percentages reported by coverage. As of this writing (2012-09-06), coverage_auth reports 85% covered.


Ian Cordasco (sigmavirus24)

Contact Options

  • You may contact (via email) the author directly with questions/suggestions
  • You may send your email to


0.1: 2012-09-xx

  • Support for the complete GitHub API (accomplished)
    • Now also includes the Statuses API
  • 85% coverage (unittests)

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for, version 0.1a7
Filename, size File type Python version Upload date Hashes
Filename, size (42.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page