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 Python 3

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