Skip to main content

githubkit

license pypi python black pyright ruff pre-commit

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

✨ Support both sync and async calls, fully typed

✨ Always up to date, like octokit ✨

Documentation | Report Bug | GitHub Docs

githubkit aims to be an easy-to-use, fully typed, and always up-to-date GitHub SDK for Python. It is inspired by 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, for both webhook events and REST API responses
  • Built-in http cache (powered by Hishel for HTTPX) and auto retry
  • Lazy loading of APIs and models
  • Fully typed APIs

Getting Started

For more, see the documentation.

Installation

Install githubkit with the package manager of your choice:

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) and use it to create a GitHub instance:

from githubkit import GitHub

github = GitHub("<your_token_here>")

Then, enjoy githubkit now!

from githubkit import Response
from githubkit_schemas.latest.models import FullRepository

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

Development

[!TIP] Open in Codespaces (Dev Container):

Open in GitHub Codespaces

See the development in the contributing guide.

Contributors

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

contributors

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

githubkit-0.16.1.tar.gz (37.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

githubkit-0.16.1-py3-none-any.whl (42.9 kB view details)

Uploaded Python 3

File details

Details for the file githubkit-0.16.1.tar.gz.

File metadata

  • Download URL: githubkit-0.16.1.tar.gz
  • Upload date:
  • Size: 37.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for githubkit-0.16.1.tar.gz
Algorithm Hash digest
SHA256 f56ea4e796f169773d114c7f39089790f99443f1d05871d594d6bdca7928945c
MD5 af43d5a19d3af9f53f06c0c5099297c6
BLAKE2b-256 45a8ebfcbddccb3e813837600f4cdb79fc462fd284c1db03abc1ad31072d0757

See more details on using hashes here.

File details

Details for the file githubkit-0.16.1-py3-none-any.whl.

File metadata

  • Download URL: githubkit-0.16.1-py3-none-any.whl
  • Upload date:
  • Size: 42.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.12.4 {"installer":{"name":"uv","version":"0.12.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for githubkit-0.16.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a791e0eb57ec80824a711321376c5816aa1cd204e6982e4ad5ddce6c87490863
MD5 dd3dd1ba07bc5d4bdca0ef5afe4b5a45
BLAKE2b-256 b0ebee6424e6d257433a8a62e86016cdbce6efdbd26d7db5735c5c099da85e44

See more details on using hashes here.

Release history Release notifications | RSS feed

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page