GitHubKit


NameGitHubKit JSON
Version 0.12.6 PyPI version JSON
download
home_pageNone
SummaryGitHub SDK for Python
upload_time2025-02-01 04:26:28
maintainerNone
docs_urlNone
authoryanyongyu
requires_python<4.0,>=3.9
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": null,
    "name": "GitHubKit",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.9",
    "maintainer_email": null,
    "keywords": "github, octokit",
    "author": "yanyongyu",
    "author_email": "yyy@yyydl.top",
    "download_url": "https://files.pythonhosted.org/packages/42/61/2ed7f9dee06611bb4a06bb6cb35e3d8d866971f12ed48e7a5231a201977b/githubkit-0.12.6.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.12.6",
    "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": null,
            "digests": {
                "blake2b_256": "c3b5a7411fb7bdcc95479af52ec97c7a9fc45c17652b5b490fc6f9e063fccfff",
                "md5": "3f012d873b8b366f753576baa6517568",
                "sha256": "eb7e121b7c7ef0e2e8d9267d9d3e26f2345410297704bf15a1a4a713e14b4114"
            },
            "downloads": -1,
            "filename": "githubkit-0.12.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3f012d873b8b366f753576baa6517568",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.9",
            "size": 5340337,
            "upload_time": "2025-02-01T04:26:25",
            "upload_time_iso_8601": "2025-02-01T04:26:25.667221Z",
            "url": "https://files.pythonhosted.org/packages/c3/b5/a7411fb7bdcc95479af52ec97c7a9fc45c17652b5b490fc6f9e063fccfff/githubkit-0.12.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "42612ed7f9dee06611bb4a06bb6cb35e3d8d866971f12ed48e7a5231a201977b",
                "md5": "6588a29a4ba218224de4c42f97cc5156",
                "sha256": "ad46df360961c1800af1b077748c52d3d6f9acab3bf833397fbc92a3d2b05945"
            },
            "downloads": -1,
            "filename": "githubkit-0.12.6.tar.gz",
            "has_sig": false,
            "md5_digest": "6588a29a4ba218224de4c42f97cc5156",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.9",
            "size": 1863669,
            "upload_time": "2025-02-01T04:26:28",
            "upload_time_iso_8601": "2025-02-01T04:26:28.378854Z",
            "url": "https://files.pythonhosted.org/packages/42/61/2ed7f9dee06611bb4a06bb6cb35e3d8d866971f12ed48e7a5231a201977b/githubkit-0.12.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-01 04:26:28",
    "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.50384s