Skip to content

Instantly share code, notes, and snippets.

@philiptzou
Last active October 15, 2016 06:23
Show Gist options
  • Save philiptzou/c76a5bd7a669391594103cc8013c7b5d to your computer and use it in GitHub Desktop.
Save philiptzou/c76a5bd7a669391594103cc8013c7b5d to your computer and use it in GitHub Desktop.
"""
A simple script to initial a request to Sierra GraphQL service and
then print out current HIVDB version.
"""
from __future__ import print_function
from gql import gql
from sierrapy import SierraClient
client = SierraClient('https://hivdb.stanford.edu/graphql')
data = client.execute(
gql('query { viewer { currentVersion { text } } }')
)
print('Current HIVDB Version:',
data['viewer']['currentVersion']['text'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment