How it works...

The token gives you access to GitHub but only the parts that were specified when you created the token. Behind the scenes, the methods of PyGitHub are implemented as HTTP calls to GitHub's API.

For example, the call get_repos is an HTTP GET of /user/repos. The HTTP request will return the result as JSON. PyGitHub is parsing the JSON result and populating Python objects so the result is more natural for a Python developer.

Python is not the only programming language. You can find libraries for almost any known language.

Of course, you can go beyond the simple scripts and develop a full-blown GitHub client. We will leave that as an exercise for you.

Get Git Version Control Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.