About EKL Libraries in Python

Enterprise Knowledge Language (EKL) is a procedural language in which code reuse helps avoid code duplication, and enhance code readability and maintainability. It is possible to include reusable EKL functions defined in know-how libraries in Python scripts.

Reusable functions can be defined in the Quality Rules Capture app. These functions are defined in the objects of know-how libraries.

To call these functions, the associated library must be:

  • Properly exposed through a local resource table or the "Includeable EKL Libraries" Data Setup resource set.
  • Included in the first lines of the EKL script that calls their functions before any other instruction.

A library is called from any EKL script using the Include keyword. Includes must be located in the first lines of any EKL script before any other instruction.

For example:

Include "LibName"
[…]
LibName::FunctionName(<args>)

This mechanism is extended to Python scripts. Once defined and exposed, the know-how library for EKL scripts can also be included in any Python script, and you can call their functions.

To include a library in Python scripts, the statement syntax is as follows:

ekl.include("LibName")

All EKL functions from the included library are called using the following syntax:

ekl.LibName.FunctionName(<args>)

Note: A new page titled Reusable EKL Functions in Python is available in the Getting Started section of the Python editor.