Skip to content

githubkit

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 ✨

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

Version Changes

githubkit is currently not stable and may have breaking changes in the future. githubkit uses the minor version number for breaking changes and the patch version number for bug fixes or enhancements.

Note that githubkit uses GitHub's official openapi schema to generate apis and models. This aims to keep the APIs and models up-to-date. You may occasionally encounter breaking changes like model names or model field types changing when upgrading githubkit. This is due to upstream github schema changes and githubkit can not control this.

Warning

githubkit recommends using a python dependency manager (like poetry / pdm / uv) to lock the version of githubkit to avoid unexpected changes.

Reporting Issues

If you encounter any issues or have some questions, please report them on the GitHub issue tracker.

If you encounter any schema errors, please provide the reproducible code and the raw response data when reporting the issue. Optionally, you can also report the schema error to upstream GitHub's official openapi schema repository.