Skip to main content

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

Project description

Qlient: Python GraphQL Client

DeepSource DeepSource pypi versions license codestyle

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

Key Features

Help

See documentation for more details.

If you want more information about the internals, I kindly refer you to the qlient-core documentation.

If you are looking for an asynchronous implementation, I kindly refer you to the qlient-aiohttp sister project.

Installation

pip install qlient

Quick Start

from qlient.http import HTTPClient, GraphQLResponse

client = HTTPClient("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.request.query)  # query film($id: ID) { film(id: $id) { id title episodeID } }
print(res.request.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-1.0.0.tar.gz (8.0 kB view hashes)

Uploaded Source

Built Distribution

qlient-1.0.0-py3-none-any.whl (9.6 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