A blazingly fast and modern graphql client based on qlient-core and aiohttp
Project description
Qlient AIOHTTP: Python GraphQL Client
A blazingly fast and modern graphql client based on qlient-core and aiohttp
Key Features
- Compatible with Python 3.7 and above
- Build on top of
qlient-core
andaiohttp
- support for subscriptions
Help
See the documentation for more details.
Quick Preview
This preview is using the official github/graphql/swapi-graphql graphql api.
import asyncio
from qlient.aiohttp import AIOHTTPClient, GraphQLResponse
async def main():
async with AIOHTTPClient("https://swapi-graphql.netlify.app/.netlify/functions/index") as client:
result: GraphQLResponse = await client.query.film(
["title", "id"], # fields selection
id="ZmlsbXM6MQ==" # query arguments
)
print(result.request.query)
print(result.data)
asyncio.run(main())
Which results in the following query being sent to the server
query film($id: ID) {
film(id: $id) {
title
id
}
}
And returns the body below
{
"film": {
"title": "A New Hope",
"id": "ZmlsbXM6MQ=="
}
}
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-aiohttp-0.1.0b1.tar.gz
(5.2 kB
view hashes)
Built Distribution
Close
Hashes for qlient_aiohttp-0.1.0b1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 21189b2667269537eab54a80e23737583e4c91c76254b00d3bcbcf0097c00aa2 |
|
MD5 | 10d6fea717d281fa88737b82037e70e6 |
|
BLAKE2b-256 | e393a6591ed237269ddc75eb5440c513326fac805800290b0af8f554bf580cc9 |