A fast and modern graphql client designed with simplicity in mind.
Project description
Qlient: Python GraphQL Client
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
Release history Release notifications | RSS feed
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.2.3b0.tar.gz
(34.2 kB
view hashes)
Built Distribution
qlient-0.2.3b0-py3-none-any.whl
(28.7 kB
view hashes)