# ghapi

> A python client for the GitHub API

- **URL**: https://www.freshcrate.ai/projects/ghapi
- **Author**: pypi
- **Category**: RAG & Memory
- **Latest version**: `1.0.13` (2026-04-21)
- **License**: Apache-2.0
- **Source**: https://github.com/fastai/ghapi
- **Homepage**: https://pypi.org/project/ghapi/
- **Language**: Jupyter Notebook
- **GitHub**: 674 stars, 70 forks
- **Registry**: pypi (`ghapi`)
- **Tags**: `api`, `github`, `pypi`

## Description

# ghapi


<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) provides 100%
always-updated coverage of the entire [GitHub
API](https://docs.github.com/rest). Because we automatically convert the
[OpenAPI
spec](https://docs.github.com/rest/overview/openapi-description) to a
Pythonic API, [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) is always
up to date with the latest changes to GitHub APIs. Furthermore, because
this is all done dynamically, the entire package is only 35kB in size!

Using [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), you can automate
nearly anything that you can do through the GitHub web interface or
through the `git` client, such as:

- Open, list, comment on, or modify
  [issues](https://guides.github.com/features/issues/) or [pull
  requests](https://docs.github.com/github/collaborating-with-issues-and-pull-requests/about-pull-requests)
- Create, list, or modify [git
  tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) or [GitHub
  releases](https://docs.github.com/github/administering-a-repository/managing-releases-in-a-repository),
  including uploading release assets
- Configure and run GitHub
  [Actions](https://github.com/features/actions) and
  [webhooks](https://docs.github.com/developers/webhooks-and-events/about-webhooks)
- Set up GitHub [users](https://docs.github.com/rest/reference/users)
  and
  [organizations](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-organizations)
- Manage your
  [deployments](https://docs.github.com/rest/guides/delivering-deployments)
- …and much, much more.

There are two ways to use
[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi): either through Python,
or from the command line. An overview of each is provided below.

## Installation

To install, run either `pip install ghapi` or
`conda install -c fastai ghapi`.

## How to use - Python

Throughout this documentation, you will see code inputs and outputs
shown in this format:

``` python
1+1
```

    2

We recommend reading the documentation on the [official
site](https://ghapi.fast.ai/), rather than on GitHub, since not all the
functionality described on this page is available through the GitHub
viewer.

All of the documentation is available directly as Jupyter Notebooks, for
instance the current page you’re reading is available as a notebook
[here](https://github.com/fastai/ghapi/blob/master/index.ipynb). To open
any page as an interactive notebook in Google Colab, click the *Colab*
badge at the top of the page.

To access the GitHub API, first create a
[`GhApi`](https://ghapi.fast.ai/core.html#ghapi) object:

``` python
from ghapi.all import GhApi
api = GhApi()
```

Every part of the API includes documentation directly in the `api`
object itself. For instance, here’s how to explore the groups of
functionality provided by the API by displaying the object:

``` python
api
```

- [actions](https://docs.github.com/rest/reference/actions)
- [activity](https://docs.github.com/rest/reference/activity)
- [api_insights](https://docs.github.com/rest/reference/api-insights)
- [apps](https://docs.github.com/rest/reference/apps)
- [billing](https://docs.github.com/rest/reference/billing)
- [checks](https://docs.github.com/rest/reference/checks)
- [classroom](https://docs.github.com/rest/reference/classroom)
- [code_scanning](https://docs.github.com/rest/reference/code-scanning)
- [code_security](https://docs.github.com/rest/reference/code-security)
- [codes_of_conduct](https://docs.github.com/rest/reference/codes-of-conduct)
- [codespaces](https://docs.github.com/rest/reference/codespaces)
- [copilot](https://docs.github.com/rest/reference/copilot)
- [dependabot](https://docs.github.com/rest/reference/dependabot)
- [dependency_graph](https://docs.github.com/rest/reference/dependency-graph)
- [emojis](https://docs.github.com/rest/reference/emojis)
- [gists](https://docs.github.com/rest/reference/gists)
- [git](https://docs.github.com/rest/reference/git)
- [gitignore](https://docs.github.com/rest/reference/gitignore)
- [hosted_compute](https://docs.github.com/rest/reference/hosted-compute)
- [interactions](https://docs.github.com/rest/reference/interactions)
- [issues](https://docs.github.com/rest/reference/issues)
- [licenses](https://docs.github.com/rest/reference/licenses)
- [markdown](https://docs.github.com/rest/reference/markdown)
- [meta](https://docs.github.com/rest/reference/meta)
- [migrations](https://docs.github.com/rest/reference/migrations)
- [oidc](https://docs.github.com/rest/reference/oidc)
- [orgs](https://docs.github.com/rest/reference/orgs)
- [packages](https://docs.github.com/rest/reference/packages)
- [private_registries](https://docs.github.com/rest/reference/private-registries)
- [projects](https://docs.github.com/rest/reference/projects)
- [pulls](https://docs.github.com/rest/reference/pulls)
- [rate_limit](https://docs.github.com/rest/reference/rate-limit)
- [reactions](https://doc

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `1.0.13` | 2026-04-21 | Low | Imported from PyPI (1.0.13) |
| `1.0.12` | 2026-02-27 | Low | ### New Features  - Use Content-Type to determine response parsing ([#205](https://github.com/AnswerDotAI/ghapi/pull/205)), thanks to [@erikgaas](https://github.com/erikgaas) |
| `1.0.11` | 2026-02-27 | Low | ### New Features  - Use Content-Type to determine response parsing ([#205](https://github.com/AnswerDotAI/ghapi/pull/205)), thanks to [@erikgaas](https://github.com/erikgaas) |
| `1.0.10` | 2026-01-20 | Low | ### New Features  - `GhApi.get_repo_contents` method ([#190](https://github.com/AnswerDotAI/ghapi/pull/190)), thanks to [@KeremTurgutlu](https://github.com/KeremTurgutlu) |
| `1.0.9` | 2026-01-15 | Low | ### New Features  - Update API ([#203](https://github.com/AnswerDotAI/ghapi/issues/203)) - Add GraphQL support ([#202](https://github.com/AnswerDotAI/ghapi/pull/202)), thanks to [@erikgaas](https://github.com/erikgaas) - Support for Python 3.13 and 3.14 ([#200](https://github.com/AnswerDotAI/ghapi/pull/200)), thanks to [@hugovk](https://github.com/hugovk) - Add py.typed file so that typecheckers recognize this library as typed ([#194](https://github.com/AnswerDotAI/ghapi/pull/194)), thanks to [@ |
| `1.0.8` | 2025-09-16 | Low | ### Bugs Squashed  - rm `GitPython` dep ([#199](https://github.com/AnswerDotAI/ghapi/pull/199)), thanks to [@KeremTurgutlu](https://github.com/KeremTurgutlu) |
| `1.0.7` | 2025-09-16 | Low | ### New Features  - Avoid quoting slash, thanks @soemiran ([#196](https://github.com/AnswerDotAI/ghapi/issues/196)) - Create gist with imgs ([#195](https://github.com/AnswerDotAI/ghapi/pull/195)), thanks to [@KeremTurgutlu](https://github.com/KeremTurgutlu) |
| `1.0.6` | 2024-08-31 | Low | ### New Features  - Automatically decode response based on path ([#183](https://github.com/fastai/ghapi/pull/183)), thanks to [@radam9](https://github.com/radam9) - Expose timeout [#174](https://github.com/fastai/ghapi/pull/174)), thanks to [@HarikrishnanBalagopal](https://github.com/HarikrishnanBalagopal)  ### Bugs Squashed  - Github now requires branch, author, and committer in file update calls ([#184](https://github.com/fastai/ghapi/issues/184)) - Remove the check which removes `None` values |
| `1.0.3` | 2022-09-13 | Low | ### New Features  - add `authenticate` arg which allows unauthenticated `GhApi` clients even if `GITHUB_TOKEN` is set ([#150](https://github.com/fastai/ghapi/pull/150)), thanks to [@seeM](https://github.com/seeM) |
| `1.0.1` | 2022-08-21 | Low | ### New Features  - warn if no GitHub token found ([#145](https://github.com/fastai/ghapi/issues/145)) - set `GITHUB_DEBUG=1` to print requests sent to GitHub |

## Citation

- HTML: https://www.freshcrate.ai/projects/ghapi
- Markdown: https://www.freshcrate.ai/projects/ghapi.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/ghapi/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
