Release v4.0.1.
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. As an example, let’s get information about a user:
from github3 import login gh = login('sigmavirus24', password='<password>') sigmavirus24 = gh.me() # <AuthenticatedUser [sigmavirus24:Ian Stapleton Cordasco]> print(sigmavirus24.name) # Ian Stapleton Cordasco print(sigmavirus24.login) # sigmavirus24 print(sigmavirus24.followers_count) # 4 for f in gh.followers(): print(str(f)) kennethreitz = gh.user('kennethreitz') # <User [kennethreitz:Kenneth Reitz]> print(kennethreitz.name) print(kennethreitz.login) print(kennethreitz.followers_count) followers = [str(f) for f in gh.followers_of('kennethreitz')]
There are several examples of different aspects of using github3.py
Installation User Guide API Reference Documentation Version History ContributingAll development happens on GitHub. Please remember to add yourself to the list of contributors in AUTHORS.rst, especially if you’re going to be working on the list below.
Contributor Friendly WorkIn 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.
Otherwise, feel free to example the list of issues where we would like help and feel free to take one.
Running the UnittestsThe tests are generally run using tox. Tox can be installed like so
We test against PyPy3 and the following versions of Python:
3.7
3.8
3.9
If you simply run tox
it will run tests against all of these versions of python and run flake8
against the codebase as well. If you want to run against one specific version, you can do
And if you want to run tests against a specific file, you can do
tox -e py39 -- tests/unit/test_github.py
To run the tests, tox
uses py.test
so you can pass any options or parameters to py.test
after specifying --
. For example, you can get more verbose output by doing
Twitter: @sigmavirus24
Private email: graffatcolmingov [at] gmail
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4