__install__.py

The __install__.py file is run when the plugin is installed from the StreamController store.

It should be used to set up everything your plugin needs. The most common task is to create a dedicated environment for the backend.

__install__.py
from streamcontroller_plugin_tools.installation_helpers import create_venv
from os.path import join, abspath, dirname

toplevel = dirname(abspath(__file__))
create_venv(path=join(toplevel, ".venv"), path_to_requirements_txt=join(toplevel, "requirements.txt"))
The shown default file will just create a venv in the plugin's folder and install all requirements from requirements.txt.

If your plugin needs additional setup steps, feel free to add them.