PIconnect.PIAF module#

class PIconnect.PIAF.PIAFDatabase(server: str | None = None, database: str | None = None)#

Bases: object

Context manager for connections to the PI Asset Framework database.

servers Dictionary of known servers, as reported by the SDK#
default_server Default server, as reported by the SDK#
property children: Dict[str, PIAFElement]#

Return a dictionary of the direct child elements of the database.

property database_name: str#

Return the name of the connected PI AF database.

descendant(path: str) PIAFElement#

Return a descendant of the database from an exact path.

event_frames(start_time: str | datetime = '', start_index: int = 0, max_count: int = 1000, search_mode: EventFrameSearchMode = EventFrameSearchMode.FORWARD_FROM_START_TIME, search_full_hierarchy: bool = False) Dict[str, PIAFEventFrame]#

Search for event frames in the database.

search(query: str | List[str]) List[PIAFAttribute]#

Search PIAFAttributes by element|attribute path strings.

Return a list of PIAFAttributes directly from a list of element|attribute path strings

like this:

list(“BaseElement/childElement/childElement|Attribute|ChildAttribute|ChildAttribute”, “BaseElement/childElement/childElement|Attribute|ChildAttribute|ChildAttribute”)

property server_name: str#

Return the name of the connected PI AF server.

property tables: Dict[str, PIAFTable]#

Return a dictionary of the tables in the database.

version = '0.3.0'#
class PIconnect.PIAF.PIAFElement(element: ElementType)#

Bases: PIAFBaseElement[AFElement]

Container for PI AF elements in the database.

property attributes: Dict[str, PIAFAttribute]#

Return a dictionary of the attributes of the current element.

property categories: AFCategories#

Return the categories of the current element.

property children: Dict[str, PIAFElement]#

Return a dictionary of the direct child elements of the current element.

descendant(path: str) PIAFElement#

Return a descendant of the current element from an exact path.

property description: str#

Return the description of the current element.

property name: str#

Return the name of the current element.

property parent: PIAFElement | None#

Return the parent element of the current element, or None if it has none.

version = '0.1.0'#
PIconnect.PIAF.PIAFAttribute#

alias of <module ‘PIconnect.PIAFAttribute’ from ‘/home/docs/checkouts/readthedocs.org/user_builds/piconnect/checkouts/v0.12.0/PIconnect/PIAFAttribute.py’>

class PIconnect.PIAF.PIAFTable(table: AFTable)#

Bases: object

Container for PI AF Tables in the database.

property columns: List[str]#

Return the names of the columns in the table.

property data: <MagicMock id='140363395551680'>#

Return the data in the table as a pandas DataFrame.

property name: str#

Return the name of the table.

property shape: tuple[int, int]#

Return the shape of the table.