PIconnect.AF module#

AF - Core containers for connections to the PI Asset Framework.

class PIconnect.AF.AFDatabase(server: str | None = None, database: str | None = None)#

Bases: object

Context manager for connections to the PI Asset Framework database.

classmethod default_server() PISystem | None#

Return the default server.

classmethod servers() dict[str, PISystem]#

Return a dictionary of the known servers.

descendant(path: str) AFElement#

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, AFEventFrame]#

Search for event frames in the database.

property children: dict[str, AFElement]#

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

database#

The PI AF database connection.

property database_name: str#

Return the name of the connected PI AF database.

search: Search#

Search reference for searching objects in the database. See Search.Search for more information.

server#

The PI AF server connection.

property server_name: str#

Return the name of the connected PI AF server.

property tables: dict[str, AFTable]#

Return a dictionary of the tables in the database.

version = '0.3.0'#
class PIconnect.AF.PIAFDatabase(server: str | None = None, database: str | None = None)#

Bases: AFDatabase

Context manager for connections to the PI Asset Framework database.

Deprecated since version 1.0.0: Use AFDatabase instead.

classmethod default_server() PISystem | None#

Return the default server.

classmethod servers() dict[str, PISystem]#

Return a dictionary of the known servers.

descendant(path: str) AFElement#

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, AFEventFrame]#

Search for event frames in the database.

property children: dict[str, AFElement]#

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

database#

The PI AF database connection.

property database_name: str#

Return the name of the connected PI AF database.

search: Search#

Search reference for searching objects in the database. See Search.Search for more information.

server#

The PI AF server connection.

property server_name: str#

Return the name of the connected PI AF server.

property tables: dict[str, AFTable]#

Return a dictionary of the tables in the database.

version = '0.3.0'#