Let's look at using the PyGitHub package, http://pygithub.readthedocs.io/en/latest/, to interact with GitHub repositories. The package is a wrapper around GitHub APIv3, https://developer.github.com/v3/:
$ sudo pip install pygithub$ sudo pip3 install pygithub
Let's use the Python shell to print out the user's current repository:
$ python3>>> from github import Github>>> g = Github("ericchou1", "<password>")>>> for repo in g.get_user().get_repos():... print(repo.name)...ansible...-Hands-on-Network-Programming-with-PythonMastering-Python-NetworkingMastering-Python-Networking-Second-Edition>>>
For more programmatic access, we can also create more granular control using an access token. Github allows a token to be associated with the ...