API Reference

ESP

The ESP class is used to create the connection to the ESP server. Once you have a connection to the server, you can query it for information about projects (running and stopped) and the server itself. You can also create, load, start, stop, and delete projects.

Other objects in the server can also be introspected such as windows, events, loggers, MAS modules, routers, and algorithms.

Finally, you can also save and reload server configurations, as well as shut the server down.

Constructor

ESP([hostname, port, username, password, …])

ESP Connection

Server Methods

These methods correspond to server configuration and shutting down.

ESP.save(self[, path])

Save the server state

ESP.reload(self)

Reset the server model to the model used at startup

ESP.shutdown(self)

Shutdown the server

Project Methods

The project methods allow you to adminster projects.

ESP.create_project(self, proj, \*\*kwargs)

Create a new Project object

ESP.load_project(self, project[, name, …])

Load a project from a project definition

ESP.install_project(self, project[, name, …])

Load a project from a project definition

ESP.get_project_stats(self[, filter, …])

Project statistics subscriber

ESP.get_project(self, name)

Retrieve the specified project

ESP.get_projects(self[, name, filter])

Retrieve projects from the server

ESP.start_project(self, name)

Start specified project

ESP.start_projects(self[, name, filter])

Start projects

ESP.stop_project(self, name)

Stop specified project

ESP.stop_projects(self[, name, filter])

Stop projects

ESP.delete_project(self, name)

Delete specified project

ESP.delete_projects(self, \*name, \*\*kwargs)

Delete projects

ESP.get_running_project(self, name)

Retrieve the specified running project

ESP.get_running_projects(self[, name, filter])

Retrieve running project information

ESP.get_stopped_project(self, name)

Retrieve specified stopped project

ESP.get_stopped_projects(self[, name, filter])

Retrieve stopped projects

ESP.validate_project(self, project)

Validate project definition

The get_project_stats() method returns an object which subscribes to the project statistics: ProjectStats. The stats attribute of that object is a pandas.DataFrame of the current statistics.

Window Methods

ESP.get_window(self, path)

Retrieve specified window

ESP.get_windows(self[, path, type, filter])

Retrieve windows from the server

Event Methods

ESP.get_events(self[, window_filter, …])

Retrieve events from the server

ESP.get_pattern_events(self[, …])

Retrieve events residing in open patterns in the server

ESP.get_event_generator_state(self, name)

Retrieve the state of the specified event generator

ESP.get_event_generators(self)

Retrieve all event generators in the server

Logging Methods

ESP.get_logger(self, name)

Retrieve the specified logger

ESP.get_loggers(self)

Retrieve all loggers in the system

ESP.enable_server_log_capture(self)

Enable capturing of server log messages

ESP.disable_server_log_capture(self)

Disable capturing of server log messages

ESP.get_server_log(self)

Return all stored server log messages

ESP.get_server_log_state(self)

Return the current state of the server log capture

MAS Module Methods

ESP.get_mas_modules(self[, expandcode])

Retrieve all MAS modules

Router Methods

ESP.create_router(self[, name, overwrite])

Create a new router

ESP.get_router(self, name)

Retrieve the specified router

ESP.get_routers(self)

Retrieve all routers in the server

ESP.get_router_stats(self[, name])

Retrieve router statistics

Event Generator Methods

ESP.create_event_generator(self, window[, …])

Create an event generator

ESP.delete_event_generator(self, name)

Delete the specified event generator

ESP.delete_event_generators(self)

Delete all event generators in the server

Algorithm Methods

ESP.get_algorithm(self, atype, name)

Retrieve information for the specified algorithm

ESP.get_algorithms(self, atype[, …])

Retrieve information for all algorithms of the specified type

Project Definitions

The classes in this section allow you to programmatically create projects. Once you have a Project object, you can load it in the server and administer it.

Projects

Project([name, n_threads, pubsub, …])

ESP Project

Project.get_stats(self[, interval, min_cpu, …])

Retrieve project statistics subscriber

Project.start(self)

Start the project

Project.stop(self)

Stop the project

Project.save(self[, path])

Save the project

Project.restore(self[, path])

Restore the project

Project.update(self, project)

Update project definition

Project.delete(self)

Delete the project

Project.copy(self[, deep])

Return a copy of the object

Project.sync(self[, overwrite, start, …])

Sync the project definition to the server

Project.validate(self)

Validate the project definition

Project.get_window(self, path)

Retrieve specified window

Project.get_windows(self[, path, type, filter])

Retrieve windows from the server

Project.get_mas_module(self, name[, expandcode])

Retrieve specified MAS modules

Project.get_mas_modules(self[, expandcode])

Retrieve all MAS modules

Project.from_xml(data[, session])

Create project from XML definition

Project.to_xml(self[, pretty])

Export project definition to XML

Project.save_xml(self, dest[, mode, pretty])

Save the project XML to a file

Project.to_graph(self[, graph, schema, …])

Export project definition to graphviz.Digraph

Project Construction Methods

Project.add_query(self, contquery)

Add a continuous query object

Project.add_continuous_query(self, contquery)

Add a continuous query object

Project.add_contquery(self, contquery)

Add a continuous query object

Project.add_template(self, template[, contquery])

Add a template object

Project.add_templates(self, \*templates)

Add one or more templates to the project

Project.add_window(self, window[, contquery])

Add a window to the project

Project.add_edge(self, source, targets)

Add connector edges

Project.add_connectors(self, group_name, …)

Add connectors to a group

Project.start_connectors(self)

Start the connectors for the project

Project.create_mas_module(self, language, …)

Create a MAS module object

Project.replace_mas_module(self, name, module)

Replace the specified MAS module

Dictionary Methods

Project.clear(self)

Project.get(self, key[, default])

Project.items(self)

Project.keys(self)

Project.pop(self, key[, default])

If key is not found, d is returned if given, otherwise KeyError is raised.

Project.popitem(self)

as a 2-tuple; but raise KeyError if D is empty.

Project.setdefault(self, key[, default])

Project.values(self)

Continuous Queries

ContinuousQuery([name, trace, index_type, …])

Continuous Query

ContinuousQuery.add_template(self, template)

Add a template object

ContinuousQuery.delete_template(self, …)

Delete templates and related windows

ContinuousQuery.delete_templates(self, …)

Delete templates and related windows

ContinuousQuery.get_window(self, name)

Retrieve specified window

ContinuousQuery.get_windows(self[, name, …])

Retrieve windows from the server

ContinuousQuery.add_window(self, window)

Add a window to the continuous query

ContinuousQuery.add_windows(self, \*windows)

Add one or more windows to the continuous query

ContinuousQuery.rename_window(self, window, …)

Rename a window and update targets

ContinuousQuery.delete_window(self, \*windows)

Delete windows and update targets

ContinuousQuery.delete_windows(self, \*windows)

Delete windows and update targets

ContinuousQuery.copy(self[, deep])

Return a copy of the object

ContinuousQuery.from_xml(data[, project, …])

Create continous query from XML definition

ContinuousQuery.to_xml(self[, pretty])

Export continuous query definition to XML

ContinuousQuery.save_xml(self, dest[, mode, …])

Save the continuous query XML to a file

ContinuousQuery.to_graph(self[, graph, …])

Export continuous query definition to graphviz.Digraph

Templates

Template(name[, trace, index_type, …])

ESP Template

Template.TextEmbedding(template_name, \*\*kwargs)

Create a TextEmbedding template

Template.Logistic(template_name, \*\*kwargs)

Create a Logistic template

Template.ObjectDetection(template_name, …)

Create a ObjectDetection template

Template.KeypointsDetection(template_name, …)

Create a KeypointsDetection template

Template.add_input_windows(self, \*windows)

Add input_windows

Template.delete_input_windows(self, \*windows)

Delete input_windows

Template.add_output_windows(self, \*windows)

Add output_windows

Template.delete_output_windows(self, \*windows)

Delete output_windows

Template.set_parameters(self, window, …)

Set parameters

Template.set_inputs(self[, window, model])

Set inputs

Template.set_outputs(self[, window, model])

Set outputs

Template.add_target(self, obj, \*\*kwargs)

Add target for Template

Template.delete_target(self, \*objs)

Delete targets for Template

Template.add_window(self, window)

Add a window to the template

Template.add_windows(self, \*windows)

Add one or more windows to the template

Template.import_template(self, template[, …])

import a template object

Template.rename_window(self, window, newname)

Rename a window and update targets

Template.delete_window(self, \*windows)

Delete windows and update targets

Template.delete_windows(self, \*windows)

Delete windows and update targets

Template.copy(self, name[, deep, internal_only])

Return a copy of the template

Template.from_xml(data, template_name[, …])

Create template from XML definition

Template.to_xml(self[, pretty, template])

Export template definition to XML

Template.save_xml(self, dest[, mode, pretty])

Save the template XML to a file

Template.to_graph(self[, graph, schema, detail])

Export template definition to graphviz.Digraph

Windows

Base Window Methods

The base window class is an abstract class that defines methods used by all window classes. It should not be instantiated directly. The common methods are described below.

Window Constructor

Window([name, pubsub, description, …])

Standard ESP Window

Monitoring

Window.enable_tracing(self)

Enable console tracing for the window

Window.disable_tracing(self)

Disable console tracing for the window

Creating Events

Window.create_event_generator(self[, data, …])

Create an event generator

Window.create_publisher(self[, blocksize, …])

Create a publisher for the given window

Window.publish_events(self, data[, …])

Publish events to the window

Retrieving Events

Window.subscribe(self[, mode, pagesize, …])

Subscribe to events

Window.unsubscribe(self)

Stop event processing

Window.create_subscriber(self[, mode, …])

Create a new websocket subscriber for the window

Window.get_events(self[, filter, sort_by, limit])

Retrieve events from the window

Window.get_pattern_events(self[, sort_by, limit])

Retrieve events residing in open patterns in the window

Transforming Events

Window.add_event_transformer(self, method, …)

Add an transformer to apply for each event

Window.apply_transformers(self, data)

Apply current set of data transformers to given data

Plotting

Window.streaming_bar(self, x, y[, steps, …])

Display a streaming bar plot in a Jupyter notebook

Window.streaming_hbar(self, x, y[, steps, …])

Display a streaming horizontal bar plot in a Jupyter notebook

Window.streaming_hist(self[, centers, …])

Display a streaming histogram in a Jupyter notebook

Window.streaming_line(self, x, y[, steps, …])

Display a streaming line plot in a Jupyter notebook

Window.streaming_area(self, x, y[, steps, …])

Display a streaming area plot in a Jupyter notebook

Window.streaming_scatter(self, x, y[, …])

Display a streaming scatter plot in a Jupyter notebook

Window.streaming_bubble(self, x, y, radius)

Display a streaming bubble plot in a Jupyter notebook

Window.streaming_scatter(self, x, y[, …])

Display a streaming scatter plot in a Jupyter notebook

Window.streaming_donut(self, x, y[, steps, …])

Display a streaming donut plot in a Jupyter notebook

Window.streaming_pie(self, x, y[, steps, …])

Display a streaming pie plot in a Jupyter notebook

Window.streaming_images(self, image_col[, …])

Display streaming images in a Jupyter notebook

Project Construction

Window.add_connector(self, conn_cls[, …])

Add a connector to the window

Window.add_target(self, \*windows[, auto_schema])

Add windows as targets

Window.add_targets(self, \*windows[, …])

Add windows as targets

Window.delete_target(self, \*windows)

Remove windows as targets

Window.delete_targets(self, \*windows)

Remove windows as targets

Window.add_schema_field(self, name, type[, key])

Add a schema field

Window.delete_schema_field(self, \*fields)

Delete schema fields

Window.set_key(self, \*fields[, propagation])

Set schema fields as key

Window.set_finalized_callback(self, name, …)

Set Finalized Callback

Window.set_splitter_plugin(self, name, function)

Set splitter function using a shared library and function name

Window.set_splitter_expr(self, expr[, …])

Set expression to direct events to one of n different output slots

Utilities

Window.copy(self[, deep])

Return a copy of the object

Window.from_xml(data[, contquery, project, …])

Construct window from XML definition

Window.to_xml(self[, pretty, query])

Export window definition to XML

Window.save_xml(self, dest[, mode, pretty])

Save the window XML to a file

Window.to_graph(self[, graph, schema])

Export window definition to graphviz.Digraph

Source Windows

SourceWindow([name, schema, index_type, …])

Source Window

SourceWindow.set_retention(self, type, value)

Retention

Calculation Windows

CalculateWindow([name, schema, pubsub, …])

Calculation Window

CalculateWindow.set_parameters(self, …)

Set parameters

CalculateWindow.set_inputs(self, \*\*kwargs)

Set input map fields

CalculateWindow.set_outputs(self, \*\*kwargs)

Set output map fields

CalculateWindow.add_mas_window_map(self, …)

Add MAS Window Map

Aggregation Windows

AggregateWindow([name, schema, pubsub, …])

Aggregate window

AggregateWindow.add_field_expr(self, \*expr)

Add aggregate field expression

AggregateWindow.add_field_expression(self, …)

Add aggregate field expression

AggregateWindow.add_field_exprs(self, \*expr)

Add aggregate field expression

AggregateWindow.add_field_expressions(self, …)

Add aggregate field expression

AggregateWindow.add_field_plugin(self, …)

Add aggregate field plugin

Computation Windows

ComputeWindow([name, schema, pubsub, …])

Compute window

ComputeWindow.add_field_expr(self, \*expr)

Add new field expressions

ComputeWindow.add_field_exprs(self, \*expr)

Add new field expressions

ComputeWindow.add_field_expression(self, \*expr)

Add new field expressions

ComputeWindow.add_field_expressions(self, \*expr)

Add new field expressions

ComputeWindow.add_field_plugin(self, plugin, …)

Add a field plugin

ComputeWindow.set_context_plugin(self, name, …)

Set a context plugin

ComputeWindow.set_expr_initializer(self[, …])

Set initialization expression

ComputeWindow.set_expression_initializer(self)

Set initialization expression

Copying Windows

CopyWindow([name, pubsub, description, …])

Copy window

CopyWindow.set_retention(self, type, value)

Retention

Counting Windows

CounterWindow([name, pubsub, description, …])

Counter window

Filtering Windows

FilterWindow([name, pubsub, description, …])

Filter window

FilterWindow.set_expr_initializer(self[, …])

Set initialization expression

FilterWindow.set_expression_initializer(self)

Set initialization expression

FilterWindow.set_expression(self, expr)

Set the expression

FilterWindow.set_plugin(self, name, function)

Set plugin

Functional Windows

FunctionalWindow([name, schema, pubsub, …])

Functional window

FunctionalWindow.set_function_context_expressions(…)

Set expressions

FunctionalWindow.set_function_context_properties(…)

Set properties

FunctionalWindow.set_function_context_functions(…)

Set functions

FunctionalWindow.add_regex_event_loop(self, …)

Add a Regex Event Loop

FunctionalWindow.add_xml_event_loop(self, …)

Add an XML Event Loop

FunctionalWindow.add_json_event_loop(self, …)

JSON Event Loop

FunctionalWindow.create_function_context(self)

Create a new function context for use in event loops

The FunctionalWindow.create_function_context() method returns a FunctionConext instance with the following methods.

FunctionContext([expressions, functions])

Function Context

FunctionContext.set_expressions(self, \*\*kwargs)

Set expressions

FunctionContext.set_properties(self, …)

Set properties

FunctionContext.set_functions(self, \*\*kwargs)

Set functions

Geofence Windows

GeofenceWindow([name, pubsub, description, …])

Geofence window

GeofenceWindow.set_geometry(self[, …])

Set geometry parameters

GeofenceWindow.set_position(self[, …])

Set position parameters

GeofenceWindow.set_output(self[, …])

Set output parameters

ObjectTrackerWindow([name, pubsub, description])

Object Tracker window

ObjectTrackerWindow.set_tracker(self[, …])

ObjectTrackerWindow.set_output(self[, mode, …])

Set the tracker output

ObjectTrackerWindow.set_input_rect(self[, …])

Set the tracker input

ObjectTrackerWindow.set_input_yolo(self[, …])

Set the tracker input

ObjectTrackerWindow.set_input_coco(self[, …])

Set the tracker input

Joining Windows

JoinWindow([name, pubsub, description, …])

Join window

JoinWindow.set_expression_initializer(self)

Set initialization expression

JoinWindow.add_condition(self, left, right)

Add a join condition

JoinWindow.add_field_expr(self, name, expr)

Add a field expression

JoinWindow.add_field_expression(self, name, expr)

Add a field expression

JoinWindow.add_expr(self, names[, type])

Add an expression

JoinWindow.add_expression(self, names[, type])

Add an expression

JoinWindow.add_field_selection(self, name, …)

Add a field selection

JoinWindow.add_selection(self, selection[, …])

Add a selection

JoinWindow.add_field_plugin(self, name, …)

Add a field plugin

JoinWindow.set_expr_initializer(self[, …])

Set initialization expression

Miscellaneous Windows

RemoveStateWindow([remove, add_log_fields, …])

RemoveStateWindow Window

TransposeWindow([mode, tag_name, …])

Transpose Window

Model Reading Windows

ModelReaderWindow([name, pubsub, …])

Model reader window

Model Supervisor Windows

ModelSupervisorWindow([name, pubsub, …])

Model supervisor window

Notification Windows

NotificationWindow([name, schema, pubsub, …])

Notification window

NotificationWindow.set_smtp_settings(self, host)

Set the SMTP server settings

NotificationWindow.add_email(self, sender, …)

Add an email notifier

NotificationWindow.add_sms(self, sender, …)

Add an SMS notifier

NotificationWindow.add_mms(self, sender, …)

Add an SMS notifier

NotificationWindow.set_function_context_expressions(…)

Set expressions

NotificationWindow.set_function_context_properties(…)

Set properties

NotificationWindow.set_function_context_functions(…)

Set functions

Pattern Windows

PatternWindow([name, schema, pubsub, …])

Pattern window

PatternWindow.create_pattern(self[, name, …])

Create Pattern object and add it to the patterns list

The patterns attribute of PatternWindow contains Pattern objects which have the following methods.

Pattern.add_event(self, source, name, expr)

Add a Pattern Event

Pattern.set_logic(self, expr)

Set logic expression

Pattern.add_field_expression(self, expr[, node])

Add a Pattern Field Expression

Pattern.add_field_selection(self, node, name)

Add a Pattern Field Selection

Pattern.add_timefield(self, field, source)

Add a Pattern Time Field

Procedural Windows

ProceduralWindow([name, schema, pubsub, …])

Procedural window

ProceduralWindow.add_cxx_plugins(self, …)

Add a C++ Plugin

ProceduralWindow.set_cxx_plugin_context(…)

Set C++ Plugin Context

ProceduralWindow.add_cxx_plugin(self, …)

Add a C++ Plugin

ProceduralWindow.add_ds_external(self, source)

Add a DS External

Scoring Windows

ScoreWindow([name, schema, pubsub, …])

Score window

ScoreWindow.set_inputs(self, model, \*\*kwargs)

Set model inputs

ScoreWindow.set_outputs(self, model, \*\*kwargs)

Set model outputs

ScoreWindow.add_online_model(self, algorithm)

Online model

ScoreWindow.add_offline_model(self[, …])

Offline model

ScoreWindow.import_schema_from_astore_output(…)

Import a schema from the astore CAS action output format

Text Category Windows

TextCategoryWindow([name, pubsub, …])

Text category window

Text Context Windows

TextContextWindow([name, pubsub, …])

Text context window

Text Sentiment Windows

TextSentimentWindow([name, pubsub, …])

Text sentiment window

Text Topic Windows

TextTopicWindow([name, pubsub, description, …])

Text topic window

Training Windows

TrainWindow([name, pubsub, description, …])

Train window

TrainWindow.set_inputs(self, \*\*kwargs)

Set input map fields

TrainWindow.set_parameters(self, \*\*parameters)

Set parameters

Union Windows

UnionWindow([name, pubsub, description, …])

Union window

Python Helpers

PythonHelper([name, schema, pubsub, …])

Python Window

PythonHelper.add_mas_info(self, module_name, …)

Add the information needed to create a MAS module and add MAS window map.

Keras Helpers

KerasHelper([name, schema, pubsub, …])

Keras Window

KerasHelper.add_model_info(self, model_name, …)

Add the information of a Keras model

Tensorflow Helpers

TensorflowHelper([name, schema, pubsub, …])

Tensorflow Window

TensorflowHelper.add_model_info(self, …[, …])

Add the information of a Tensorflow model

JMP Helpers

JMPHelper([name, schema, pubsub, …])

JMP Window

JMPHelper.add_model_info(self, model_name, …)

Add the information of a JMP model

Schemas

Schema(*args, **kwargs)

Schema definition

Schema.add_field(self, name, type[, key])

Add a schema field

Schema.from_xml(data[, session])

Create schema from XML definition

Schema.to_xml(self[, pretty])

Export schema definition to XML

Schema.from_schema_string(data[, session])

Create schema from schema-string element

Schema.from_string(data[, session])

Create schema from string definition

Schema Fields

SchemaField(name, type[, key])

Schema field

Schema.from_xml(data[, session])

Create schema from XML definition

Schema.to_xml(self[, pretty])

Export schema definition to XML

Subscriber

Subscriber objects are returned by the Window.create_subscriber() method. They are used to subscribe to event streams.

Subscriber(window[, mode, pagesize, filter, …])

Create a subscriber for the given window

Subscriber.start(self)

Initialize the web socket and start it in its own thread

Subscriber.stop(self)

Stop processing events and close the web socket

Subscriber.close(self)

Stop processing events and close the web socket

Publisher

Publisher objects are returned by the Window.create_publisher() method. They are used to publish events.

Publisher(window[, blocksize, rate, pause, …])

Create a publisher for the given window

Publisher.send(self, data)

Send data to the web socket

Publisher.close(self)

Close the web socket connection

Streaming Charts

Streaming charts are a wrapper around Chart.js charts which include features for making animated figures in a Jupyter notebook easier.

StreamingChart(data[, title, x_axis_label, …])

Streaming Chart

StreamingChart.area(self, x, y[, label, …])

Create an area chart

StreamingChart.bar(self, x, y[, label, …])

Create a bar chart

StreamingChart.hbar(self, x, y, \*\*kwargs)

Create a horizontal bar chart

StreamingChart.bubble(self, x, y, radius[, …])

Create a bubble chart

StreamingChart.line(self, x, y[, label, …])

Create a line chart

StreamingChart.scatter(self, x, y[, label, …])

Create a scatter chart

StreamingChart.pie(self, x, y[, line_color, …])

Create a pie chart

StreamingChart.donut(self, x, y[, …])

Create a donut chart

StreamingChart.doughnut(self, x, y[, …])

Create a donut chart

Streaming Images

Streaming images allow you to view a series of images in a Jupyter notebook cell.

StreamingImages(data_callback[, image_key, …])

Streaming Images

Chart Layouts

Chart layouts allow you to create complex layouts of multiple streaming chart and image components. These layouts will display in a single output cell in a Jupyter notebook. All of the components in the layout are controlled from a single set of transport buttons.

ChartLayout(*layout, **kwargs)

Create a layout of charts / images

Event Generators

EventGenerator([name, insert_only, …])

Event generator

EventGenerator.add_initializers(self, \*\*kwargs)

Add values to initialize when event generator starts

EventGenerator.add_fields(self, \*\*kwargs)

Add fields to generate

EventGenerator.add_map_resources(self, …)

Add map resources

EventGenerator.add_list_resources(self, …)

Add list resources

EventGenerator.add_set_resources(self, …)

Add set resources

EventGenerator.add_map_url_resources(self, …)

Add map URL resources

EventGenerator.add_list_url_resources(self, …)

Add list URL resources

EventGenerator.add_set_url_resources(self, …)

Add set URL resources

EventGenerator.start(self[, events, …])

Start the generator

EventGenerator.stop(self)

Stop the event generator

EventGenerator.initialize(self)

Initialize the event generator

EventGenerator.delete(self)

Delete the event generator

EventGenerator.save(self[, overwrite, name])

Save the event generator

EventGenerator.from_xml(data[, session])

Create event generator from XML definition

EventGenerator.to_xml(self[, pretty])

Export the event generator definition to XML

Loggers

Logger([name, level])

Server logger

Logger.set_level(self, level)

Set the log level

MAS Modules

MASModule(language, module, func_names[, …])

MAS Module

MASModule.save(self[, path])

Save the module

MASModule.from_xml(data[, session])

Create MAS module from XML definition

MASModule.to_xml(self[, pretty])

Convert MAS module to XML definition

Routers

Router

Router([name])

Router definition

Router.add_engine(self, host, port[, name, …])

Add a new router engine

Router.add_publish_destination(self, target)

Add a new router publish destination

Router.add_writer_destination(self, …[, …])

Add a new router writer destination

Router.add_route(self, route, to[, name, …])

Add a new route

Router.save(self[, overwrite])

Save the router definition to the server

Router.delete(self)

Delete the router

Router.initialize_destination(self, name)

Initalize router destination

Router.from_xml(data[, session])

Create router from XML definition

Router.to_xml(self[, pretty])

Convert Router to XML definition

Engine

Note

Engine objects are typically instantiated using the Router.add_engine() method.

Engine(host, port[, name, auth_token, …])

ESP Engine Configuration

Engine.to_element(self)

Engine.to_xml(self[, pretty])

PublishDestination

Note

PublishDestination objects are typically instantiated using the Router.add_publish_destination() method.

PublishDestination(target[, name, opcode, …])

Router Publish Destination

PublishDestination.initialize(self)

Initialize the destination

PublishDestination.to_element(self)

Convert destination to Element definition

PublishDestination.to_xml(self[, pretty])

Convert destination to XML definition

WriterDestination

Note

WriterDestination objects are typically instantiated using the Router.add_writer_destination() method.

WriterDestination(file_func, format[, name, …])

Route Writer Destination

WriterDestination.initialize(self)

Initialize the destination

WriterDestination.to_element(self)

Convert the destination to an Element definition

WriterDestination.to_xml(self[, pretty])

Convert the destination to an XML definition

Route

Note

Route objects are typically instantiated using the Router.add_route() method.

Route(route, to[, name, snapshot])

Parameters

Route.to_element(self)

Convert Route to an Element definition

Route.to_xml(self[, pretty])

Convert Route to an XML definition

Connectors

The Connector class is the base class for all connectors.

Connector(conncls[, type, name, is_active, …])

Window connector

Connector.set_properties(self, \*\*kwargs)

Set connector properties

Connector.to_xml(self[, pretty])

Export connector definition to XML

The following connectors are concrete implementations of the connectors available to ESP.

BacnetPublisher([bacnetbbmdaddress, …])

Publish Bacnet events

AdapterPublisher(command[, url, name, is_active])

Publish using an adapter

AdapterSubscriber(command[, url, name, …])

Subscribe using an adapter

DatabasePublisher([connectstring, name, …])

Subscribe events to a database

DatabaseSubscriber([connectstring, …])

Subscribe to database events

FilePublisher([fsname, fstype, name, …])

Publish events from a file

FileSubscriber([fsname, fstype, name, …])

Subscribe to events from a file

SocketPublisher([port, fstype, name, …])

Publish events from a socket

SocketSubscriber([host, port, fstype, name, …])

Subscribe to events from a socket

KafkaSubscriber([kafkahostport, kafkatopic, …])

Subscribe to events from a Kafka broker

KafkaPublisher([kafkahostport, kafkatopic, …])

Publish events to a Kafka broker

MQTTSubscriber([mqtthost, mqttclientid, …])

Subscribe to MQ Telemetry Transport (MQTT)

MQTTPublisher([mqtthost, mqttclientid, …])

Subscribe to MQ Telemetry Transport (MQTT)

ModbusSubscriber(modbus[, name, is_active, …])

Subscribe to Modbus events

ModbusPublisher(modbus[, name, is_active, …])

Publish Modbus events

NuregoSubscriber([serviceurl, certificate, …])

Subscribe to Nurego metering window

OPCUASubscriber([opcuaendpoint, name, …])

Subscribe to OPC-UA operations

OPCUAPublisher([opcuaendpoint, name, …])

Publish OPC-UA operations

PISubscriber([afelement, iselementtemplate, …])

Subscribe to operations from a PI Asset Framework (AF) server

PIPublisher([afelement, iselementtemplate, …])

Publish operations to a PI Asset Framework (AF) server

ProjectPublisher([srcproject, …])

ESP window event publisher

PylonPublisher([name, is_active, …])

Publish Basler GigE camera captured frames

RabbitMQSubscriber([rmqhost, rmqport, …])

Subscribe to Rabbit MQ events

RabbitMQPublisher([rmqhost, rmqport, …])

Publish Rabbit MQ events

SMTPSubscriber([smtpserver, sourceaddress, …])

Subscribe to Simple Mail Transfer Protocol (SMTP) events

SnifferPublisher([interface, protocol, …])

Publish local area network packet events

SolaceSubscriber([solhostport, soluserid, …])

Subscribe to Solace events

SolacePublisher([solhostport, soluserid, …])

Publish events to Solace

TeradataSubscriber([tdatatdpid, …])

Subscribe to Teradata operations

TeradataListenerSubscriber(ingestUrl, …[, …])

Subscribe to Teradata Listener events

TervelaSubscriber([tvaprimarytmx, …])

Subscribe to Tervela Data Fabric events

TervelaPublisher([tvaprimarytmx, tvauserid, …])

Subscribe to Tervela Data Fabric events

TibcoSubscriber([tibrvsubject, tibrvtype, …])

Subscribe to Tibco Rendezvous (RV) events

TibcoPublisher([tibrvsubject, tibrvtype, …])

Subscribe to Tibco Rendezvous (RV) events

TimerPublisher([basetime, interval, unit, …])

Publish events on regular intervals

URLPublisher(configUrl[, name, is_active, …])

Publish URL events

UVCPublisher([name, is_active, frame_rate, …])

Publish photos taken by a V4L2 compatible

WebSocketPublisher(url, configUrl, contentType)

Publish websocket events

WebSphereMQSubscriber([mqtype, name, …])

Subscribe to IBM WebSphere MQ events

WebSphereMQPublisher([mqtype, name, …])

Publish IBM WebSphere MQ events

Algorithms

Algorithm([name, reference, algorithm_type, …])

Base class for all ESP algorithms

Algorithm.from_xml(data[, session])

Create algorithm object from XML definition

Project Statistics

The ProjectStats class subscribes to the statistics stream on the server. It acts like a pandas.DataFrame and contains the current project statistics.

ProjectStats(session[, filter, interval, …])

Project statistics subscriber

ProjectStats.start(self)

Initialize the web socket and start it in its own thread

ProjectStats.stop(self)

Stop processing events and close the web socket

ProjectStats.close(self)

Stop processing events and close the web socket

Configuration Options

The options object at the top-level of the package allows you to get and set options as attributes. For example, to set the display.image_scale option to 0.5, you would do the following:

In [1]: esppy.options.display.image_scale = 0.5

This is equivalent to:

In [2]: esppy.set_option('display.image_scale', 0.5)

You can get help for an option using the describe_option function or IPython’s help system:

In [3]: esppy.describe_option('display.image_scale')
display.image_scale : float
    Specifies the scale factor for rendering project diagrams.
    [default: 1.0] [currently: 0.5]

To get help for all options, execute describe_option without any arguments.

get_option(key)

Get the value of an option

set_option(\*args, \*\*kwargs)

Set the value of an option

describe_option(\*keys, \*\*kwargs)

Print the description of one or more options

reset_option(\*keys)

Reset one or more options back to their default value

option_context(\*args, \*\*kwargs)

Create a context for setting option temporarily