Skip to main content

Thin wrapper for interacting with the Github GraphQL API

Project description


Thin wrapper for interacting with the Github GraphQL API.


Documentation Status CodeQL ci-cd codecov release


Please find the documentation and usage examples here:


$ pip install ghgql


For a more in-depth example, take a look at the example in the documentation. Here's a basic example.

import os
import fnc
import ghgql

query = """
query ($searchQuery: String!) {
  search(query: $searchQuery, type: ISSUE, first: 1) {
    edges {
      node {
        ... on Issue {

with ghgql.GithubGraphQL(token=os.getenv("GITHUB_TOKEN")) as ghapi:
    result = ghapi.query(query=query, variables={"searchQuery": "llvm/llvm-project"})
    print(fnc.get("search.edges", result))

Should output something like this:

[{'node': {'id': 'I_kwDOHicqdc5RG-tC',
   'number': 16,
   'title': 'llvm/llvm-project',
   'url': ''}}]


Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

Commit message conventions and semantic versioniong (semver)

We use semantic versioning and these commit message conventions can be used to automatically bump the version number and generate the changelog.


ghgql was created by Konrad Kleine. It is licensed under the terms of the MIT license.


This project was created with the help of this python packaging documentation.

ghgql was created with cookiecutter and the py-pkgs-cookiecutter template.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ghgql-1.0.6.tar.gz (5.2 kB view hashes)

Uploaded source

Built Distribution

ghgql-1.0.6-py3-none-any.whl (4.9 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page