pip_helpers Package¶
pip_helpers
Package¶
-
pip_helpers.
freeze
()[source]¶ Return sorted list of package descriptors (e.g.,
"foo", "foo==1.0", "foo>=1.0"
), one descriptor for each installed package.
-
pip_helpers.
get_releases
(package_str, pre=False, key=None, include_hidden=False, server_url='https://pypi.python.org/pypi/{}/json', hidden_url=None)[source]¶ Query Python Package Index for list of available release for specified package.
Parameters: - package_str (str) – Name of package hosted on Python package index. Version constraints are
also supported (e.g.,
"foo", "foo==1.0", "foo>=1.0"
, etc.). See version specifiers reference for more details. - pre (bool, optional) – Include pre-release packages.
- key (function, optional) – Key function to sort
(package_name, release_info)
items by. - include_hidden (bool, optional) – Include “hidden” packages.
- server_url (str, optional) – URL to JSON API (default=``’https://pypi.python.org/pypi/{}/json’``).
- hidden_url (str, optional) – URL to XMLRPC API (default=``’https://pypi.python.org/pypi/‘`` for PyPI server URL).
Returns: Package name and package release information, indexed by package version string and ordered by upload time (i.e., most recent release is last).
Return type: (string, collections.OrderedDict)
- package_str (str) – Name of package hosted on Python package index. Version constraints are
also supported (e.g.,
-
pip_helpers.
install
(packages, capture_streams=True)[source]¶ Install the specified list of packages from the Python Package Index.
Parameters: - packages (list) – List of package descriptors (e.g.,
"foo", "foo==1.0", "foo>=1.0"
). - capture_streams (bool, optional) – If
True
, capturestdout
andstderr
output and instead print concise progress indicator.
Returns: Combined output to
stdout
andstderr
.Return type: - packages (list) – List of package descriptors (e.g.,
-
pip_helpers.
uninstall
(packages, capture_streams=True)[source]¶ Uninstall the specified list of Python packages
Parameters: - packages (list) – List of package names (e.g.,
"foo"
, but not"foo==1.0", "foo>=1.0"
). - capture_streams (bool, optional) – If
True
, capturestdout
andstderr
output and instead print concise progress indicator.
Returns: Combined output to
stdout
andstderr
.Return type: - packages (list) – List of package names (e.g.,