ghapi
A python client for the GitHub API
Decision gist · record as of 2026-08-14
Yes. ghapi is a production-stable, actively maintained client with zero known vulnerabilities, low install friction, and permissive licensing. It is the canonical way to automate GitHub workflows in Python when you need comprehensive API coverage. Install it if you're building GitHub automation, CI/CD tooling, or repository management scripts. Be aware that v2 requires Python 3.10+ and is async-first; if you need sync-only code, use sync=True or pin ghapi<2.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later.
- v2 is async-first; for sync code, pass sync=True to GhApi() or use asyncio.run() in scripts.
- Installation is straightforward with low friction—only three runtime dependencies (fastcore, fastspec, tomli).
License · maintenance · safety
Apache-2.0 (permissive) — Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
last release 2026-08-13 (1 days) · last repo commit 2026-08-13 · 684 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 227,728,369 downloads/mo, #180 on PyPI
Alternatives
Verify before relying
pip install ghapi
from ghapi.all import GhApi
import asyncio
async def main():
api = GhApi()
repos = await api.repos.get()
asyncio.run(main())- Whether authentication (token/credentials) setup and rate-limit handling are documented clearly for new users
- Performance characteristics when making large numbers of concurrent API calls
What it is and what it does
ghapi is a Python client that wraps the entire GitHub REST API with 100% coverage, automatically kept in sync with GitHub's OpenAPI specification. Rather than maintaining hand-written endpoint definitions, ghapi dynamically generates its API surface from GitHub's spec, ensuring it always reflects the latest endpoints and parameters without manual updates.
As of v2 (July 2026), ghapi is async-first by default—every API call is awaited. This means you write `res = await api.repos.get()` in async contexts, or use `asyncio.run()` in scripts. For code that needs synchronous behavior, you can instantiate with `GhApi(sync=True)`. The package depends on fastcore, fastspec, and tomli, keeping its footprint small while providing a Pythonic interface to automate repository management, issue and pull-request workflows, releases, Actions, webhooks, and organizational administration.
Use it for
- Automate issue and pull-request workflows—create, list, comment on, or modify issues and PRs programmatically
- Manage releases and tags—create releases, upload assets, and manage git tags across repositories
- Set up and trigger GitHub Actions—configure workflows and manage action runs and deployments
- Administer users and organizations—manage team membership, permissions, and org-level settings
- Monitor and query repositories—list repos, check status, retrieve metadata, and search across GitHub
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
ghapi is a production-stable, actively maintained client with zero known vulnerabilities, low install friction, and permissive licensing. It is the canonical way to automate GitHub workflows in Python when you need comprehensive API coverage. Install it if you're building GitHub automation, CI/CD tooling, or repository management scripts. Be aware that v2 requires Python 3.10+ and is async-first; if you need sync-only code, use sync=True or pin ghapi<2.
Install
ghapi on PyPI
Before you install
Installation is straightforward with low friction—only three runtime dependencies (fastcore, fastspec, tomli). The package is actively maintained with a release just 1 day old, indicating rapid iteration and responsiveness to GitHub API changes.
Requires Python 3.10 or later. v2 is async-first; for sync code, pass sync=True to GhApi() or use asyncio.run() in scripts.
License in practice
Licensed under Apache-2.0 (permissive), allowing free use, modification, and distribution in both open-source and commercial projects with minimal restrictions.
Quickstart
pip install ghapi
from ghapi.all import GhApi
import asyncio
async def main():
api = GhApi()
repos = await api.repos.get()
asyncio.run(main())
Verify before relying
- Whether authentication (token/credentials) setup and rate-limit handling are documented clearly for new users
- Performance characteristics when making large numbers of concurrent API calls
Package facts
| License | Apache-2.0 permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesfastcorefastspectomli |
| Maintenance | Actively maintained 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 227,728,369 / month, #180 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/StableIntended Audience :: DevelopersNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: Only |
Evidence: ghapi-2.1.2-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 › “automate github workflows”
- ghapighapi provides a complete, always-current Python client for the…
- gidgethubGidgethub is an asynchronous GitHub API library that handles…
- github3.pyProvides a Python wrapper around the GitHub API (v3) to…
Give your agent the search over MCP, or paste the wish link into any chat.
Similar packages
A low-level HTTP client for Benchling's API, autogenerated from OpenAPI definitions and offering direct access to Benchling endpoints.
However, Benchling's own recommendation to use the higher-level SDK suggests this is a lower-level tool; start with the SDK unless you have a specific reason to work…
Gidgethub is an asynchronous GitHub API library that handles GitHub-specific protocol details without performing I/O itself, letting you choose your HTTP client.
Python SDK for managing Git repositories through Pierre's cloud storage service, with support for repository creation, file operations, branching, merging, and GitHub synchronization.
Provides Python functions to invoke GitHub Actions workflow commands (logging, output setting, state management, grouping) from within an action script.
A fully typed Python SDK for GitHub's REST and GraphQL APIs with support for both sync and async calls, built-in caching, pagination, and webhook validation.
A Python client for interacting with New Relic's API v2, providing a pythonic interface to query and manage New Relic resources.
See also pyimouapi · agithub · pulumi-github · git-remote-s3