Dependencies
Install remote Python packages, bundle local wheels, and depend on other plugins.
Dependencies
Elyx supports three different dependency mechanisms:
- packages installed by the host PIP controller
.whlfiles bundled inside the plugin- other exteraGram plugins
Choose the smallest mechanism which fits the dependency.
PIP requirements
Declare a comma-separated string in metadata:
Before importing the entry module, Elyx asks the host PIP controller to install
the packages for this plugin and adds their paths to sys.path.
Then use normal imports:
See PIP and Available Libraries for runtime constraints.
Android is not desktop Python
Packages with native extensions need a build compatible with Python 3.11, Android, and the device ABI. A wheel built for Windows, macOS, or desktop Linux will not work on the phone.
Bundled wheels
Point refmap.yml to a directory:
On load, Elyx:
- finds direct
.whlchildren of the directory - extracts each wheel into plugin-specific local library storage
- skips a wheel already extracted under the same wheel filename stem
- removes stale extracted directories not present in the current release
- adds the installed wheel directories to Python's import path
Bundled wheels are useful when:
- a pure-Python internal library is not published to an index
- the exact artifact must travel with the plugin
- installation must not depend on network access
Rebuild or rename the wheel when its contents change. Elyx uses the wheel stem as the extracted-version identity.
Local source packages
Small libraries do not need a wheel. Put the package directly in the project:
Local source is namespaced per plugin and participates naturally in live reload.
Required plugins
Use the metadata requires mapping:
The installer reports a missing, disabled, or outdated required plugin. A link can be offered for installation.
This declaration checks availability; it does not create a stable Python API between plugins. If plugins communicate, define an explicit compatibility contract and avoid importing another plugin's private namespaced modules.
Version and update behavior
- PIP requirements are associated with the plugin id
- local wheels live in plugin-specific storage
- obsolete bundled wheel directories are removed during wheel processing
- deleting the plugin asks the host to uninstall its PIP dependencies
- changing the plugin
idcreates a separate dependency scope
Security
Treat dependencies as executable code:
- pin or constrain important versions
- distribute only wheels you built or verified
- keep licenses and notices required by bundled libraries
- do not place credentials in a wheel or source archive
- test clean installation, update, disable/enable, and deletion
Elyx rejects path traversal while extracting bundled wheels, but that does not make an untrusted dependency safe to execute.