GitHubKit


NameGitHubKit JSON
Version 0.11.14 PyPI version JSON
download
home_pagehttps://github.com/yanyongyu/githubkit
SummaryGitHub SDK for Python
upload_time2024-10-16 06:51:13
maintainerNone
docs_urlNone
authoryanyongyu
requires_python<4.0,>=3.8
licenseMIT
keywords github octokit
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <!-- markdownlint-disable MD041 -->
<div align="center">

[![githubkit](https://socialify.git.ci/yanyongyu/githubkit/image?description=1&descriptionEditable=%E2%9C%A8%20GitHub%20SDK%20for%20Python%20%E2%9C%A8&font=Bitter&language=1&pattern=Circuit%20Board&theme=Light)](https://github.com/yanyongyu/githubkit)

</div>

<p align="center">
  <a href="https://raw.githubusercontent.com/yanyongyu/githubkit/master/LICENSE">
    <img src="https://img.shields.io/github/license/yanyongyu/githubkit" alt="license">
  </a>
  <a href="https://pypi.python.org/pypi/githubkit">
    <img src="https://img.shields.io/pypi/v/githubkit?logo=python&logoColor=edb641" alt="pypi">
  </a>
  <img src="https://img.shields.io/badge/python-3.8+-blue?logo=python&logoColor=edb641" alt="python">
  <a href="https://github.com/psf/black">
    <img src="https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641" alt="black">
  </a>
  <a href="https://github.com/Microsoft/pyright">
    <img src="https://img.shields.io/badge/types-pyright-797952.svg?logo=python&logoColor=edb641" alt="pyright">
  </a>
  <a href="https://github.com/astral-sh/ruff">
    <img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json" alt="ruff">
  </a>
  <a href="https://results.pre-commit.ci/latest/github/yanyongyu/githubkit/master">
    <img src="https://results.pre-commit.ci/badge/github/yanyongyu/githubkit/master.svg" alt="pre-commit" />
  </a>
</p>

<div align="center">

<!-- markdownlint-capture -->
<!-- markdownlint-disable MD036 -->

_✨ The modern, all-batteries-included GitHub SDK for Python ✨_

_✨ Support both **sync** and **async** calls, **fully typed** ✨_

_✨ Always up to date, like octokit ✨_

<!-- markdownlint-restore -->

</div>

<p align="center">
  <a href="https://yanyongyu.github.io/githubkit/"><b>Documentation</b></a> |
  <a href="https://github.com/yanyongyu/githubkit/issues"><b>Report Bug</b></a> |
  <a href="https://docs.github.com/"><b>GitHub Docs</b></a>
</p>

githubkit aims to be an easy-to-use, fully typed, and always up-to-date GitHub SDK for Python. It is inspired by [octokit](https://github.com/octokit).

githubkit provides several features including:

- Support both sync and async calls
- Multiple authentication ways and OAuth flow support
- Calling REST API and GraphQL easily
- REST API versioning, including GHEC
- Built-in pagination support
- Optional data validation with [Pydantic](https://docs.pydantic.dev/latest/), for both webhook events and REST API responses
- Built-in http cache (powered by [Hishel](https://hishel.com/) for HTTPX) and auto retry
- Lazy loading of APIs and models
- Fully typed APIs

## Getting Started

For more, see the [documentation](https://yanyongyu.github.io/githubkit).

### Installation

Install githubkit with the package manager of your choice:

```bash
pip install githubkit
# or, use poetry
poetry add githubkit
# or, use pdm
pdm add githubkit
# or, use uv
uv add githubkit
```

### Usage

Create a [Personal Access Token (PAT)](https://github.com/settings/personal-access-tokens/new) and use it to create a `GitHub` instance:

```python
from githubkit import GitHub

github = GitHub("<your_token_here>")
```

Then, enjoy githubkit now!

```python
from githubkit import Response
from githubkit.versions.latest.models import FullRepository

resp: Response[FullRepository] = github.rest.repos.get("owner", "repo")
repo: FullRepository = resp.parsed_data
print(repo.full_name)
```

## Development

See the [development](https://yanyongyu.github.io/githubkit/contributing/) in the contributing guide.

## Contributors

Thanks to the following people who have contributed to this project:

<a href="https://github.com/yanyongyu/githubkit/graphs/contributors">
  <img src="https://contrib.rocks/image?repo=yanyongyu/githubkit&max=1000" alt="contributors" />
</a>


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/yanyongyu/githubkit",
    "name": "GitHubKit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.8",
    "maintainer_email": null,
    "keywords": "github, octokit",
    "author": "yanyongyu",
    "author_email": "yyy@yyydl.top",
    "download_url": "https://files.pythonhosted.org/packages/11/2d/e9f390a716bb479529b14a926502bdad34eed59fac425935860d9f211758/githubkit-0.11.14.tar.gz",
    "platform": null,
    "description": "<!-- markdownlint-disable MD041 -->\n<div align=\"center\">\n\n[![githubkit](https://socialify.git.ci/yanyongyu/githubkit/image?description=1&descriptionEditable=%E2%9C%A8%20GitHub%20SDK%20for%20Python%20%E2%9C%A8&font=Bitter&language=1&pattern=Circuit%20Board&theme=Light)](https://github.com/yanyongyu/githubkit)\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://raw.githubusercontent.com/yanyongyu/githubkit/master/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/yanyongyu/githubkit\" alt=\"license\">\n  </a>\n  <a href=\"https://pypi.python.org/pypi/githubkit\">\n    <img src=\"https://img.shields.io/pypi/v/githubkit?logo=python&logoColor=edb641\" alt=\"pypi\">\n  </a>\n  <img src=\"https://img.shields.io/badge/python-3.8+-blue?logo=python&logoColor=edb641\" alt=\"python\">\n  <a href=\"https://github.com/psf/black\">\n    <img src=\"https://img.shields.io/badge/code%20style-black-000000.svg?logo=python&logoColor=edb641\" alt=\"black\">\n  </a>\n  <a href=\"https://github.com/Microsoft/pyright\">\n    <img src=\"https://img.shields.io/badge/types-pyright-797952.svg?logo=python&logoColor=edb641\" alt=\"pyright\">\n  </a>\n  <a href=\"https://github.com/astral-sh/ruff\">\n    <img src=\"https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json\" alt=\"ruff\">\n  </a>\n  <a href=\"https://results.pre-commit.ci/latest/github/yanyongyu/githubkit/master\">\n    <img src=\"https://results.pre-commit.ci/badge/github/yanyongyu/githubkit/master.svg\" alt=\"pre-commit\" />\n  </a>\n</p>\n\n<div align=\"center\">\n\n<!-- markdownlint-capture -->\n<!-- markdownlint-disable MD036 -->\n\n_\u2728 The modern, all-batteries-included GitHub SDK for Python \u2728_\n\n_\u2728 Support both **sync** and **async** calls, **fully typed** \u2728_\n\n_\u2728 Always up to date, like octokit \u2728_\n\n<!-- markdownlint-restore -->\n\n</div>\n\n<p align=\"center\">\n  <a href=\"https://yanyongyu.github.io/githubkit/\"><b>Documentation</b></a> |\n  <a href=\"https://github.com/yanyongyu/githubkit/issues\"><b>Report Bug</b></a> |\n  <a href=\"https://docs.github.com/\"><b>GitHub Docs</b></a>\n</p>\n\ngithubkit aims to be an easy-to-use, fully typed, and always up-to-date GitHub SDK for Python. It is inspired by [octokit](https://github.com/octokit).\n\ngithubkit provides several features including:\n\n- Support both sync and async calls\n- Multiple authentication ways and OAuth flow support\n- Calling REST API and GraphQL easily\n- REST API versioning, including GHEC\n- Built-in pagination support\n- Optional data validation with [Pydantic](https://docs.pydantic.dev/latest/), for both webhook events and REST API responses\n- Built-in http cache (powered by [Hishel](https://hishel.com/) for HTTPX) and auto retry\n- Lazy loading of APIs and models\n- Fully typed APIs\n\n## Getting Started\n\nFor more, see the [documentation](https://yanyongyu.github.io/githubkit).\n\n### Installation\n\nInstall githubkit with the package manager of your choice:\n\n```bash\npip install githubkit\n# or, use poetry\npoetry add githubkit\n# or, use pdm\npdm add githubkit\n# or, use uv\nuv add githubkit\n```\n\n### Usage\n\nCreate a [Personal Access Token (PAT)](https://github.com/settings/personal-access-tokens/new) and use it to create a `GitHub` instance:\n\n```python\nfrom githubkit import GitHub\n\ngithub = GitHub(\"<your_token_here>\")\n```\n\nThen, enjoy githubkit now!\n\n```python\nfrom githubkit import Response\nfrom githubkit.versions.latest.models import FullRepository\n\nresp: Response[FullRepository] = github.rest.repos.get(\"owner\", \"repo\")\nrepo: FullRepository = resp.parsed_data\nprint(repo.full_name)\n```\n\n## Development\n\nSee the [development](https://yanyongyu.github.io/githubkit/contributing/) in the contributing guide.\n\n## Contributors\n\nThanks to the following people who have contributed to this project:\n\n<a href=\"https://github.com/yanyongyu/githubkit/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=yanyongyu/githubkit&max=1000\" alt=\"contributors\" />\n</a>\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "GitHub SDK for Python",
    "version": "0.11.14",
    "project_urls": {
        "Documentation": "https://github.com/yanyongyu/githubkit",
        "Homepage": "https://github.com/yanyongyu/githubkit",
        "Repository": "https://github.com/yanyongyu/githubkit"
    },
    "split_keywords": [
        "github",
        " octokit"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6c0497a2af76ee09f5dfae1a12bc63feaca8afd3883a26a84b3429d822449cca",
                "md5": "6189f58ea4aeadc91311e9ea0db0f08c",
                "sha256": "780f346515f68f9f27db1b486f83fd64fe4142ad42a75b79423064d3e99ece97"
            },
            "downloads": -1,
            "filename": "githubkit-0.11.14-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6189f58ea4aeadc91311e9ea0db0f08c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.8",
            "size": 5154740,
            "upload_time": "2024-10-16T06:51:11",
            "upload_time_iso_8601": "2024-10-16T06:51:11.408299Z",
            "url": "https://files.pythonhosted.org/packages/6c/04/97a2af76ee09f5dfae1a12bc63feaca8afd3883a26a84b3429d822449cca/githubkit-0.11.14-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "112de9f390a716bb479529b14a926502bdad34eed59fac425935860d9f211758",
                "md5": "426cf7b4b229b6b25305ae03994d3d55",
                "sha256": "a62af8a9e3c98e202c6fd2d56ea106f238aebf03a8282c34b757eba6eaeab72c"
            },
            "downloads": -1,
            "filename": "githubkit-0.11.14.tar.gz",
            "has_sig": false,
            "md5_digest": "426cf7b4b229b6b25305ae03994d3d55",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.8",
            "size": 1928635,
            "upload_time": "2024-10-16T06:51:13",
            "upload_time_iso_8601": "2024-10-16T06:51:13.942477Z",
            "url": "https://files.pythonhosted.org/packages/11/2d/e9f390a716bb479529b14a926502bdad34eed59fac425935860d9f211758/githubkit-0.11.14.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 06:51:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "yanyongyu",
    "github_project": "githubkit",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "githubkit"
}
        
Elapsed time: 0.91581s