Skip to main content

A fast and modern graphql client designed with simplicity in mind.

Project description

Qlient: Python GraphQL Client

qlient-org pypi versions license

A fast and modern graphql client designed with simplicity in mind.

Help

See documentation for more details

Installation

pip install qlient

Quick Start

from qlient import Client, GraphQLResponse

client = Client("https://swapi-graphql.netlify.app/.netlify/functions/index")

res: GraphQLResponse = client.query.film(
    # swapi graphql input fields
    id="ZmlsbXM6MQ==",

    # qlient specific
    _fields=["id", "title", "episodeID"]
)

print(res.query)  # query film($id: ID) { film(id: $id) { id title episodeID } }
print(res.variables)  # {'id': 'ZmlsbXM6MQ=='}
print(res.data)  # {'film': {'id': 'ZmlsbXM6MQ==', 'title': 'A New Hope', 'episodeID': 4}}

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

qlient-0.1.0a0.tar.gz (27.2 kB view hashes)

Uploaded Source

Built Distribution

qlient-0.1.0a0-py3-none-any.whl (22.8 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