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:
class NdexGraph (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):
...
if username is None and 'NDEX_USERNAME' in os.environ:
username = os.environ['NDEX_USERNAME']
if password is None and 'NDEX_PASSWORD' in os.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: