Asynchronous/IO GraphQL client
A Python asynchronous/IO GraphQL client based on aiohttp.
In addition to standard HTTP POST queries and mutations this client fully supports
the GraphQL multipart form requests spec for file uploads
and the graphql-ws subprotocol for WebSocket based subscriptions.
Installation
pip install aiogqlc
Basic usage
Check the documentation for detailed and more advanced usage examples.
Queries
import asyncio
import aiohttp
from aiogqlc import GraphQLClient
endpoint = "https://swapi-graphql.netlify.app/graphql"
document = """
query {
allFilms {
films {
title
}
}
}
"""
async def main():
async with aiohttp.ClientSession() as session:
client = GraphQLClient(endpoint, session=session)
response = await client.execute(document)
print(await response.json())
if __name__ == "__main__":
asyncio.run(main())
Mutations
import aiohttp
from aiogqlc import GraphQLClient
document = """
mutation ($userId: ID!) {
deleteUser (id: $userId) {
id
}
}
"""
variables = {
"userId": "42",
}
async def main():
async with aiohttp.ClientSession() as session:
client = GraphQLClient("https://example.com/graphql/", session=session)
response = await client.execute(document, variables=variables)
print(await response.json())
File uploads
import aiohttp
from aiogqlc import GraphQLClient
document = """
mutation($file: Upload!) {
uploadFile(file: $file) {
size
}
}
"""
variables = {"file": open("test.txt", "rb")}
async def foo():
async with aiohttp.ClientSession() as session:
client = GraphQLClient("https://example.com/graphql/", session=session)
response = await client.execute(document, variables=variables)
print(await response.json())
Subscriptions
import aiohttp
from aiogqlc import GraphQLClient
document = """
subscription($postId: ID!) {
likeAdded(postId: $postId)
}
"""
variables = {"postId": "42"}
async def main():
async with aiohttp.ClientSession() as session:
client = GraphQLClient("https://example.com/graphql/", session=session)
async with client.connect() as connection:
async for payload in connection.subscribe(document, variables=variables):
print(payload)
Documentation
Read the documentation to learn more about queries, mutations, subscriptions, file uploads and even authentication.
Metadata
Release files for aiogqlc 6.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aiogqlc-6.0.0.tar.gz | 6.7 kB | With provenance | Details for aiogqlc-6.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiogqlc-6.0.0-py3-none-any.whl | Python 3 | none | any | Details for aiogqlc-6.0.0-py3-none-any.whl |
Total release size: 14.5 kB
Release files / aiogqlc-6.0.0.tar.gz
| Download URL | aiogqlc-6.0.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1feb2cf8878d3bc83ac13df579e90cc2e04435753e42d7a158af9cf6f9afe46f
|
|
BLAKE2b-256 checksum How to use checksums |
ff02e9c8ec1cce74bf891bfb40d514b7c0ca7d408dcce3651f1029e9cbe7aff2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logRelease files / aiogqlc-6.0.0-py3-none-any.whl
| Download URL | aiogqlc-6.0.0-py3-none-any.whl |
|---|---|
| Size | 7.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3e83a9588adaeb86dda890fba37d148f662971eb2e65cea59ed8f0ca672192ed
|
|
BLAKE2b-256 checksum How to use checksums |
1653ba6aec740fc5b7ce9454c2b1325756602e6bb2e56e63dbb5199bedb47d42
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logSecurity for aiogqlc 6.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for aiogqlc-6.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.