O'Reilly logo

Spark for Python Developers by Amit Nandi

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required