Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

OperatorMeaning
==Equal to
!=Not equal to
<Less than to
<=Less than or equal to
>Greater than

The Python Application implementing the Universal Extension must be packaged in a zip file, containing both an extension.py and an extension.yml.

The extension.yml is the YAML metadata configuration file, as shown below.

---
extension:
  name: extension1
  version: "0.1.0"
  api_level: "1.4.0"
  requires_python: ">=3.6"
  python_extra_paths: "${extension_zip}/lib:${extension_zip}/test/lib"
  zip_safe: true
owner:
  name: John Doe
  organization: Stonebranch, Inc.
comments: |
  These comments will appear in the Controller in the Universal Template 'Extension Comments' field.
  The 'Extension Comments' field can be viewed from the Meta Data section, the List, or the Show Details.

The extension name and api_level are required, while the extension requires_python (default “>=2.6”) and python_extra_paths are optional.

Note

For requires_python, you can use wildcards to select certain Python versions.

For example, the following configurations are supported:

  • requires_python: "==2.7*"
  • requires_python: "!=3.9.1*"
  • requires_python: "!=3*"

The owner name and organization are optional.

From the Universal Template form, the zip will be uploaded by clicking the add [+] icon (tooltip Upload Extension Archive) next to the Extension field, and persisted in the Universal Controller database as a byte[] (BLOB).

To download an already attached Extension Archive, click the link [∞] icon (tooltip Download Extension Archive).

To remove an already attached Extension Archive, click the remove [-] icon (tooltip Delete Extension Archive).

...

>=Greater than or equal to

An asterisk may be used as a "wild card" in the version specification.  For example ==3* specifies any version 3 Python.

python_extra_paths

The python_extra_paths attribute is optional.  This attribute provides a means for the extension developer to specify additional paths that will be included in the Python runtime environment in which the extension runs. Since it is impossible for the extension developer to know the path to the deployed extension at runtime, a special token is provided that will resolve to the deployed extension path at runtime: ${extension_zip}.

At runtime, ${extension_zip} will be replaced with the file system path to the deployed extension.  For example, if an extension archive included a directory for test modules:

Code Block
├── extension.py
├── extension.yml
└── test
    └── test1.py
    └── test2.py
    └── test3.py


The following python_extra_paths value would setup pathing in the runtime environment allowing the extension code to access the test package:

python_extra_paths: ${extension_zip}/test

zip_safe

The zip_safe attribute is optional.  It specifies whether the extension should be run directly from the zip archive or extracted to the file system in a private cache and run from there.  The default value is true.

Info

This attribute was introduced in Universal Extension API level 1.4.0. In order for zip_safe: false to have any impact, the extension must specify a Universal Extension API level >= 1.4.0 via the api_level attribute in extension.yml.


Info

If an extension requires "dependency packages" (introduced in Universal Extension API 1.4.0), the extension must specify zip_safe: false.

owner

This section pertains to the owner of the extension (the extension developer or developer's organization).

name

The name attribute is optional.  Specifies the Universal Extension owner's name.  This field is displayed in the Metadata section of an extensions Universal Template in the Universal Controller.  It is for informational purposes only.

organization

The organization attribute is optional.  Specifies the Universal Extension developer's organization.  This field is displayed in the Metadata section of an extensions Universal Template in the Universal Controller.  It is for informational purposes only.

comments

The comments section is optional. This attribute allows the extension developer to provide information about the extension. This field is displayed in the Metadata section of an extensions Universal Template in the Universal Controller.  It is for informational purposes only.