Exploring the GitHub world
In order to get a better understanding on how to operate with the GitHub API, we will go through the following steps:
- Install the GitHub Python library.
- Access the API by using the token provided when we registered in the developer website.
- Retrieve some key facts on the Apache foundation that is hosting the spark repository.
Let's go through the process step-by-step:
- Install the Python PyGithub library. In order to install it, you need to
pip install PyGithubfrom the command line:
pip install PyGithub
- Programmatically create a client to instantiate the GitHub API:
from github import Github # Get your own access token ACCESS_TOKEN = 'Get_Your_Own_Access_Token' # We are focusing our attention to User = apache and Repo = spark ...