--- id: python-graphql-client version: "0.4.3" license: MIT license_treatment: permissive maintenance: aging --- # python-graphql-client — Python GraphQL Client License: permissive · Maintenance: aging · Downloads: 654.0K/mo ## What it is and what it does python-graphql-client is a lightweight wrapper around aiohttp, requests, and websockets that simplifies making GraphQL requests to a remote server. It handles query and mutation execution in both synchronous and asynchronous modes, and supports real-time subscriptions over WebSocket. You instantiate a client with a GraphQL endpoint URL, then call execute() or execute_async() to send queries with variables, or subscribe() to listen for subscription events. The package abstracts away HTTP headers, request formatting, and WebSocket connection management, letting you focus on writing GraphQL operations. The library is straightforward and minimal—it does not include schema introspection, caching, or request batching. It's designed for developers who want a simple way to call a GraphQL API from Python without pulling in a large framework. The aging maintenance status (last release in 2021) means it may not track the latest GraphQL spec changes or server features, though the core request/response pattern remains stable. Use it for: - Query a public GraphQL API (e.g., GitHub, Shopify) to fetch data in a Python script or application - Execute mutations asynchronously to update remote data without blocking the main thread - Subscribe to real-time GraphQL events over WebSocket and handle streaming updates - Build a Python backend that proxies or aggregates calls to one or more GraphQL services - Test a GraphQL server during development by sending queries and assertions from Python ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Sends GraphQL queries, mutations, and subscriptions to a GraphQL server using synchronous or asynchronous requests over HTTP or WebSocket. Yes, if you need a simple synchronous or asynchronous GraphQL client and don't require advanced features like caching or introspection. The aging maintenance (last release 2021) is a minor concern—the core HTTP and WebSocket request patterns are stable—but be aware that newer GraphQL server features or spec changes may not be supported. No known vulnerabilities. Low install friction and permissive license make it a low-risk choice for straightforward GraphQL consumption. ## Install pip install python-graphql-client uv add python-graphql-client poetry add python-graphql-client ## Installing python-graphql-client Before you install: Low install friction with a pure Python wheel. Maintenance is aging—last release was 2021-03-04, over four years old, though the repository remains active with recent commits as of 2025-07-21. Depends on aiohttp, requests, and websockets, all mature and widely used. License in practice: MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions. Quickstart: pip install python-graphql-client from python_graphql_client import GraphqlClient client = GraphqlClient(endpoint="https://countries.trevorblades.com") query = "query countryQuery($countryCode: String) { country(code:$countryCode) { code name } }" data = client.execute(query=query, variables={"countryCode": "CA"}) Verify before relying: - Whether the package works reliably with modern Python versions beyond 3.8, given classifiers list only up to 3.8 - Current test coverage and whether breaking changes exist between 0.4.3 and the latest GraphQL server implementations ## Package facts - License: MIT (permissive) - Python support: unspecified - Install friction: low - Maintenance: aging - Downloads: 654.0K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags graphql client python, graphql query requests, graphql mutations async, graphql subscriptions websocket, graphql api client, send graphql queries python, graphql, api-client, async-support [View on SkillFed](https://skillfed.io/packages/python-graphql-client) · [View on PyPI](https://pypi.org/project/python-graphql-client/)