Release v|version|.
github3.py is wrapper for the GitHub API written in python. The design of github3.py is centered around having a logical organization of the methods needed to interact with the API. Let me demonstrate this with a code example.
Let's get information about a user:
from github3 import login gh = login('sigmavirus24', password='<password>') sigmavirus24 = gh.user() # <User [sigmavirus24:Ian Cordasco]> print(sigmavirus24.name) # Ian Cordasco print(sigmavirus24.login) # sigmavirus24 print(sigmavirus24.followers) # 4 for f in gh.iter_followers(): print(str(f)) kennethreitz = gh.user('kennethreitz') # <User [kennethreitz:Kenneth Reitz]> print(kennethreitz.name) print(kennethreitz.login) print(kennethreitz.followers) followers = [str(f) for f in gh.iter_followers('kennethreitz')]
.. toctree:: :maxdepth: 2 examples/oauth examples/gist examples/git examples/github examples/issue examples/iterators.rst examples/logging examples/octocat
.. toctree:: :maxdepth: 1 api auths events gists git github issues legacy models orgs pulls repos structs users
For objects you're not likely to see in practice. This is useful if you ever feel the need to contribute to the project.
.. toctree:: :maxdepth: 1 models decorators
$ pip install github3.py
# OR:
$ git clone git://github.com/sigmavirus24/github3.py.git github3.py
$ cd github3.py
$ python setup.py install
- requests by Kenneth Reitz
I'm maintaining two public copies of the project. The first can be found on GitHub and the second on BitBucket. I would prefer pull requests to take place on GitHub, but feel free to do them via BitBucket. Please make sure to add yourself to the list of contributors in AUTHORS.rst, especially if you're going to be working on the list below.
In order of importance:
Documentation
I know I'm not the best at writing documentation so if you want to clarify or correct something, please do so.
Examples
Have a clever example that takes advantage of github3.py? Feel free to share it.
mkdir -p /path/to/virtualenv/github3.py cd /path/to/virtualenv/github3.py virtualenv . cd /path/to/github3.py_repo/requirements.txt pip install -r requirements.txt # Or you could run make test-deps make tests
.. toctree:: testing
- Twitter: @sigmavirus24
- Private email: graffatcolmingov [at] gmail
- Mailing list: github3.py [at] librelist.com
awesome github v3 api wrapper in python github.com/sigmavirus24/g#
— Mahdi Yusuf (@myusuf3) October 17, 2012
@sigmavirus24 github3 is awesome! Made my life much easier tonight, which is a very good thing.
— Mike Grouchy (@mgrouchy) March 26, 2013
@sigmavirus24 ¿There are so many Python client libraries for GitHub API, I tried all of them, and my conclusion is: github3.py is the best.¿
— Hong Minhee (@hongminhee) March 23, 2013
@sigmavirus24 I cannot wait to use your github package for #zci. Do you have it packaged for debian by any chance?
— Zygmunt Krynicki (@zygoon) March 26, 2013
Developing against github3.py's API is a joy, kudos to @sigmavirus24
— Alejandro Gómez (@dialelo) March 27, 2013