ghapi


Nameghapi JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/fastai/ghapi
SummaryA python client for the GitHub API
upload_time2024-03-30 18:33:20
maintainerNone
docs_urlNone
authorJeremy Howard
requires_python>=3.7
licenseApache Software License 2.0
keywords github api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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)
- [apps](https://docs.github.com/rest/reference/apps)
- [billing](https://docs.github.com/rest/reference/billing)
- [checks](https://docs.github.com/rest/reference/checks)
- [code_scanning](https://docs.github.com/rest/reference/code-scanning)
- [codes_of_conduct](https://docs.github.com/rest/reference/codes-of-conduct)
- [emojis](https://docs.github.com/rest/reference/emojis)
- [enterprise_admin](https://docs.github.com/rest/reference/enterprise-admin)
- [gists](https://docs.github.com/rest/reference/gists)
- [git](https://docs.github.com/rest/reference/git)
- [gitignore](https://docs.github.com/rest/reference/gitignore)
- [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)
- [oauth_authorizations](https://docs.github.com/rest/reference/oauth-authorizations)
- [orgs](https://docs.github.com/rest/reference/orgs)
- [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://docs.github.com/rest/reference/reactions)
- [repos](https://docs.github.com/rest/reference/repos)
- [scim](https://docs.github.com/rest/reference/scim)
- [search](https://docs.github.com/rest/reference/search)
- [secret_scanning](https://docs.github.com/rest/reference/secret-scanning)
- [teams](https://docs.github.com/rest/reference/teams)
- [users](https://docs.github.com/rest/reference/users)

Then we can explore the endpoints provided by the API in each group,
e.g. for the `git` group:

``` python
api.git
```

- [git.create_blob](https://docs.github.com/rest/reference/git#create-a-blob)(owner,
  repo, content, encoding): *Create a blob*
- [git.get_blob](https://docs.github.com/rest/reference/git#get-a-blob)(owner,
  repo, file_sha): *Get a blob*
- [git.create_commit](https://docs.github.com/rest/reference/git#create-a-commit)(owner,
  repo, message, tree, parents, author, committer, signature): *Create a
  commit*
- [git.get_commit](https://docs.github.com/rest/reference/git#get-a-commit)(owner,
  repo, commit_sha): *Get a commit*
- [git.list_matching_refs](https://docs.github.com/rest/reference/git#list-matching-references)(owner,
  repo, ref, per_page, page): *List matching references*
- [git.get_ref](https://docs.github.com/rest/reference/git#get-a-reference)(owner,
  repo, ref): *Get a reference*
- [git.create_ref](https://docs.github.com/rest/reference/git#create-a-reference)(owner,
  repo, ref, sha, key): *Create a reference*
- [git.update_ref](https://docs.github.com/rest/reference/git#update-a-reference)(owner,
  repo, ref, sha, force): *Update a reference*
- [git.delete_ref](https://docs.github.com/rest/reference/git#delete-a-reference)(owner,
  repo, ref): *Delete a reference*
- [git.create_tag](https://docs.github.com/rest/reference/git#create-a-tag-object)(owner,
  repo, tag, message, object, type, tagger): *Create a tag object*
- [git.get_tag](https://docs.github.com/rest/reference/git#get-a-tag)(owner,
  repo, tag_sha): *Get a tag*
- [git.create_tree](https://docs.github.com/rest/reference/git#create-a-tree)(owner,
  repo, tree, base_tree): *Create a tree*
- [git.get_tree](https://docs.github.com/rest/reference/git#get-a-tree)(owner,
  repo, tree_sha, recursive): *Get a tree*

Here’s how to learn about an endpoint you want to use, e.g.:

``` python
api.git.get_ref
```

[git.get_ref](https://docs.github.com/rest/reference/git#get-a-reference)(owner,
repo, ref): *Get a reference*

In Jupyter Notebook full tab completion, parameter lists, etc are
provided for all endpoints. Endpoints are called as standard Python
methods:

``` python
api.git.get_ref(owner='fastai', repo='fastcore', ref='heads/master')
```

- ref: refs/heads/master
- node_id: MDM6UmVmMjI1NDYwNTk5OnJlZnMvaGVhZHMvbWFzdGVy
- url:
  https://api.github.com/repos/fastai/fastcore/git/refs/heads/master
- object:
  - sha: 0e3084ed009baa51db38a640ae7c23d638af2756
  - type: commit
  - url:
    https://api.github.com/repos/fastai/fastcore/git/commits/0e3084ed009baa51db38a640ae7c23d638af2756

To use [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) to access
authenticated operations (other than when running through GitHub
Actions), you will need a GitHub [personal access
token](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token),
which is a secret code used to access your account. If you don’t have
one, [click here](https://github.com/settings/tokens/new) to create one.
You’ll be asked to enter a name – choose anything you like, for instance
“*ghapi*”. You’ll also be asked to choose “scopes”; this limits what
you’ll be able to do with the API using this token. If you’re not sure,
click “*repo*” “*gist*”, “*notifications*”, and “*workflow*”. Then click
“Generate Token” at the bottom of the screen, and copy the token (the
long string of letters and numbers shown). You can easily do that by
clicking the little clipboard icon next to the token.

Rather than pasting that token into every script, it’s easiest to save
it as an environment variable. If you save it as `$GITHUB_TOKEN` then it
will be most convenient, so add this to the end of your `.bashrc` or
`.zshrc` file:

    export GITHUB_TOKEN=xxx

…replacing the `xxx` with the token you just copied. (Don’t forget to
`source` that file after you change it.), pass a \[GitHub token\].

As well as your `token`, you can also pass any parameters you want
auto-inserted into relevant methods, such as `owner` and `repo`:

``` python
api = GhApi(owner='fastai', repo='fastcore', token=github_token)
```

We can now repeat the previous method, but only need to pass `ref`:

``` python
api.git.get_ref('heads/master')
```

- ref: refs/heads/master
- node_id: MDM6UmVmMjI1NDYwNTk5OnJlZnMvaGVhZHMvbWFzdGVy
- url:
  https://api.github.com/repos/fastai/fastcore/git/refs/heads/master
- object:
  - sha: 0e3084ed009baa51db38a640ae7c23d638af2756
  - type: commit
  - url:
    https://api.github.com/repos/fastai/fastcore/git/commits/0e3084ed009baa51db38a640ae7c23d638af2756

Now that we’ve provided our token, we can use authenticated endpoints
such as creating an issue:

``` python
issue = api.issues.create("Remember to check out GhApi!")
```

Since we’ve now checked out GhApi, let’s close this issue. 😎

``` python
api.issues.update(issue.number, state='closed')
```

## How to use - command line

You can use [`GhApi`](https://ghapi.fast.ai/core.html#ghapi) via the
command line, and can access nearly everything in the [GitHub
API](https://docs.github.com/rest). We provide an overview here of one
of the command line programs,
[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) – see the full CLI docs
page for details on all the programs available.

We strongly recommend enabling tab completion for
[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), which you can do by
placing the following command at the end of your `~/.bashrc` or
`~/.zshrc` file:

``` bash
eval "$(completion-ghapi --install)"
```

To get started with the [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi)
command, first find the name of the operation you wish to perform, for
instance by searching the [full API
reference](https://ghapi.fast.ai/fullapi.html).

To use [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), pass the method
name (exactly the same as you’d use in the Python API) as the first
parameter, followed by any positional parameters required, and then
keyword arguments with “`--`” before each parameter name.

For instance, [git.get_ref](https://ghapi.fast.ai/fullapi.html#git)
takes three parameters: `owner`, `repo`, and `ref`. If we wish to pass
the first two as positional parameters, and the last as a named
argument, then we’d call:

``` bash
ghapi git.get_ref fastai ghapi-test --ref heads/master
```

If you have enabled tab completion, then after you’ve typed `ghapi g`
try pressing <kbd>Tab</kbd>, and you’ll see all the operation groups
available in the GitHub API that start with `g`. If you keep typing,
e.g. `ghapi git.`, and hit <kbd>Tab</kbd> again, you’ll now see all the
operations available in the `git` group, i.e:

    git.create_blob git.create_commit git.create_ref git.create_tag git.create_tree git.delete_ref git.get_blob git.get_commit git.get_ref git.get_tag git.get_tree git.list_matching_refs git.name git.update_ref git.verbs

If you pass just `--help` after the operation name, you’ll see a full
list of all parameters accepted, and a link to the official GitHub
documentation.

``` bash
ghapi git.get_ref --help
>>> git.get_ref(owner, repo, ref)
>>> https://docs.github.com/rest/reference/git#get-a-reference
```

In addition to `--help` and the GitHub operation parameters, you can
also pass the following:

- `--headers`: A list of extra headers to pass, JSON-encoded
- `--token`: A GitHub authentation token
- `--debug`: Print requests before sending them

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/fastai/ghapi",
    "name": "ghapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": "github api",
    "author": "Jeremy Howard",
    "author_email": "info@fast.ai",
    "download_url": "https://files.pythonhosted.org/packages/b6/48/60a50ff7b639237ad8c6842b9c0489daabc68aea7fb1c553b34134dae288/ghapi-1.0.5.tar.gz",
    "platform": null,
    "description": "ghapi\n================\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) provides 100%\nalways-updated coverage of the entire [GitHub\nAPI](https://docs.github.com/rest). Because we automatically convert the\n[OpenAPI\nspec](https://docs.github.com/rest/overview/openapi-description) to a\nPythonic API, [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) is always\nup to date with the latest changes to GitHub APIs. Furthermore, because\nthis is all done dynamically, the entire package is only 35kB in size!\n\nUsing [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), you can automate\nnearly anything that you can do through the GitHub web interface or\nthrough the `git` client, such as:\n\n- Open, list, comment on, or modify\n  [issues](https://guides.github.com/features/issues/) or [pull\n  requests](https://docs.github.com/github/collaborating-with-issues-and-pull-requests/about-pull-requests)\n- Create, list, or modify [git\n  tags](https://git-scm.com/book/en/v2/Git-Basics-Tagging) or [GitHub\n  releases](https://docs.github.com/github/administering-a-repository/managing-releases-in-a-repository),\n  including uploading release assets\n- Configure and run GitHub\n  [Actions](https://github.com/features/actions) and\n  [webhooks](https://docs.github.com/developers/webhooks-and-events/about-webhooks)\n- Set up GitHub [users](https://docs.github.com/rest/reference/users)\n  and\n  [organizations](https://docs.github.com/github/setting-up-and-managing-organizations-and-teams/about-organizations)\n- Manage your\n  [deployments](https://docs.github.com/rest/guides/delivering-deployments)\n- \u2026and much, much more.\n\nThere are two ways to use\n[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi): either through Python,\nor from the command line. An overview of each is provided below.\n\n## Installation\n\nTo install, run either `pip install ghapi` or\n`conda install -c fastai ghapi`.\n\n## How to use - Python\n\nThroughout this documentation, you will see code inputs and outputs\nshown in this format:\n\n``` python\n1+1\n```\n\n    2\n\nWe recommend reading the documentation on the [official\nsite](https://ghapi.fast.ai/), rather than on GitHub, since not all the\nfunctionality described on this page is available through the GitHub\nviewer.\n\nAll of the documentation is available directly as Jupyter Notebooks, for\ninstance the current page you\u2019re reading is available as a notebook\n[here](https://github.com/fastai/ghapi/blob/master/index.ipynb). To open\nany page as an interactive notebook in Google Colab, click the *Colab*\nbadge at the top of the page.\n\nTo access the GitHub API, first create a\n[`GhApi`](https://ghapi.fast.ai/core.html#ghapi) object:\n\n``` python\nfrom ghapi.all import GhApi\napi = GhApi()\n```\n\nEvery part of the API includes documentation directly in the `api`\nobject itself. For instance, here\u2019s how to explore the groups of\nfunctionality provided by the API by displaying the object:\n\n``` python\napi\n```\n\n- [actions](https://docs.github.com/rest/reference/actions)\n- [activity](https://docs.github.com/rest/reference/activity)\n- [apps](https://docs.github.com/rest/reference/apps)\n- [billing](https://docs.github.com/rest/reference/billing)\n- [checks](https://docs.github.com/rest/reference/checks)\n- [code_scanning](https://docs.github.com/rest/reference/code-scanning)\n- [codes_of_conduct](https://docs.github.com/rest/reference/codes-of-conduct)\n- [emojis](https://docs.github.com/rest/reference/emojis)\n- [enterprise_admin](https://docs.github.com/rest/reference/enterprise-admin)\n- [gists](https://docs.github.com/rest/reference/gists)\n- [git](https://docs.github.com/rest/reference/git)\n- [gitignore](https://docs.github.com/rest/reference/gitignore)\n- [interactions](https://docs.github.com/rest/reference/interactions)\n- [issues](https://docs.github.com/rest/reference/issues)\n- [licenses](https://docs.github.com/rest/reference/licenses)\n- [markdown](https://docs.github.com/rest/reference/markdown)\n- [meta](https://docs.github.com/rest/reference/meta)\n- [migrations](https://docs.github.com/rest/reference/migrations)\n- [oauth_authorizations](https://docs.github.com/rest/reference/oauth-authorizations)\n- [orgs](https://docs.github.com/rest/reference/orgs)\n- [projects](https://docs.github.com/rest/reference/projects)\n- [pulls](https://docs.github.com/rest/reference/pulls)\n- [rate_limit](https://docs.github.com/rest/reference/rate-limit)\n- [reactions](https://docs.github.com/rest/reference/reactions)\n- [repos](https://docs.github.com/rest/reference/repos)\n- [scim](https://docs.github.com/rest/reference/scim)\n- [search](https://docs.github.com/rest/reference/search)\n- [secret_scanning](https://docs.github.com/rest/reference/secret-scanning)\n- [teams](https://docs.github.com/rest/reference/teams)\n- [users](https://docs.github.com/rest/reference/users)\n\nThen we can explore the endpoints provided by the API in each group,\ne.g.\u00a0for the `git` group:\n\n``` python\napi.git\n```\n\n- [git.create_blob](https://docs.github.com/rest/reference/git#create-a-blob)(owner,\n  repo, content, encoding): *Create a blob*\n- [git.get_blob](https://docs.github.com/rest/reference/git#get-a-blob)(owner,\n  repo, file_sha): *Get a blob*\n- [git.create_commit](https://docs.github.com/rest/reference/git#create-a-commit)(owner,\n  repo, message, tree, parents, author, committer, signature): *Create a\n  commit*\n- [git.get_commit](https://docs.github.com/rest/reference/git#get-a-commit)(owner,\n  repo, commit_sha): *Get a commit*\n- [git.list_matching_refs](https://docs.github.com/rest/reference/git#list-matching-references)(owner,\n  repo, ref, per_page, page): *List matching references*\n- [git.get_ref](https://docs.github.com/rest/reference/git#get-a-reference)(owner,\n  repo, ref): *Get a reference*\n- [git.create_ref](https://docs.github.com/rest/reference/git#create-a-reference)(owner,\n  repo, ref, sha, key): *Create a reference*\n- [git.update_ref](https://docs.github.com/rest/reference/git#update-a-reference)(owner,\n  repo, ref, sha, force): *Update a reference*\n- [git.delete_ref](https://docs.github.com/rest/reference/git#delete-a-reference)(owner,\n  repo, ref): *Delete a reference*\n- [git.create_tag](https://docs.github.com/rest/reference/git#create-a-tag-object)(owner,\n  repo, tag, message, object, type, tagger): *Create a tag object*\n- [git.get_tag](https://docs.github.com/rest/reference/git#get-a-tag)(owner,\n  repo, tag_sha): *Get a tag*\n- [git.create_tree](https://docs.github.com/rest/reference/git#create-a-tree)(owner,\n  repo, tree, base_tree): *Create a tree*\n- [git.get_tree](https://docs.github.com/rest/reference/git#get-a-tree)(owner,\n  repo, tree_sha, recursive): *Get a tree*\n\nHere\u2019s how to learn about an endpoint you want to use, e.g.:\n\n``` python\napi.git.get_ref\n```\n\n[git.get_ref](https://docs.github.com/rest/reference/git#get-a-reference)(owner,\nrepo, ref): *Get a reference*\n\nIn Jupyter Notebook full tab completion, parameter lists, etc are\nprovided for all endpoints. Endpoints are called as standard Python\nmethods:\n\n``` python\napi.git.get_ref(owner='fastai', repo='fastcore', ref='heads/master')\n```\n\n- ref: refs/heads/master\n- node_id: MDM6UmVmMjI1NDYwNTk5OnJlZnMvaGVhZHMvbWFzdGVy\n- url:\n  https://api.github.com/repos/fastai/fastcore/git/refs/heads/master\n- object:\n  - sha: 0e3084ed009baa51db38a640ae7c23d638af2756\n  - type: commit\n  - url:\n    https://api.github.com/repos/fastai/fastcore/git/commits/0e3084ed009baa51db38a640ae7c23d638af2756\n\nTo use [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) to access\nauthenticated operations (other than when running through GitHub\nActions), you will need a GitHub [personal access\ntoken](https://docs.github.com/github/authenticating-to-github/creating-a-personal-access-token),\nwhich is a secret code used to access your account. If you don\u2019t have\none, [click here](https://github.com/settings/tokens/new) to create one.\nYou\u2019ll be asked to enter a name \u2013 choose anything you like, for instance\n\u201c*ghapi*\u201d. You\u2019ll also be asked to choose \u201cscopes\u201d; this limits what\nyou\u2019ll be able to do with the API using this token. If you\u2019re not sure,\nclick \u201c*repo*\u201d \u201c*gist*\u201d, \u201c*notifications*\u201d, and \u201c*workflow*\u201d. Then click\n\u201cGenerate Token\u201d at the bottom of the screen, and copy the token (the\nlong string of letters and numbers shown). You can easily do that by\nclicking the little clipboard icon next to the token.\n\nRather than pasting that token into every script, it\u2019s easiest to save\nit as an environment variable. If you save it as `$GITHUB_TOKEN` then it\nwill be most convenient, so add this to the end of your `.bashrc` or\n`.zshrc` file:\n\n    export GITHUB_TOKEN=xxx\n\n\u2026replacing the `xxx` with the token you just copied. (Don\u2019t forget to\n`source` that file after you change it.), pass a \\[GitHub token\\].\n\nAs well as your `token`, you can also pass any parameters you want\nauto-inserted into relevant methods, such as `owner` and `repo`:\n\n``` python\napi = GhApi(owner='fastai', repo='fastcore', token=github_token)\n```\n\nWe can now repeat the previous method, but only need to pass `ref`:\n\n``` python\napi.git.get_ref('heads/master')\n```\n\n- ref: refs/heads/master\n- node_id: MDM6UmVmMjI1NDYwNTk5OnJlZnMvaGVhZHMvbWFzdGVy\n- url:\n  https://api.github.com/repos/fastai/fastcore/git/refs/heads/master\n- object:\n  - sha: 0e3084ed009baa51db38a640ae7c23d638af2756\n  - type: commit\n  - url:\n    https://api.github.com/repos/fastai/fastcore/git/commits/0e3084ed009baa51db38a640ae7c23d638af2756\n\nNow that we\u2019ve provided our token, we can use authenticated endpoints\nsuch as creating an issue:\n\n``` python\nissue = api.issues.create(\"Remember to check out GhApi!\")\n```\n\nSince we\u2019ve now checked out GhApi, let\u2019s close this issue. \ud83d\ude0e\n\n``` python\napi.issues.update(issue.number, state='closed')\n```\n\n## How to use - command line\n\nYou can use [`GhApi`](https://ghapi.fast.ai/core.html#ghapi) via the\ncommand line, and can access nearly everything in the [GitHub\nAPI](https://docs.github.com/rest). We provide an overview here of one\nof the command line programs,\n[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi) \u2013 see the full CLI docs\npage for details on all the programs available.\n\nWe strongly recommend enabling tab completion for\n[`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), which you can do by\nplacing the following command at the end of your `~/.bashrc` or\n`~/.zshrc` file:\n\n``` bash\neval \"$(completion-ghapi --install)\"\n```\n\nTo get started with the [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi)\ncommand, first find the name of the operation you wish to perform, for\ninstance by searching the [full API\nreference](https://ghapi.fast.ai/fullapi.html).\n\nTo use [`ghapi`](https://ghapi.fast.ai/cli.html#ghapi), pass the method\nname (exactly the same as you\u2019d use in the Python API) as the first\nparameter, followed by any positional parameters required, and then\nkeyword arguments with \u201c`--`\u201d before each parameter name.\n\nFor instance, [git.get_ref](https://ghapi.fast.ai/fullapi.html#git)\ntakes three parameters: `owner`, `repo`, and `ref`. If we wish to pass\nthe first two as positional parameters, and the last as a named\nargument, then we\u2019d call:\n\n``` bash\nghapi git.get_ref fastai ghapi-test --ref heads/master\n```\n\nIf you have enabled tab completion, then after you\u2019ve typed `ghapi g`\ntry pressing <kbd>Tab</kbd>, and you\u2019ll see all the operation groups\navailable in the GitHub API that start with `g`. If you keep typing,\ne.g.\u00a0`ghapi git.`, and hit <kbd>Tab</kbd> again, you\u2019ll now see all the\noperations available in the `git` group, i.e:\n\n    git.create_blob git.create_commit git.create_ref git.create_tag git.create_tree git.delete_ref git.get_blob git.get_commit git.get_ref git.get_tag git.get_tree git.list_matching_refs git.name git.update_ref git.verbs\n\nIf you pass just `--help` after the operation name, you\u2019ll see a full\nlist of all parameters accepted, and a link to the official GitHub\ndocumentation.\n\n``` bash\nghapi git.get_ref --help\n>>> git.get_ref(owner, repo, ref)\n>>> https://docs.github.com/rest/reference/git#get-a-reference\n```\n\nIn addition to `--help` and the GitHub operation parameters, you can\nalso pass the following:\n\n- `--headers`: A list of extra headers to pass, JSON-encoded\n- `--token`: A GitHub authentation token\n- `--debug`: Print requests before sending them\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "A python client for the GitHub API",
    "version": "1.0.5",
    "project_urls": {
        "Documentation": "https://ghapi.fast.ai/",
        "Homepage": "https://github.com/fastai/ghapi"
    },
    "split_keywords": [
        "github",
        "api"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "716c2913287a13bc1a5233836d66c3efd6d7bd7d6625fb37c31d36429dec44a4",
                "md5": "f5b938c7c2ffbbf63726e9f9bd02df69",
                "sha256": "24a851b7a256861f173437c807701beac3857a84979067ddc25a8555868ce6dc"
            },
            "downloads": -1,
            "filename": "ghapi-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f5b938c7c2ffbbf63726e9f9bd02df69",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 60777,
            "upload_time": "2024-03-30T18:33:18",
            "upload_time_iso_8601": "2024-03-30T18:33:18.380653Z",
            "url": "https://files.pythonhosted.org/packages/71/6c/2913287a13bc1a5233836d66c3efd6d7bd7d6625fb37c31d36429dec44a4/ghapi-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b64860a50ff7b639237ad8c6842b9c0489daabc68aea7fb1c553b34134dae288",
                "md5": "36566546eaa0bc2b79b3f6b5cf9abb14",
                "sha256": "57f170d50d4e6cbf475d234056c54b1ea7bb917b96b0a19798f6127d8a0c40b1"
            },
            "downloads": -1,
            "filename": "ghapi-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "36566546eaa0bc2b79b3f6b5cf9abb14",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 64049,
            "upload_time": "2024-03-30T18:33:20",
            "upload_time_iso_8601": "2024-03-30T18:33:20.992836Z",
            "url": "https://files.pythonhosted.org/packages/b6/48/60a50ff7b639237ad8c6842b9c0489daabc68aea7fb1c553b34134dae288/ghapi-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-30 18:33:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "fastai",
    "github_project": "ghapi",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ghapi"
}
        
Elapsed time: 0.21723s