whatisgithub

What is pygithub?

rohitpaulk/pygithub — explained in plain English

Analysis updated 2026-07-18 · repo last pushed 2018-02-24

PythonAudience · developerComplexity · 2/5DormantSetup · easy

In one sentence

A Python library that lets you control GitHub from code, create repos, manage issues and pull requests, and automate GitHub tasks instead of clicking through the website.

Mindmap

mindmap
  root((repo))
    What it does
      Wraps GitHub API
      Manages repos and issues
      Automates GitHub tasks
    Tech stack
      Python
      GitHub API v3
    Use cases
      Batch manage issues
      CI pipeline automation
      Bulk create repositories
    Audience
      Developers
      DevOps engineers
    Setup
      pip install
      Auth with GitHub token
      Call library methods

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Write a script to automatically manage issues across multiple repositories.

USE CASE 2

Update repository settings or post status updates from a CI/CD pipeline.

USE CASE 3

Batch-create repositories and add collaborators for new team projects.

USE CASE 4

Build a GitHub analytics tool on top of the library's API coverage.

What is it built with?

PythonGitHub API

How does it compare?

rohitpaulk/pygithub0xallam/my-recipe0xhassaan/nn-from-scratch
Stars0
LanguagePythonPythonPython
Last pushed2018-02-242022-11-22
MaintenanceDormantDormant
Setup difficultyeasymoderatemoderate
Complexity2/52/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 30min

Missing coverage for some notification, release-asset, and content endpoints, maintenance status should be checked.

So what is it?

PyGithub is a Python library that lets you control GitHub from code. Instead of clicking around GitHub's web interface, you can write Python scripts to create repositories, manage issues, handle pull requests, update user profiles, organize teams, and more. It's useful for anyone who wants to automate GitHub tasks or build tools that interact with GitHub programmatically. The library works by translating your Python commands into requests to GitHub's official API, the same underlying system that powers the GitHub website itself. You write simple Python code, and the library handles all the technical details of communicating with GitHub's servers. For example, you could write a script that automatically creates a new repository, adds collaborators, and sets up initial files, all without touching the GitHub interface. People use this for many practical reasons. A project maintainer might write a script to automatically manage issues across multiple repositories. A CI/CD pipeline could use it to update repository settings or post status updates. A team lead could batch-create repositories for new projects. Someone building a GitHub analytics tool would use this library as the foundation. Basically, if you're doing repetitive GitHub work or want to integrate GitHub into a larger automation, this library makes it possible from Python. The library covers most of the GitHub API v3, though not every single endpoint, the README notes a few gaps around notifications, release assets, and content management endpoints. All the implemented features are tested directly against GitHub's actual servers, so you know they work reliably. The project was originally maintained by jacquev6 but is looking for active maintainers as of 2015, so maintenance status should be checked before relying on it for critical work.

Copy-paste prompts

Prompt 1
Show me how to authenticate and list my repositories using PyGithub.
Prompt 2
Help me write a Python script with PyGithub that automatically labels new issues.
Prompt 3
Walk me through creating a repository and adding collaborators with PyGithub.
Prompt 4
Explain which GitHub API v3 endpoints PyGithub doesn't cover yet.

Frequently asked questions

What is pygithub?

A Python library that lets you control GitHub from code, create repos, manage issues and pull requests, and automate GitHub tasks instead of clicking through the website.

What language is pygithub written in?

Mainly Python. The stack also includes Python, GitHub API.

Is pygithub actively maintained?

Dormant — no commits in 2+ years (last push 2018-02-24).

How hard is pygithub to set up?

Setup difficulty is rated easy, with roughly 30min to a first successful run.

Who is pygithub for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.