# graphql-python/gql

A GraphQL client in Python

Repository: https://github.com/graphql-python/gql
Canonical: https://ross.abutalabs.com/products/graphql-python-gql
Homepage: https://gql.readthedocs.io
Language: Python
License: MIT
License Family: permissive
Topics: graphql, gql, graphql-client, async-transport, websockets-transport
Last push: 2026-07-24T19:50:43+00:00

## Health v2 (maintenance only)
Score: 73/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 94, release rhythm 31, longevity 100
- inputs: {"age_days": 3719, "days_push": 40, "days_rel": 381, "gap_med": 75, "n_releases_24m": 4}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1681, forks 195 (observed 2026-08-28T04:05:21.586594+00:00)

## What it is
GQL is a GraphQL client library for Python supporting queries, mutations, and subscriptions over HTTP and websockets transports. It offers sync and async usage, local request validation against a schema, file uploads, batching, a DSL for composing queries, and a CLI for running queries or downloading schemas.

## Use cases
- query a GraphQL API from Python
- subscribe to GraphQL subscriptions over websockets
- validate GraphQL requests locally against a schema
- upload files via GraphQL mutations
- download a GraphQL schema from the command line
- run concurrent async GraphQL requests
- compose GraphQL queries dynamically with a DSL

## When to choose
- you need a full-featured Python GraphQL client with async and subscription support
- you want local query validation against a GraphQL schema
- you need multiple transports (HTTP, websockets, AppSync, Phoenix channels)
- you want a CLI to fetch schemas or run queries

## When to avoid
- you need a GraphQL server implementation rather than a client
- you are not working with GraphQL APIs
- you need a JavaScript or non-Python client

## Facets
- artifact type: library
- maturity: stable
- function: graphql-client, http-client, websocket
- domain: apis, web-development, backend, developer-tools
- platform: python, cross-platform, cli
- tags: graphql, async, subscriptions, dsl, schema-validation, file-upload

## Member repositories
- graphql-python/gql (main) score 73

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:21.586594+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:41:25.375266+00:00, confidence not recorded.
  - readme: https://github.com/graphql-python/gql (fetched 2026-08-28T04:05:21.586594+00:00, sha cd9e0bda756a)
  - registry_pypi: https://pypi.org/pypi/gql/json (fetched 2026-08-29T11:15:02.182325+00:00, sha c2b77ea061a3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
