Skip to main content

A blazingly fast and modern graphql client based on qlient-core and aiohttp

Project description

Qlient AIOHTTP: Python GraphQL Client

DeepSource DeepSource pypi versions license

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 and aiohttp
  • 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


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 details)

Uploaded Source

Built Distribution

qlient_aiohttp-0.1.0b2-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file qlient-aiohttp-0.1.0b2.tar.gz.

File metadata

  • Download URL: qlient-aiohttp-0.1.0b2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1031-azure

File hashes

Hashes for qlient-aiohttp-0.1.0b2.tar.gz
Algorithm Hash digest
SHA256 12bc9aeb947df3b620094af5d3dd698a2f42970b8b378aa3041e3215c7789f8e
MD5 dfe7ca96b325a73d5f0a3653c00854f8
BLAKE2b-256 13ed7bc7ca788fc36a0900e30d2084509f0c52497a131e24f23cd3bea39349ef

See more details on using hashes here.

File details

Details for the file qlient_aiohttp-0.1.0b2-py3-none-any.whl.

File metadata

  • Download URL: qlient_aiohttp-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.9.13 Linux/5.13.0-1031-azure

File hashes

Hashes for qlient_aiohttp-0.1.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 b7fd0c72ae351fe863bee9d0a9bb61ec4f00e76c0f83d29e49938538d9da1f29
MD5 486346517c5aad283084d30b40174840
BLAKE2b-256 3fafd4097c607a3e328a8cc7f67d88afcb6b3464f11c056ad2424ddeee98b60f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page