Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yanyongyu/githubkit
The modern, all-batteries-included GitHub SDK for Python, including rest api, graphql, webhooks, like octokit!
https://github.com/yanyongyu/githubkit
async github github-api github-sdk httpx octokit pydantic python sync
Last synced: about 15 hours ago
JSON representation
The modern, all-batteries-included GitHub SDK for Python, including rest api, graphql, webhooks, like octokit!
- Host: GitHub
- URL: https://github.com/yanyongyu/githubkit
- Owner: yanyongyu
- License: mit
- Created: 2022-07-09T08:55:35.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2025-01-24T08:49:18.000Z (8 days ago)
- Last Synced: 2025-01-25T03:47:06.361Z (8 days ago)
- Topics: async, github, github-api, github-sdk, httpx, octokit, pydantic, python, sync
- Language: Python
- Homepage: https://yanyongyu.github.io/githubkit/
- Size: 26.4 MB
- Stars: 239
- Watchers: 2
- Forks: 29
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
[![githubkit](https://socialify.git.ci/yanyongyu/githubkit/image?description=1&descriptionEditable=%E2%9C%A8%20GitHub%20SDK%20for%20Python%20%E2%9C%A8&font=Bitter&language=1&pattern=Circuit%20Board&theme=Light)](https://github.com/yanyongyu/githubkit)
_✨ 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 Docsgithubkit aims to be an easy-to-use, fully typed, and always up-to-date GitHub SDK for Python. It is inspired by [octokit](https://github.com/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](https://docs.pydantic.dev/latest/), for both webhook events and REST API responses
- Built-in http cache (powered by [Hishel](https://hishel.com/) for HTTPX) and auto retry
- Lazy loading of APIs and models
- Fully typed APIs## Getting Started
For more, see the [documentation](https://yanyongyu.github.io/githubkit).
### Installation
Install githubkit with the package manager of your choice:
```bash
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)](https://github.com/settings/personal-access-tokens/new) and use it to create a `GitHub` instance:
```python
from githubkit import GitHubgithub = GitHub("")
```Then, enjoy githubkit now!
```python
from githubkit import Response
from githubkit.versions.latest.models import FullRepositoryresp: Response[FullRepository] = github.rest.repos.get("owner", "repo")
repo: FullRepository = resp.parsed_data
print(repo.full_name)
```## Development
See the [development](https://yanyongyu.github.io/githubkit/contributing/) in the contributing guide.
## Contributors
Thanks to the following people who have contributed to this project: