{"id":16360061,"url":"https://github.com/frgfm/ghapi","last_synced_at":"2025-09-12T03:34:03.608Z","repository":{"id":87442481,"uuid":"580147773","full_name":"frgfm/ghapi","owner":"frgfm","description":"Python wrapper for the GitHub API","archived":false,"fork":false,"pushed_at":"2024-09-03T21:44:18.000Z","size":554,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-13T05:22:41.703Z","etag":null,"topics":["github-api","python-client"],"latest_commit_sha":null,"homepage":"https://frgfm.github.io/ghapi","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/frgfm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"frgfm","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2022-12-19T20:52:23.000Z","updated_at":"2024-08-19T20:04:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"bd15abf3-3672-481d-8ce4-9bb8507fa4e5","html_url":"https://github.com/frgfm/ghapi","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/frgfm/ghapi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Fghapi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Fghapi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Fghapi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Fghapi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frgfm","download_url":"https://codeload.github.com/frgfm/ghapi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frgfm%2Fghapi/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266983523,"owners_count":24016559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["github-api","python-client"],"created_at":"2024-10-11T02:10:26.809Z","updated_at":"2025-07-25T09:12:56.767Z","avatar_url":"https://github.com/frgfm.png","language":"Python","funding_links":["https://github.com/sponsors/frgfm"],"categories":[],"sub_categories":[],"readme":"# Python client for GitHub API\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/frgfm/ghapi/actions?query=workflow%3Abuilds\"\u003e\n    \u003cimg alt=\"CI Status\" src=\"https://img.shields.io/github/actions/workflow/status/frgfm/ghapi/builds.yml?branch=main\u0026label=CI\u0026logo=github\u0026style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://frgfm.github.io/ghapi\"\u003e\n    \u003cimg alt=\"Documentation Status\" src=\"https://img.shields.io/github/actions/workflow/status/frgfm/ghapi/docs.yaml?branch=main\u0026label=docs\u0026logo=read-the-docs\u0026style=flat-square\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/frgfm/ghapi\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/frgfm/ghapi/branch/main/graph/badge.svg?token=ISgEpF7y0A\" alt=\"Test coverage percentage\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/ambv/black\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/code%20style-black-000000.svg?style=flat-square\" alt=\"black\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/PyCQA/bandit\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/security-bandit-yellow.svg?style=flat-square\" alt=\"bandit\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://www.codacy.com/gh/frgfm/ghapi/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=frgfm/ghapi\u0026amp;utm_campaign=Badge_Grade\"\u003e\u003cimg src=\"https://app.codacy.com/project/badge/Grade/c332510e1ed24026a9479edf1199d2e2\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://pypi.org/project/ghapi-client/\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/ghapi-client.svg?logo=python\u0026logoColor=fff\u0026style=flat-square\" alt=\"PyPi Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://anaconda.org/frgfm/ghapi-client\"\u003e\n    \u003cimg alt=\"Anaconda\" src=\"https://img.shields.io/conda/vn/frgfm/ghapi-client?style=flat-square?style=flat-square\u0026logo=Anaconda\u0026logoColor=white\u0026label=conda\"\u003e\n  \u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/pyversions/ghapi-client.svg?style=flat-square\" alt=\"pyversions\"\u003e\n  \u003cimg src=\"https://img.shields.io/pypi/l/ghapi-client.svg?style=flat-square\" alt=\"license\"\u003e\n\u003c/p\u003e\n\n\n## Quick Tour\n\n### Interacting with Pull Request\n\nThis project uses [GitHub API](https://docs.github.com/en/rest) to fetch information from GitHub using a Python wrapper.\n\nYou can find the exhaustive list of supported features in the [documentation](https://frgfm.github.io/ghapi). For instance, you can retrieve basic information about your pull request as follows:\n\n```python\nfrom ghapi.pulls import Repository, PullRequest\n\npr = PullRequest(Repository(\"frgfm\", \"torch-cam\"), 187)\n# Get the PR information\npr.get_info()\n```\n```\n{'title': 'fix: Fixed zero division for weight computation in gradient based methods',\n 'created_at': '2022-09-18T17:08:50Z',\n 'description': 'This PR introduces an `eps` to all divisions in gradient methods to avoid NaNs.\\r\\n\\r\\nCloses #186',\n 'labels': [{'id': 1929545961,\n   'node_id': 'MDU6TGFiZWwxOTI5NTQ1OTYx',\n   'url': 'https://api.github.com/repos/frgfm/torch-cam/labels/type:%20bug',\n   'name': 'type: bug',\n   'color': 'd73a4a',\n   'default': False,\n   'description': \"Something isn't working\"},\n  {'id': 1929975543,\n   'node_id': 'MDU6TGFiZWwxOTI5OTc1NTQz',\n   'url': 'https://api.github.com/repos/frgfm/torch-cam/labels/ext:%20tests',\n   'name': 'ext: tests',\n   'color': 'f7e101',\n   'default': False,\n   'description': 'Related to test'},\n  {'id': 1929975788,\n   'node_id': 'MDU6TGFiZWwxOTI5OTc1Nzg4',\n   'url': 'https://api.github.com/repos/frgfm/torch-cam/labels/module:%20methods',\n   'name': 'module: methods',\n   'color': 'f7e101',\n   'default': False,\n   'description': 'Related to torchcam.methods'}],\n 'user': 'frgfm',\n 'mergeable': None,\n 'changed_files': 3,\n 'additions': 15,\n 'deletions': 8,\n 'base': {'branch': 'main', 'sha': '0a5e06051440e27de6027ec382517a2c71686298'},\n 'head': {'repo': 'frgfm/torch-cam',\n  'branch': 'grad-nans',\n  'sha': 'd49f4a3d847e130e99c3d20311e1450f074fd29f'}}\n```\n\nIf you're interested in reviewing the pull request, you might be interested in the code diff:\n```python\n# Retrieve the code diff\nfull_diff = pr.get_diff()\n# Print the first diff section\nprint(full_diff[\"torchcam/methods/gradient.py\"][0][\"text\"])\n```\nwhich yields:\n```\n-    def _get_weights(self, class_idx: Union[int, List[int]], scores: Tensor, **kwargs: Any) -\u003e List[Tensor]:\n+    def _get_weights(\n+        self, class_idx: Union[int, List[int]], scores: Tensor, eps: float = 1e-8, **kwargs: Any\n+    ) -\u003e List[Tensor]:\n```\n\n\n## Setup\n\n\nPython 3.6 (or higher) and [pip](https://pip.pypa.io/en/stable/)/[conda](https://docs.conda.io/en/latest/miniconda.html) are required to install `ghapi`.\n\n### Stable release\n\nYou can install the last stable release of the package using [pypi](https://pypi.org/project/ghapi-client/) as follows:\n\n```shell\npip install ghapi-client\n```\n\nor using [conda](https://anaconda.org/frgfm/ghapi-client):\n\n```shell\nconda install -c frgfm ghapi-client\n```\n\n### Developer installation\n\nAlternatively, if you wish to use the latest features of the project that haven't made their way to a release yet, you can install the package from source:\n\n```shell\ngit clone https://github.com/frgfm/ghapi.git\npip install -e ghapi/.\n```\n\n## What else\n\n### Documentation\n\nThe full package documentation is available [here](https://frgfm.github.io/ghapi/) for detailed specifications.\n\n\n## Contributing\n\nFeeling like extending the range of supported API feature? Or perhaps submitting a new feature idea? Any sort of contribution is greatly appreciated!\n\nYou can find a short guide in [`CONTRIBUTING`](CONTRIBUTING.md) to help grow this project!\n\n\n\n## License\n\nDistributed under the Apache 2.0 License. See [`LICENSE`](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgfm%2Fghapi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrgfm%2Fghapi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrgfm%2Fghapi/lists"}