GitHub API (PyGithub)

2.8.1 · active · verified Tue Mar 17

Community-maintained Python library for GitHub REST API v3. Current version is 2.8.1 (Feb 2026). Note: package name on PyPI is 'PyGithub' (capital P and G) but imports as 'github' (lowercase). Not an official GitHub SDK.

Warnings

Install

Imports

Quickstart

Minimal authenticated GitHub API call using PyGithub 2.x auth pattern.

from github import Github, Auth

auth = Auth.Token("your_token")
g = Github(auth=auth)

repo = g.get_repo("owner/repo")
for issue in repo.get_issues(state='open'):
    print(issue.title)

g.close()

view raw JSON →