DocsOmniFi APIsChangelog
SkySparcContact UsLog In
Docs

Python runtime environments

A python runtime environment is a collection of settings describing a python environment available for running extensions, including PYTHON_HOME, version etc.
Python environments are configured in files <root>\Environments\*.pyenv, with the following options.

OptionDescription
ArchitectureExtension architecture [x86 or x64]
PythonVersionPython version [2.7 or 3.12]
PythonHomePythonHome Path to the python installation root directory.
PythonPathPythonPath PYTHONPATH; Paths to python libraries.
EnvironmentPathThe environment %PATH% to use runtime.

The default runtime environment “default.pyenv” uses the default 64-bit Python 3 environment bundled with OmniFi. For extensions with specific requirements on version/architecture included libraries etc. it is possible to configure additional runtime environments.

Installing a new Python environment

OmniFi provides a default 64-bit Python 3 installation that is suitable in most cases. However, if you depend on legacy python modules you may need to configure a secondary Python installation.

Install required Python packages

The default Python installation provides a predefined requirements.txt file that can be used to install the necessary modules required by the OmniFi extensibility API in a new python environment.
Run the command pip install -r requirements.txt to in your new python installation to install required packages.

Create an environment configuration

To use the new Python environment, an environment configuration must be created.
Create a new file <plugin_home>\Environments<name>.pyenv, as specified above.


Did this page help you?