Package: seeq-spy
Theseeq-spyPython module is the recommended programming interface for interacting with the Seeq Server.Use of this module requires aSeeq Data Lab license.Documentation can be found athttps://python-docs.seeq.com.The SeeqSPymodule is a friendly set of functions that are optimized for use withJupyter,PandasandNumPy.The SPy module is the best choice if you're trying to do any of the following:Search for signals, conditions, scalars, assetsPull data out of SeeqImport data in a programmatic way (when Seeq Workbench'sCSV Importcapability won't cut it)Calculate new data in Python and push it into SeeqCreate an asset modelProgrammatically create and manipulate Workbench Analyses or Organizer TopicsUse of the SPy module requires Python 3.7 or later.SPy version 187 and higher is compatible with Pandas 2.x.To start exploring the SPy module, execute the following lines of code in Jupyter:from seeq import spy
spy.docs.copy()Your Jupyter folder will now contain aSPy Documentationfolder that has aTutorialandCommand Referencenotebook that will walk you through common activities.For more advanced tasks, you may need to use theseeq.sdkmodule directly as described athttps://pypi.org/project/seeq.Upgrade ConsiderationsTheseeq-spymodule can/should be upgraded separately from the mainseeqmodule by doingpip install -U seeq-spy. It is written to be compatible with Seeq Server version R60 and later.DataFrame MetadataInSPy v183and later, the DataFrame metadata that is described in theProperties stored in the output DataFramesection of thespy.search.ipynbdocumentation notebook has been moved into a top-levelspynamespace on the
DataFrame (as opposed to each variable being at the top level). For example, in order to access the function name that
was used to produce the DataFrame, you would usesearch_df.spy.funcinstead of justsearch_df.func. This change was
made to avoid collisions with native DataFrame properties and functions.spy.assetsInSPy v183and later,spy.assets.build()conducts the build process in two passes instead of one. This generally
has no repercussions for your Asset- or Mixin-derived classes, but you will notice that@Asset.Component-decorated functions are called twice per asset. In the first pass, the framework is expecting the
component asset classes to be instantiated, and in the second pass it is expecting all attributes to be evaluated and
built. This new behavior generally does not require you to make any changes to your classes, with one exception: If you
were using@Asset.Componentas a means by which you could generate multiple signals/conditions/scalars/metrics from a
single function, you should instead use@Asset.Attributeto achieve that.spy.workbooksInSeeq Server R22.0.49.00, the ability to schedule the update of an Organizer Topic was added. As a result, much of
the internals of how Organizer Topic embedded content and date ranges are represented changed.If you have usedspy.workbooks.save()in R22.0.48.XX and earlier to save a set of Organizer Topic workbooks to disk,
you will not be able to use those files in R22.0.49.00 and later.Live Docs must now be specified by ascheduleon theTopicDocumentobject. The@Asset.DateRangedecorator no longer honors theAuto Refresh Rateproperty. To specify a Live Doc, you must specify ascheduledict for a TopicDocument by settingdocument.schedule['Background'] = Falseand then specifying a Cron
expression likeschedule['Cron Schedule'] = ['*/30 * * * * *'](every thirty seconds). Alternatively, you can specify
a Scheduled Doc by settingdocument.schedule['Background'] = True.