from seeq import spy
# Set the compatibility option so that you maximize the chance that SPy will remain compatible with your notebook/script
spy.options.compatibility = 191
Logs into a Seeq Server with a set of credentials. This command is necessary if you are using the SPy module with your own installation of Jupyter, or with hosted Jupyter Notebook services like AWS SageMaker or Azure Notebooks.
Note: In Seeq Data Lab, you will log in using the normal Seeq Server landing page and your credentials will be used by the SPy module directly.
spy.login(username=None, password=None, url=None, auth_provider='Seeq', ignore_ssl_errors=False, credentials_file=None)
Specifying Seeq Server URL and credentials
If you are not using Seeq Data Lab, you must specify the URL of the
server. You can just copy the URL directly out of the browser’s address
box and use it. For example:
You can choose to embed your credentials directly into the notebook
password fields, or you can choose to
credentials_file that is read from disk (username on first
line, password on second line). Note that the credentials file is not
secure: It just allows you to share your notebook without also supplying
spy.login(url='http://localhost:34216', firstname.lastname@example.org', password='DataLab!')
If your organization is configured to use LDAP or Windows Authentication
where you have a corporate username and password, it may be necessary to
specify the authentication directory. This is the name seen in the
Directory dropdown on the Seeq login page, use it for the
directory argument like so:
spy.login(url='http://localhost:34216', email@example.com', password='DataLab!', directory='Seeq')
If your organization uses OAuth 2 (e.g. Azure ActiveDirectory) single sign-on or password-less (e.g. smart card-based) Windows Authentication, you will need to use an Access Key to log in. Please read the Access Key documentation for information on how to create one. Once you have created the Access Key, use it like so:
spy.login(url='http://localhost:34216', access_key='LNXqmeT5SX-PA-grV7-IfQ', password='Wma3XlW6CM3c4Y2X8UiQnbcDYUwaEh')
In Seeq Server R22.0.49.XX and earlier, the Access Key is only valid
for a set amount of time as specified in the server Administation
page’s Configuration tab, specifically the
Authentication/AccessKey/ValidityWithoutUserLogin setting. The
default is 1 day. The validity time is measured from the time of last
login. If you have not logged out (it’s important that you log out!)
and then log back in to Seeq Workbench within the specified timeframe,
you will need to do so to “reset” the validity period.
In Seeq Server R50.0.0 and later, the Access Key validity period is more lenient. The validity expiration time is measured from the time that you closed all your active Seeq Workbench browser tabs. In other words, if you keep a Seeq Workbench tab open somewhere, your access key will remain valid, and once you close your tab, it will still remain valid for the time specified in the setting described above.
If you wish to use an Access Key in conjunction with
credentials_file, put the Access Key on the first line and the
Password on the second line.
If you are using a secure connection (https), the root certificate in
the SSL certificate chain used by the Seeq Server must be recognized by
certifi library. If not, you’ll need to add
ignore_ssl_errors=True with your
spy.login call. Be warned that
this will mean your connection is potentially insecure and vulnerable to
If you are using Seeq Data Lab, you can potentially put the
seeq-cert.pem files from Seeq Server in Seeq
<global_folder>/keys folder. The certificate file must
contain the full unbroken certificate chain in order to work correctly.
If your organization uses a proxy server for Internet access, SPy will
automatically look at the
variables and use them if specified. Alternatively, you can supply an
proxy='http://myproxyserver:8088' to your
spy.login call to specify it directly. If you specify
proxy=None, then the
variables will be ignored.
All SPy functions have detailed documentation to help you use them. Just
help(spy.<func>) like you see below.