ghapi
A python client for the GitHub API
Install
ghapi on PyPI
pip
pip install ghapiuv
uv add ghapipoetry
poetry add ghapiPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — fastcore, fastspec, tomli |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: ghapi-2.1.2-py3-none-any.whl
Keywords: github, api
About ghapi
from the package's own PyPI description — quoted content, verbatim
ghapi
<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->
> ghapi v2 (July 2026) is now async by default. Every API call is now awaited: res = await api.repos.get(). Top-level await works directly in Jupyter and modern REPLs; in scripts, use asyncio.run. For sync code (which should be largely compatible with v1), use GhApi(sync=True). See the Sync usage section of the docs for details. To stay on the old version, pin ghapi<2.
ghapi provides 100% always-updated coverage of the entire GitHub API. Because we automatically convert the OpenAPI spec to a Pythonic API, ghapi is always up to date with the latest changes to GitHub APIs. Furthermore, because this is all built dynamically from a compact pre-parsed copy of the spec, the package stays small and is always up to date.
Using ghapi, you can automate nearly anything that...
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
ghapi provides complete, always-current coverage of the GitHub REST API through a dynamically generated Pythonic interface, letting you automate GitHub operations like managing issues, pull requests, releases, actions, and organizations.
Low friction: pure Python wheel with only three runtime dependencies (fastcore, fastspec, tomli). Active maintenance with a release on 2026-08-13 and 684 repository stars. Requires Python 3.10+.
Apache-2.0 is permissive, allowing commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes.
Usage
pip install ghapi
from ghapi.all import GhApi
import asyncio
async def main():
api = GhApi()
repos = await api.repos.list_for_user(username='fastai')
return repos
result = asyncio.run(main())
Python 3.10 or higher required. v2 is async-first; use GhApi(sync=True) for synchronous code or wrap async calls in asyncio.run() in scripts.
Verdict: ghapi is a well-maintained, low-friction client for the full GitHub REST API with no known vulnerabilities. Its async-first v2 design (released 2026-08-13) requires Python 3.10+ and familiarity with async/await, but the permissive Apache-2.0 license and minimal dependencies make it a solid choice for GitHub automation.
Needs verification
- Whether the three runtime dependencies (fastcore, fastspec, tomli) themselves have known vulnerabilities or maintenance concerns.
- Real-world performance characteristics and rate-limiting behavior when making bulk API calls.
- Compatibility and migration effort for code written against ghapi v1 moving to v2's async model.
Similar packages
permissive · top 1,000 on PyPI
mlflowpermissive · top 1,000 on PyPI
mlflow-skinnypermissive · top 1,000 on PyPI
ipywidgetspermissive · top 1,000 on PyPI
nbconvertpermissive · top 1,000 on PyPI
duckdbpermissive · top 1,000 on PyPI
uritemplatepermissive · top 1,000 on PyPI
jupyter-serverpermissive · top 1,000 on PyPI
jupyterlab-widgetspermissive · top 1,000 on PyPI
nbclientpermissive · top 1,000 on PyPI