Python wrapper for the GitHub API (http://developer.github.com/v3)
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 github3.py
- requests by Kenneth Reitz
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 u'https://github.com/sigmavirus24/Todo.txt-python/issues/17' >>> issue.state u'open' >>> events = issue.list_events() >>> events [<Issue Event [#17 - subscribed - sigmavirus24]>, <Issue Event [#17 - assigned - sigmavirus24]>, <Issue Event [#17 - referenced - sigmavirus24]>] >>> events.actor <User [sigmavirus24:None]> >>> events.issue <Issue [sigmavirus24/Todo.txt-python #17]> >>> events.closed_at >>> events.event u'subscribed'
>>> 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 u'57fad9a39b27e5eb4700f66673ce860b65b93ab8' >>> blob = repo.blob(sha) >>> blob.content u'VGVzdGluZyBibG9iIGNyZWF0aW9u\n' >>> blob.decoded u'Testing blob creation' >>> blob.encoding u'base64'
>>> from github3 import login >>> g = login(username, password) >>> repo = g.repository('sigmavirus24', 'github3.py') >>> tag = repo.tag('cdba84b4fede2c69cb1ee246b33f49f19475abfa') >>> tag <Tag [cdba84b4fede2c69cb1ee246b33f49f19475abfa]> >>> tag.object.sha u'24ea44d302c6394a0372dcde8fd8aed899c0034b' >>> tag.object.type u'commit'
Please see the section of the documentation pertaining to this.
If you want to run the unittests with authentication, simply run:
From the root of the repository. If you would rather see what will take place on Travis, run:
- You may contact (via email) the author directly with questions/suggestions
- You may send your email to email@example.com
- Support for the complete GitHub API (accomplished)
- Partial coverage (unittests)
Release history Release notifications
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size github3.py-0.1a6.tar.gz (39.9 kB)||File type Source||Python version None||Upload date||Hashes View hashes|