Closed
Description
I love that pyscript
lets you import any package to use in automations, but I am somewhat limited in the packages I can use because I run HomeAssistant in a Docker container, and I would have to either manually install the packages each time I rebuilt the container or create my own Dockerfile
that did the same. It would be great if there was a mechanism through pyscript
to install packages if they are not found. I am not sure what the best way to achieve this would be, there are two problems to consider:
- How to determine what packages need to be installed and their versions? HomeAssistant achieves this through the use of
manifest.json
which lists the dependent package and version. - How to install the package? You can probably use the code here as a reference https://github.com/home-assistant/core/blob/dev/homeassistant/requirements.py#L105
Open questions:
- How would
pyscript
deal with version mismatches between what HomeAssistant expects and whatpyscript
wants? My take is that we should always defer to HomeAssistant requirements to prevent issues with the core application
Thanks for the consideration!
Metadata
Metadata
Assignees
Labels
No labels