A simple python GraphQL client
Project description
python-graphql
Python client of GraphGL.This package mainly uses requests
to build the http/https requests.
Usage:
(example of gitlab graphql api)
from client import Client
headers = {"Private-Token": "gitlab token"}
# these params is send to requests, so you can pass kwargs to `Client`
client = Client(url="https://example.gitlab.com/api/graphql", headers=headers, verify=False)
query = {
"query": """{
currentUser {
name
}
}"""
}
print(client.execute(query))
Result
{'data': {'currentUser': {'name': 'Administrator'}}}
TODO:
- async support
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-gql-next-0.0.1.tar.gz
(2.0 kB
view hashes)
Built Distribution
Close
Hashes for py_gql_next-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26c05df7f0eb68cf8ae4337716f6e19926fa7b882abea6d7903a1675d405a16a |
|
MD5 | d3a1ec56cd0568f5b80157bbb7f13697 |
|
BLAKE2b-256 | 713f613f8b15e6f79addd4643da27bbe49b7c64c88a3c95f32bda222ff865f10 |