GitHub SDK for Python
Project description
✨ 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:
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
Built Distribution
File details
Details for the file githubkit-0.11.14.tar.gz
.
File metadata
- Download URL: githubkit-0.11.14.tar.gz
- Upload date:
- Size: 1.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a62af8a9e3c98e202c6fd2d56ea106f238aebf03a8282c34b757eba6eaeab72c |
|
MD5 | 426cf7b4b229b6b25305ae03994d3d55 |
|
BLAKE2b-256 | 112de9f390a716bb479529b14a926502bdad34eed59fac425935860d9f211758 |
File details
Details for the file githubkit-0.11.14-py3-none-any.whl
.
File metadata
- Download URL: githubkit-0.11.14-py3-none-any.whl
- Upload date:
- Size: 5.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 780f346515f68f9f27db1b486f83fd64fe4142ad42a75b79423064d3e99ece97 |
|
MD5 | 6189f58ea4aeadc91311e9ea0db0f08c |
|
BLAKE2b-256 | 6c0497a2af76ee09f5dfae1a12bc63feaca8afd3883a26a84b3429d822449cca |