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.0b2.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for qlient_aiohttp-0.1.0b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7fd0c72ae351fe863bee9d0a9bb61ec4f00e76c0f83d29e49938538d9da1f29 |
|
MD5 | 486346517c5aad283084d30b40174840 |
|
BLAKE2b-256 | 3fafd4097c607a3e328a8cc7f67d88afcb6b3464f11c056ad2424ddeee98b60f |