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
  • [x] 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.

Files for py-gql-next, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size py_gql_next-0.0.2-py3-none-any.whl (3.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size py-gql-next-0.0.2.tar.gz (2.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page