Githubkit
The modern, all-batteries-included GitHub SDK for Python, including rest api, graphql, webhooks, like octokit!
Install / Use
/learn @yanyongyu/GithubkitREADME
✨ 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.
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):
See the development 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>Related Skills
apple-reminders
328.6kManage Apple Reminders via remindctl CLI (list, add, edit, complete, delete). Supports lists, date filters, and JSON/plain output.
gh-issues
328.6kFetch GitHub issues, spawn sub-agents to implement fixes and open PRs, then monitor and address PR review comments. Usage: /gh-issues [owner/repo] [--label bug] [--limit 5] [--milestone v1.0] [--assignee @me] [--fork user/repo] [--watch] [--interval 5] [--reviews-only] [--cron] [--dry-run] [--model glm-5] [--notify-channel -1002381931352]
node-connect
328.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
openai-image-gen
328.6kBatch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.
