Skip to main content

Python GraphQL Client

Project description

Code style: black

Python GraphQL Client

Simple package for making requests to a graphql server.


pip install python-graphql-client


from python_graphql_client import GraphqlClient

# Instantiate the client with an endpoint.
client = GraphqlClient(endpoint="")

# Create the query string and variables required for the request.
query = """
    query countryQuery($countryCode: String) {
        country(code:$countryCode) {
variables = {"countryCode": "CA"}

# Synchronous request
data = client.execute(query=query, variables=variables)
print(data)  # => {'data': {'country': {'code': 'CA', 'name': 'Canada'}}}

# Asynchronous request
import asyncio

data =, variables=variables))
print(data)  # => {'data': {'country': {'code': 'CA', 'name': 'Canada'}}}


To start we'll try and use a Github project board for listing current work and updating priorities of upcoming features.


Read the Contributing documentation for details on the process for submitting pull requests to the project. Also take a peek at our Code of Conduct.

Authors and Acknowledgement

Kudos to @xkludge, @DaleSeo, and @mattbullock for getting this project started.


MIT License

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-graphql-client, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size python_graphql_client-0.1.1-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size python_graphql_client-0.1.1.tar.gz (3.1 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page