Skip to main content

A simple python GraphQL client

Project description

python-graphql

Python client of GraphGL.This package mainly uses requests to build the http/https requests.

Install

pip install py-gql-next

Usage:

(example of gitlab graphql api)

from pygql import Client

gitlab = Client(url="https://www.gitlab.com/api/graphql")

query = {
    "query": """
    {
        currentUser {
            name
        }
    }"""
}

print(gitlab.execute(query))

Result

{
    "data": {
        "currentUser": None
    }
}

TODO:

  • async support
  • add tests

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

py-gql-next-0.0.2.tar.gz (2.1 kB view hashes)

Uploaded source

Built Distribution

py_gql_next-0.0.2-py3-none-any.whl (3.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page