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.
Key Features
- Compatible with Python 3.7 and above
- Build on top of qlient-core, requests and websocket-client
- support for subscriptions
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
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-1.0.0.tar.gz
(8.0 kB
view details)
Built Distribution
File details
Details for the file qlient-1.0.0.tar.gz
.
File metadata
- Download URL: qlient-1.0.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e23ae92e70cc909b866a70db6e2fd6b4832cf14d36596427ba3879be499966d4 |
|
MD5 | 5178c20a9cd4b30a290c153e9cb1c436 |
|
BLAKE2b-256 | 75efdb75ad3d72d3669252b84705b480448e809ddfc495782b6c5c68126732d0 |
File details
Details for the file qlient-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: qlient-1.0.0-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-1014-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2fbff00451b967ce7a29daa4252a49ac81a188b86d457237c34cdb0776f77862 |
|
MD5 | 615589894696ea14a2bf1689d8164475 |
|
BLAKE2b-256 | e79e601579c1312c972af434c4a326ef97be45dd11db04da48eac8fe53a44447 |