module pycode.pip_helper
¶
Short summary¶
module pyquickhelper.pycode.pip_helper
Helpers for pip
Some links to look:
Classes¶
class |
truncated documentation |
---|---|
Common interface for old and recent pip packages. |
|
Any exception raised by one of the following function. |
Functions¶
function |
truncated documentation |
---|---|
Directs call to function get_installed_distributions from pip. Return a list of installed Distribution objects. … |
|
Calls |
|
calls |
|
Extracts information from a package. |
Methods¶
method |
truncated documentation |
---|---|
Documentation¶
Helpers for pip
Some links to look:
- class pyquickhelper.pycode.pip_helper.Distribution(dist)[source]¶
Bases:
object
Common interface for old and recent pip packages.
- exception pyquickhelper.pycode.pip_helper.PQPipError(*args)[source]¶
Bases:
Exception
Any exception raised by one of the following function.
- Parameters:
args – either a string 3 strings (cmd, out, err)
- pyquickhelper.pycode.pip_helper.get_installed_distributions(local_only=True, skip=None, include_editables=True, editables_only=False, user_only=False, use_cmd=False)[source]¶
Directs call to function get_installed_distributions from pip.
Return a list of installed Distribution objects.
- Parameters:
local_only – if True (default), only return installations local to the current virtualenv, if in a virtualenv.
skip – argument is an iterable of lower-case project names to ignore; defaults to
pip.compat.stdlib_pkgs
(if skip is None)editables – if False, don’t report editables.
editables_only – if True , only report editables.
user_only – if True , only report installations in the user site directory.
use_cmd – if True, use a different process (updated package list)
- Returns:
list of installed Distribution objects.
- pyquickhelper.pycode.pip_helper.get_package_info(name=None, start=0, end=-1)[source]¶
Calls
pip show
to retrieve information about packages.- Parameters:
name – name of he packages or None to get all of them in a list
start – start at package n (in list return by
get_packages_list
)end – end at package n, -1 for all
- Returns:
dictionary or list of dictionaries
- pyquickhelper.pycode.pip_helper.get_packages_list()[source]¶
calls
pip list
to retrieve the list of packages