Member-only story

Learning Software Development

3 Easy Steps to Programmatically Access Github Using Python

Learn Basic Github Access Automation Using Python Through Github API v3

Elye - A One Eye Dev By His Grace

--

Photo by Roman Synkevych on Unsplash

If you find yourself regularly checking Pull Requests or Issues on GitHub manually and wish to streamline the process through automation, you’re in luck!

Below, I’ll share the basics of automating this task to help you kickstart your journey. Let’s dive in!

Assumption you already have Python3 installed on your machine.

1. Install PyGithub

Here, I’m using Python and Github provided Python Library, i.e. PyGithub, that uses Github API v3.

You can install it using

pip install PyGithub

Optionally, you can also clone it from PyGithub Repository.

2. Generate Github Access Token

Go to your Github Profile, and select the below

Settings → Developer Settings → Personal Access Token → Fine-grained Token → Generate New Token

Then set your token name, expiration and description.

--

--

No responses yet