github2 is an experimental Python library implementing all of the features available in version 2 of the Github API.
Note This software is not finished. And is likely to change in the near future.
You should read the developer documentation for the Github API first.
Installation:
You can install python-github2 either via the Python Package Index (PyPI) or from source.
To install using pip,:
pip install python-github2
To install using easy_install,:
easy_install python-github2
If you have downloaded a source tarball you can install it by doing the following,:
python setup.py build
python setup.py install # as root
Creating a request
>>> from github2.client import Github
>>> github = Github(username="ask", api_token=".......")
Users
Searching
>>> results = github.users.search("foo")
Getting User Information
>>> user = github.users.show("ask")
>>> user.name
"Ask Solem"
Getting User Network
>>> github.users.followers("ask")
['greut', 'howiworkdaily', 'emanchado', 'webiest']
>>> github.users.following("ask")
['sverrejoh',
'greut',
'jezdez',
'bradleywright',
'ericflo',
'howiworkdaily',
'emanchado',
'traviscline',
'russell']
Product's homepage
Requirements:
· Python
What's New in This Release: [ read full changelog ]
· Support for GitHub:Enterprise using the github_url parameter when creating a client
· Adds SSH key management
· Support reading SSL certificates from the location set in CURL_CA_BUNDLE, if all else fails