pip
dev_tool.services.python.package.pip
log = logging.getLogger(__name__)
module-attribute
WindowsPipPackageManager
Bases: PackageManager
A Windows-specific implementation of the Pip package manager.
This class provides methods for managing Python packages using pip on Windows.
is_available
A method that checks if pip is available on the system.
Returns:
-
bool–True if pip is available, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_package
A method that installs a package using pip.
Parameters:
-
package(str) –The name of the package to install.
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_package_manager
create_virtual_environment
A method that creates a virtual environment using venv.
Returns:
-
bool–True if the creation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_from_requirements
A method that installs dependencies from a requirements file using pip.
Parameters:
-
requirements_path–The path to the requirements file.
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_from_pyproject
A method that installs dependencies from pyproject.toml using pip.
Parameters:
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
uninstall_package
A method that uninstalls a package using pip.
Parameters:
-
package(str) –The name of the package to uninstall.
Returns:
-
bool–True if the uninstallation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
upgrade_package_manager
A method that upgrades pip to the latest version.
Returns:
-
bool–True if the upgrade was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
list_installed_packages
A method that lists all installed packages using pip.
Returns:
Source code in dev_tool/services/python/package/pip.py
UnixPipPackageManager
Bases: PackageManager
A Unix-specific implementation of the Pip package manager.
This class provides methods for managing Python packages using pip on Unix-like systems.
is_available
A method that checks if pip3 is available on the system.
Returns:
-
bool–True if pip3 is available, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_package
A method that installs a package using pip.
Parameters:
-
package(str) –The name of the package to install.
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_package_manager
A method that ensures pip3 is installed.
Returns:
-
bool–True if pip3 is available, False otherwise.
create_virtual_environment
A method that creates a virtual environment using venv.
Returns:
-
bool–True if the creation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_from_requirements
A method that installs dependencies from a requirements file using pip.
Parameters:
-
requirements(Path) –The path to the requirements file.
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
install_from_pyproject
A method that installs dependencies from pyproject.toml using pip.
Parameters:
Returns:
-
bool–True if the installation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
uninstall_package
A method that uninstalls a package using pip.
Parameters:
-
package(str) –The name of the package to uninstall.
Returns:
-
bool–True if the uninstallation was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
upgrade_package_manager
A method that upgrades pip to the latest version.
Returns:
-
bool–True if the upgrade was successful, False otherwise.
Source code in dev_tool/services/python/package/pip.py
list_installed_packages
A method that lists all installed packages using pip.
Returns: