pipx facts¶
- class reemote.facts.pipx.get_packages.Get_packages[source]¶
Bases:
objectReturns a dictionary of installed packages.
Examples:
yield Get_packages()
- reemote.facts.pipx.get_packages.parse_pipx_list_installed(output)[source]¶
Parses the raw text output from the ‘pipx list’ command.
This function processes the standard output of ‘pipx list’ to extract a structured list of installed packages and their versions. It is designed to handle the specific format of the ‘pipx list’ command, including skipping the header and parsing each package line.
Key transformations include:
Stripping leading/trailing whitespace from the input and individual lines.
Skipping the first two header lines of the output.
Splitting each line to separate the package name from its version string.
Ignoring empty or malformed lines.
- Parameters:
output (str) – The raw string output from the ‘pipx list’ command.
- Returns:
- A list of dictionaries, where each dictionary
represents an installed package and contains ‘name’ and ‘version’ keys.
- Return type:
list[dict]