Extending from merge request #111, we introduce third-party plugin with virtual environment support. Before, third-party plugins could not use any packages that were not part of elAPI (e.g. requests package). With this PR, a third-party plugin can use any Python package given that they provide the following plugin metadata file in ~/.local/share/elapi/plugins/<plugin name>/elapi_plugin_metadata.yml:
# elapi_plugin_metadata.yml
plugin_name: test
cli_script: ~/my-project/cli.py
venv_dir: ~/my-project/.venv
elAPI will give the information found on this metadata file elapi_plugin_metadata.yml higher priority. E.g., if a plugin name conflict occurs, the conflicting plugin can be easily renamed by the user just by giving a new name to plugin_name key in elapi_plugin_metadata.yml.
An elAPI plugin running numpy (numpy.random.randint)
Extending from merge request #111, we introduce third-party plugin with virtual environment support. Before, third-party plugins could not use any packages that were not part of elAPI (e.g.
requests
package). With this PR, a third-party plugin can use any Python package given that they provide the following plugin metadata file in~/.local/share/elapi/plugins/<plugin name>/elapi_plugin_metadata.yml
:elAPI will give the information found on this metadata file
elapi_plugin_metadata.yml
higher priority. E.g., if a plugin name conflict occurs, the conflicting plugin can be easily renamed by the user just by giving a new name toplugin_name
key inelapi_plugin_metadata.yml
.An elAPI plugin running numpy (
numpy.random.randint
)