Skip to main content

GitHub SDK for Python

Project description

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.versions.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

Project details


Release history Release notifications | RSS feed

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.15.5.tar.gz (5.6 MB view details)

Uploaded Source

Built Distribution

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

githubkit-0.15.5-py3-none-any.whl (13.4 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: githubkit-0.15.5.tar.gz
  • Upload date:
  • Size: 5.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.15.5.tar.gz
Algorithm Hash digest
SHA256 5ee487b77d3f4332c73fe5dbc69f932d8012ff0bb1aa9c544c238aef74ef1ae0
MD5 43e51c227afb0e4955bdf5af28bfe165
BLAKE2b-256 ffac857b78d82bf95a91413322614d6751db2f55ab214b24239f31729d8821e6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: githubkit-0.15.5-py3-none-any.whl
  • Upload date:
  • Size: 13.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","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.15.5-py3-none-any.whl
Algorithm Hash digest
SHA256 69934fdce7e4f197f24d85ea91d808ef245f4463bb982e4c19ac32d827bc7a40
MD5 9da01e2039849e696fea41846b1e2d23
BLAKE2b-256 76edd08de6b425a6cce4554ea70a559e03d545058881b5b1d2d0a193d886d3a8

See more details on using hashes here.

Supported by

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