manager
dev_tool.services.python.package.manager
PackageManager
Bases: Protocol
A protocol for package managers.
This class defines the interface for package management operations.
is_available
A method that checks if the package manager is available on the system.
Returns:
-
bool–True if the package manager is available, False otherwise.
install_package
install_package_manager
A method that installs the package manager if it is not already installed.
Returns:
-
bool–True if the installation was successful, False otherwise.
create_virtual_environment
A method that creates a virtual environment.
Returns:
-
bool–True if the creation was successful, False otherwise.
install_from_requirements
install_from_pyproject
A method that installs dependencies from pyproject.toml.
Parameters:
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/manager.py
uninstall_package
upgrade_package_manager
A method that upgrades the package manager to the latest version.
Returns:
-
bool–True if the upgrade was successful, False otherwise.
list_installed_packages
A method that lists all installed packages.
Returns: