container
dev_tool.services.python.package.container
log = logging.getLogger(__name__)
module-attribute
ContainerPackageManager
Bases: BaseService
A class for managing Python packages in a containerized environment.
This class provides methods for installing, uninstalling, and listing packages within Docker containers using uv pip.
install_dependencies
A method that installs dependencies in the container.
Parameters:
-
sources(list[DependencySource]) –The dependency sources to install from.
Source code in dev_tool/services/python/package/container.py
install_package
A method that installs a package in the container.
Parameters:
-
package(str) –The name of the package to install.
Returns:
-
bool–True if successful, False otherwise.
Source code in dev_tool/services/python/package/container.py
list_packages
A method that lists installed packages in the container.
Returns:
Source code in dev_tool/services/python/package/container.py
uninstall_package
A method that uninstalls a package from the container.
Parameters:
-
package(str) –The name of the package to uninstall.
Returns:
-
bool–True if successful, False otherwise.