A fast and modern graphql client designed with simplicity in mind.
Project description
Qlient: Python GraphQL Client
A fast and modern graphql client designed with simplicity in mind.
Help
See documentation for more details
Installation
pip install qlient
Quick Start
from qlient import Client
client = Client("https://api.spacex.land/graphql/")
res = client.query.launchesPast(
# spacex graphql input fields
find={"mission_name": "Starlink"},
limit=5,
sort="mission_name",
# qlient specific
_fields=["mission_name", "launch_success", "launch_year"]
)
which sends the following query
query launchesPast($find: LaunchFind, $limit: Int, $sort: String) {
launchesPast(find: $find, limit: $limit, sort: $sort) {
mission_name
launch_success
launch_year
}
}
to the server and return this body:
{
"data": {
"launchesPast": [
{
"mission_name": "Paz / Starlink Demo",
"launch_success": true,
"launch_year": "2018"
},
{
"mission_name": "Starlink 1",
"launch_success": true,
"launch_year": "2019"
},
{
"mission_name": "Starlink 2",
"launch_success": true,
"launch_year": "2020"
},
{
"mission_name": "Starlink 3",
"launch_success": true,
"launch_year": "2020"
},
{
"mission_name": "Starlink 4",
"launch_success": true,
"launch_year": "2020"
}
]
}
}
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
qlient-0.0.1a0.tar.gz
(17.6 kB
view hashes)
Built Distribution
qlient-0.0.1a0-py3-none-any.whl
(19.9 kB
view hashes)