It would be convenient to set the username and password in the environment variables, and have the python client look for those automatically if the username and password aren't explicitly set in the kwargs, maybe like this:
classNdexGraph (MultiDiGraph):
"""A graph compatible with NDEx"""def__init__(self, cx=None, server=None, username=None, password=None, uuid=None, networkx_G=None, data=None, **attr):
...
ifusernameisNoneand'NDEX_USERNAME'inos.environ:
username=os.environ['NDEX_USERNAME']
ifpasswordisNoneand'NDEX_PASSWORD'inos.environ:
password=os.environ['NDEX_PASSWORD']
...
It would be convenient to set the username and password in the environment variables, and have the python client look for those automatically if the username and password aren't explicitly set in the kwargs, maybe like this: