Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
::
import graphistry
graphistry.register('my api key', server='staging', protocol='https')
**Example: Through environment variable**
::
export GRAPHISTRY_API_KEY = 'my api key'
::
import graphistry
graphistry.register()
"""
PyGraphistry.api_key(key)
PyGraphistry.server(server)
PyGraphistry.api_version(api)
PyGraphistry.protocol(protocol)
PyGraphistry.certificate_validation(certificate_validation)
PyGraphistry.authenticate()
PyGraphistry.set_bolt_driver(bolt)
.plot(es)
"""
if graph is None:
if self._edges is None:
util.error('Graph/edges must be specified.')
g = self._edges
else:
g = graph
n = self._nodes if nodes is None else nodes
name = name or util.random_string(10)
self._check_mandatory_bindings(not isinstance(n, type(None)))
api_version = PyGraphistry.api_version()
if (api_version == 1):
dataset = self._plot_dispatch(g, n, name, 'json')
if skip_upload:
return dataset
info = PyGraphistry._etl1(dataset)
elif (api_version == 2):
dataset = self._plot_dispatch(g, n, name, 'vgraph')
if skip_upload:
return dataset
info = PyGraphistry._etl2(dataset)
viz_url = PyGraphistry._viz_url(info, self._url_params)
cfg_client_protocol_hostname = PyGraphistry._config['client_protocol_hostname']
full_url = ('%s:%s' % (PyGraphistry._config['protocol'], viz_url)) if cfg_client_protocol_hostname is None else viz_url
if render == False or (render == None and not self._render):