- Notifications
You must be signed in to change notification settings - Fork3
Python library for interfacing with the GitHub APIv3
License
github3py/github3py
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
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 willlikely be some changes which change behavior in the near future.
Assuming you have git 1.7.x (although I'm not entirely certain what versionit was introduced in) you can performgit clone --recursivegit://github.com/sigmavirus24/github3.py.git github3.py
to clone thisand the submodule at the same time. Otherwise you have to do:
$ git clone git://github.com/sigmavirus24/github3.py.git$ cd github3.py$ git submodule init$ git submodule update
- requests by Kenneth Reitz
Modified BSDlicense
See thedocs for more detailed examples.
>>> from github3 import login>>> gh = login(username, password)>>> issue = gh.issue('sigmavirus24', 'Todo.txt-python', 17)>>> issue.html_urlu'https://github.com/sigmavirus24/Todo.txt-python/issues/17'>>> issue.stateu'open'>>> 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].eventu'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')>>> shau'57fad9a39b27e5eb4700f66673ce860b65b93ab8'>>> blob = repo.blob(sha)>>> blob.contentu'VGVzdGluZyBibG9iIGNyZWF0aW9u\n'>>> blob.decodedu'Testing blob creation'>>> blob.encodingu'base64'
>>> from github3 import login>>> g = login(username, password)>>> repo = g.repository('sigmavirus24', 'github3.py')>>> tag = repo.tag('cdba84b4fede2c69cb1ee246b33f49f19475abfa')>>> tag<Tag [cdba84b4fede2c69cb1ee246b33f49f19475abfa]>>>> tag.object.shau'24ea44d302c6394a0372dcde8fd8aed899c0034b'>>> tag.object.typeu'commit'
Please see thesection of the documentation pertaining to this.
If you want to run the unittests with authentication, simply run:
./unittests.py
From the root of the repository. If you would rather see what will take placeon Travis, run:
CI=true ./unittests.py
Ian Cordasco (sigmavirus24)
- You may contact (via email) the author directly with questions/suggestions
- You may send your email togithub3.py@librelist.com
[1] | Creating a download via Amazon S3 seems to always return an invalidmultipart/form-data POST request. |
About
Python library for interfacing with the GitHub APIv3
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Languages
- Python100.0%