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:

  1. Install the GitHub Python library.
  2. Access the API by using the token provided when we registered in the developer website.
  3. Retrieve some key facts on the Apache foundation that is hosting the spark repository.

Let's go through the process step-by-step:

  1. Install the Python PyGithub library. In order to install it, you need to pip install PyGithub from the command line:
    pip install PyGithub
  2. 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 ...

Get Spark for Python Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.