How to use the graphistry.pygraphistry.PyGraphistry._is_authenticated function in graphistry

To help you get started, we’ve selected a few graphistry examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github graphistry / pygraphistry / graphistry / pygraphistry.py View on Github external
def api_key(value=None):
        """Set or get the API key.
        Also set via environment variable GRAPHISTRY_API_KEY."""

        if value is None:
            return PyGraphistry._config['api_key']

        # setter
        if value is not PyGraphistry._config['api_key']:
            PyGraphistry._config['api_key'] = value.strip()
            PyGraphistry._is_authenticated = False
github graphistry / pygraphistry / graphistry / pygraphistry.py View on Github external
def authenticate():
        """Authenticate via already provided configuration.
        This is called once automatically per session when uploading and rendering a visualization."""
        key = PyGraphistry.api_key()
        #Mocks may set to True, so bypass in that case
        if (key is None) and PyGraphistry._is_authenticated == False:
            util.error('API key not set explicitly in `register()` or available at ' + EnvVarNames['api_key'])
        if not PyGraphistry._is_authenticated:
            PyGraphistry._check_key_and_version()
            PyGraphistry._is_authenticated = True
github graphistry / pygraphistry / graphistry / pygraphistry.py View on Github external
def authenticate():
        """Authenticate via already provided configuration.
        This is called once automatically per session when uploading and rendering a visualization."""
        key = PyGraphistry.api_key()
        #Mocks may set to True, so bypass in that case
        if (key is None) and PyGraphistry._is_authenticated == False:
            util.error('API key not set explicitly in `register()` or available at ' + EnvVarNames['api_key'])
        if not PyGraphistry._is_authenticated:
            PyGraphistry._check_key_and_version()
            PyGraphistry._is_authenticated = True