PyGithub
Use the full Github API v3
Decision gist · record as of 2026-08-14
Yes. PyGithub is a mature, actively maintained library with low install friction, no known vulnerabilities, and broad Python version support. It is the standard choice for GitHub API automation in Python. The copyleft license is straightforward for most use cases. Install it if you need to interact with GitHub programmatically.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later and a valid GitHub authentication token (personal access token or similar).
- Low install friction with a pure-Python wheel distribution.
- Actively maintained with a recent release; the repository shows ongoing activity and the project is marked Production/Stable.
License · maintenance · safety
copyleft license (copyleft) — Licensed under LGPL (copyleft). You may use and modify the library freely, but derivative works must remain under the same license; proprietary applications can link to it as a library without adopting the license themselves.
last release 2026-04-14 (122 days) · last repo commit 2026-08-13 · 7,760 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 81,887,980 downloads/mo, #410 on PyPI
Alternatives
Verify before relying
pip install PyGithub
from PyGithub import Github, Auth
auth = Auth.Token("your_access_token")
g = Github(auth=auth)
for repo in g.get_user().get_repos():
print(repo.name)
g.close()- Whether the library supports GitHub Enterprise Server versions beyond the custom hostname pattern shown in the demo.
- Rate-limiting behavior and how the library handles GitHub API quota exhaustion.
- Performance characteristics when working with large numbers of repositories or organizations.
What it is and what it does
PyGithub is a Python wrapper around the GitHub REST API that abstracts away HTTP details and presents GitHub resources—repositories, users, organizations, pull requests, issues—as Python objects. It handles authentication via tokens and manages underlying HTTP requests through its runtime dependencies (requests, urllib3, pynacl for cryptographic operations, pyjwt for token handling, and typing-extensions for type hints).
The library is designed for automation and integration tasks: scripting repository management, bulk operations on organizations, reading repository metadata, and building tools that interact with GitHub programmatically. It supports both public GitHub and GitHub Enterprise with custom hostnames. The project has been maintained since its early releases, is marked Production/Stable, and receives active updates.
Use it for
- Automate repository creation, configuration, and maintenance across multiple GitHub organizations.
- Build CI/CD pipeline integrations that read repository metadata or manage pull requests and issues.
- Script bulk operations such as migrating repositories, updating team permissions, or archiving old projects.
- Monitor GitHub resources programmatically—check repository health, track organization members, or audit access.
- Integrate GitHub data into reporting or analytics tools that need current repository and organization state.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyGithub is a mature, actively maintained library with low install friction, no known vulnerabilities, and broad Python version support. It is the standard choice for GitHub API automation in Python. The copyleft license is straightforward for most use cases. Install it if you need to interact with GitHub programmatically.
Install
pygithub on PyPI
Before you install
Low install friction with a pure-Python wheel distribution. Actively maintained with a recent release; the repository shows ongoing activity and the project is marked Production/Stable.
Requires Python 3.9 or later and a valid GitHub authentication token (personal access token or similar).
License in practice
Licensed under LGPL (copyleft). You may use and modify the library freely, but derivative works must remain under the same license; proprietary applications can link to it as a library without adopting the license themselves.
Quickstart
pip install PyGithub
from PyGithub import Github, Auth
auth = Auth.Token("your_access_token")
g = Github(auth=auth)
for repo in g.get_user().get_repos():
print(repo.name)
g.close()
Verify before relying
- Whether the library supports GitHub Enterprise Server versions beyond the custom hostname pattern shown in the demo.
- Rate-limiting behavior and how the library handles GitHub API quota exhaustion.
- Performance characteristics when working with large numbers of repositories or organizations.
Package facts
| License | copyleft license copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 5 packagespynaclrequestspyjwttyping-extensionsurllib3 |
| Maintenance | Actively maintained 122 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 81,887,980 / month, #410 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentIntended Audience :: DevelopersLicense :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)Operating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Topic :: Software Development |
Evidence: pygithub-2.9.1-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “manage github repositories programmatically”
- PyGithubPyGithub provides Python access to the GitHub REST API, letting you…
- github3.pyProvides a Python wrapper around the GitHub API (v3) to…
- aws-cdk.aws-codestar-alphaProvides AWS CDK constructs for AWS CodeStar resources, enabling…
Give your agent the search over MCP, or paste the wish link into any chat.
More Software Development packages
Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.
Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.
Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.
Install it if you are building CLIs in Python.
Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.
See also apache-airflow-providers-github · github3.py · auth0-python · propelauth-py · PyArtifactory · azure-devops · allianceauth · uplink · stackit-resourcemanager · pulumi-github