esppy.connectors.PIPublisher

class esppy.connectors.PIPublisher(afelement=None, iselementtemplate=None, name=None, is_active=None, blocksize=None, transactional=None, pisystem=None, afdatabase=None, afrootelement=None, afattribute=None, archivetimestamp=None, configfilesection=None, publishwithupsert=None, allvaluestostrings=None, maxevents=None)

Bases: esppy.connectors.base.Connector

Publish operations to a PI Asset Framework (AF) server

Parameters
afelementstring

Specifies the AF element or element template name. Wildcards are supported.

iselementtemplateboolean

Specifies that the afelement parameter is an element template name. By default, the afelement parameter specifies an element name.

blocksizeint, optional

Specifies the number of events to include in a published event block. The default value is 1.

transactionalstring, optional

Sets the event block type to transactional. The default value is normal

pisystemstring, optional

Specifies the PI system. The default is the PI system that is configured in the PI AF client.

afdatabasestring, optional

Specifies the AF database. The default is the AF database that is configured in the PI AF client.

afrootelementstring, optional

Specifies the root element in the AF hierarchy from which to search for the parameter afelement. The default is the top-level element in the AF database.

afattributestring, optional

Specifies a specific attribute in the element. The default is all attributes in the element.

archivetimestampboolean, optional

Specifies that all archived values from the specified timestamp onwards are to be published when connecting to the PI system. The default is to publish only new values.

configfilesectionstring, optional

Specifies the name of the section in the config file to parse for configuration parameters. Specify the value as [configfilesection].

publishwithupsertboolean, optional

Builds events with opcode=Upsert instead of Insert.

maxeventsint, optional

Specifies the maximum number of events to publish.

Returns
PIPublisher
__init__(self, afelement=None, iselementtemplate=None, name=None, is_active=None, blocksize=None, transactional=None, pisystem=None, afdatabase=None, afrootelement=None, afattribute=None, archivetimestamp=None, configfilesection=None, publishwithupsert=None, allvaluestostrings=None, maxevents=None)

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(self[, afelement, …])

Initialize self.

clear(self)

copy(self[, deep])

Return a copy of the object

from_element(data[, session])

Construct connector from XML definition

from_parameters(conncls[, type, name, …])

from_xml(data[, session])

Construct connector from XML definition

get(self, key[, default])

items(self)

keys(self)

pop(self, key[, default])

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

popitem(self)

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

set_properties(self, \*\*kwargs)

Set connector properties

setdefault(self, key[, default])

to_element(self)

Export connector definition to ElementTree.Element

to_xml(self[, pretty])

Export connector definition to XML

update(\*args, \*\*kwds)

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v

values(self)

Attributes

connector_key

property_defs