https://github.com/vavalomi/pygithubclient
https://github.com/vavalomi/pygithubclient
api-client github graphql
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/vavalomi/pygithubclient
- Owner: vavalomi
- Created: 2023-04-11T14:56:33.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-04-12T17:47:31.000Z (about 3 years ago)
- Last Synced: 2025-06-02T00:25:52.568Z (about 1 year ago)
- Topics: api-client, github, graphql
- Language: Python
- Homepage:
- Size: 75.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This is a Python wrapper for GitHub's GraphQL API.
At the moment of this writing, there was no package I could find that had features I needed (support for Projects)
so I decided to start my own.
The module basically consists of auto-generate code using an excellent GraphQL library called [sgqlc](https://github.com/profusion/sgqlc)
that does all the heavy lifting of interacting with a GraphQL endpoint in object-oriented way.
The schema.json and github_schema.py files were generated (just following sgqlc documentation) by running:
```sh
python \
-m sgqlc.introspection \
--exclude-deprecated \
-H "Authorization: bearer ${TOKEN}" \
https://server.com/graphql \
schema.json
```
and then:
```sh
sgqlc-codegen schema schema.json github_schema.py
```
One benefit of GraphQL is to dynamically create queries and request only data needed for the particular case, however the module
could still implements few frequently-used functions for convenience. For now, I'm including example.py with couple of those.