Classes | |
| class | RequirementsManager |
| class | RequirementsNotFound |
Functions | |
| RequirementsManager | _async_get_manager (HomeAssistant hass) |
| tuple[set[str], set[str]] | _install_requirements_if_missing (list[str] requirements, dict[str, Any] kwargs) |
| bool | _install_with_retry (str requirement, dict[str, Any] kwargs) |
| None | async_clear_install_history (HomeAssistant hass) |
| Integration | async_get_integration_with_requirements (HomeAssistant hass, str domain) |
| None | async_load_installed_versions (HomeAssistant hass, set[str] requirements) |
| None | async_process_requirements (HomeAssistant hass, str name, list[str] requirements) |
| dict[str, Any] | pip_kwargs (str|None config_dir) |
Variables | |
| _LOGGER = logging.getLogger(__name__) | |
| string | CONSTRAINT_FILE = "package_constraints.txt" |
| string | DATA_REQUIREMENTS_MANAGER = "requirements_manager" |
| int | MAX_INSTALL_FAILURES = 3 |
| int | PIP_TIMEOUT = 60 |
Module to handle installing requirements.
|
private |
Get the requirements manager.
Definition at line 77 of file requirements.py.
|
private |
Install requirements if missing.
Definition at line 108 of file requirements.py.
|
private |
Try to install a package up to MAX_INSTALL_FAILURES times.
Definition at line 100 of file requirements.py.
| None homeassistant.requirements.async_clear_install_history | ( | HomeAssistant | hass | ) |
Forget the install history.
Definition at line 83 of file requirements.py.
| Integration homeassistant.requirements.async_get_integration_with_requirements | ( | HomeAssistant | hass, |
| str | domain | ||
| ) |
Get an integration with all requirements installed, including the dependencies. This can raise IntegrationNotFound if manifest or integration is invalid, RequirementNotFound if there was some type of failure to install requirements.
Definition at line 44 of file requirements.py.
| None homeassistant.requirements.async_load_installed_versions | ( | HomeAssistant | hass, |
| set[str] | requirements | ||
| ) |
Load the installed version of requirements.
Definition at line 68 of file requirements.py.
| None homeassistant.requirements.async_process_requirements | ( | HomeAssistant | hass, |
| str | name, | ||
| list[str] | requirements | ||
| ) |
Install the requirements for a component or platform. This method is a coroutine. It will raise RequirementsNotFound if an requirement can't be satisfied.
Definition at line 57 of file requirements.py.
| dict[str, Any] homeassistant.requirements.pip_kwargs | ( | str | None | config_dir | ) |
Return keyword arguments for PIP install.
Definition at line 88 of file requirements.py.
|
private |
Definition at line 31 of file requirements.py.
| string homeassistant.requirements.CONSTRAINT_FILE = "package_constraints.txt" |
Definition at line 24 of file requirements.py.
| string homeassistant.requirements.DATA_REQUIREMENTS_MANAGER = "requirements_manager" |
Definition at line 23 of file requirements.py.
| int homeassistant.requirements.MAX_INSTALL_FAILURES = 3 |
Definition at line 22 of file requirements.py.
| int homeassistant.requirements.PIP_TIMEOUT = 60 |
Definition at line 21 of file requirements.py.