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}}
Metadata
Release files for qlient 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| qlient-1.0.0.tar.gz | 8.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| qlient-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / qlient-1.0.0.tar.gz
| Download URL | qlient-1.0.0.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e23ae92e70cc909b866a70db6e2fd6b4832cf14d36596427ba3879be499966d4
|
|
BLAKE2b-256 checksum How to use checksums |
75efdb75ad3d72d3669252b84705b480448e809ddfc495782b6c5c68126732d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-1014-azure
|
Release files / qlient-1.0.0-py3-none-any.whl
| Download URL | qlient-1.0.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fbff00451b967ce7a29daa4252a49ac81a188b86d457237c34cdb0776f77862
|
|
BLAKE2b-256 checksum How to use checksums |
e79e601579c1312c972af434c4a326ef97be45dd11db04da48eac8fe53a44447
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-1014-azure
|