functional
Class info¶
🛈 DocStrings¶
Functional API for package installation.
install
async
¶
Install a package using the appropriate installer for the current environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
package_name
|
str
|
Name of the package to install. |
required |
version
|
str | None
|
Optional version specifier. |
None
|
upgrade
|
bool
|
Whether to upgrade an existing package. |
False
|
Raises:
| Type | Description |
|---|---|
ImportError
|
If no suitable installer is available. |
Source code in src/anyenv/package_install/functional.py
install_sync
¶
Synchronous version of install.