Skip to content

Instantly share code, notes, and snippets.

@newgene
Created February 19, 2019 21:39
Show Gist options
  • Save newgene/efb3be4b9dd1e4b67daa1f55a7d493a6 to your computer and use it in GitHub Desktop.
Save newgene/efb3be4b9dd1e4b67daa1f55a7d493a6 to your computer and use it in GitHub Desktop.
mygene client to access API via https
In [1]: import mygene
In [2]: mg = mygene.MyGeneInfo()
# by default, it uses http:
In [3]: mg.url
Out[3]: 'http://mygene.info/v3'
# switch to use https
In [4]: mg.url = 'https://mygene.info/v3'
# now all the API requests go through https
In [5]: mg.getgene(1017)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment