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

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

Uploaded Source

Built Distribution

githubkit-0.13.0-py3-none-any.whl (5.8 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: githubkit-0.13.0.tar.gz
  • Upload date:
  • Size: 2.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for githubkit-0.13.0.tar.gz
Algorithm Hash digest
SHA256 a2eea2777067cb5c09d8d4973373d479f3c6bcb9dd6ca1e6abd9e9caf78c7565
MD5 95e2fa7635e4dda82038a51f848e7cd3
BLAKE2b-256 cfbb54d4737569975675bd6a5502dfd93deb74fc4185eeb69f28d6fe0112bcea

See more details on using hashes here.

Provenance

The following attestation bundles were made for githubkit-0.13.0.tar.gz:

Publisher: release.yml on yanyongyu/githubkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: githubkit-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 5.8 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for githubkit-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c6cc511913d7a80a8f93f09fe1e268547963f1a0656d3f66956964426cfb58a
MD5 ab4056d8f73c88513d808519887a0829
BLAKE2b-256 f83df07cb8965f66bb8690429f324325ac61c9d3ab8b43791503820746675cef

See more details on using hashes here.

Provenance

The following attestation bundles were made for githubkit-0.13.0-py3-none-any.whl:

Publisher: release.yml on yanyongyu/githubkit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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