PipxInterface/Documentation/Source/Plugin_Pipx_Interface.PipxInterface.Pipx.html

changeset 18
df1986d93746
child 23
4c18addf12b2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/PipxInterface/Documentation/Source/Plugin_Pipx_Interface.PipxInterface.Pipx.html	Fri Jun 28 17:24:18 2024 +0200
@@ -0,0 +1,608 @@
+<!DOCTYPE html>
+<html><head>
+<title>Plugin_Pipx_Interface.PipxInterface.Pipx</title>
+<meta charset="UTF-8">
+<link rel="stylesheet" href="styles.css">
+</head>
+<body>
+<a NAME="top" ID="top"></a>
+<h1>Plugin_Pipx_Interface.PipxInterface.Pipx</h1>
+<p>
+Module implementing the pipx GUI logic.
+</p>
+
+<h3>Global Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<h3>Classes</h3>
+<table>
+<tr>
+<td><a href="#Pipx">Pipx</a></td>
+<td>Class implementing the pip GUI logic.</td>
+</tr>
+</table>
+
+<h3>Functions</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<hr />
+<hr />
+<a NAME="Pipx" ID="Pipx"></a>
+<h2>Pipx</h2>
+<p>
+    Class implementing the pip GUI logic.
+</p>
+
+<h3>Derived from</h3>
+QObject
+<h3>Class Attributes</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<h3>Class Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+<h3>Methods</h3>
+<table>
+<tr>
+<td><a href="#Pipx.__init__">Pipx</a></td>
+<td>Constructor</td>
+</tr>
+<tr>
+<td><a href="#Pipx.__getPipxExecutable">__getPipxExecutable</a></td>
+<td>Private method to get the path name of the pipx executable.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.__metadataDecoderHook">__metadataDecoderHook</a></td>
+<td>Private method to allow the JSON decoding of Path objects of a spec metadata file as created by 'pipx list --json'.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.checkPackageOutdated">checkPackageOutdated</a></td>
+<td>Public method to check, if a given package is outdated.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.createSpecMetadataFile">createSpecMetadataFile</a></td>
+<td>Public method to create a spec metadata file.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getInstalledPackages">getInstalledPackages</a></td>
+<td>Public method to get the installed packages.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getPipxInterpretersList">getPipxInterpretersList</a></td>
+<td>Public method returning a list all standalone interpreters.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getPipxPaths">getPipxPaths</a></td>
+<td>Public method to get the paths used by pipx.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getPipxStrPaths">getPipxStrPaths</a></td>
+<td>Public method to get the paths used by pipx.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getPipxVersion">getPipxVersion</a></td>
+<td>Public method to get the version of the installed pipx package.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.getPipxVersionTuple">getPipxVersionTuple</a></td>
+<td>Public method to get the version tuple of the installed pipx package.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.installAllPackages">installAllPackages</a></td>
+<td>Public method to install all packages define by a given spec metadata file with given options.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.installPackages">installPackages</a></td>
+<td>Public method to install a list of packages with the given options.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.pruneInterpreters">pruneInterpreters</a></td>
+<td>Public method to prune unused interpreters.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.reinstallAllPackages">reinstallAllPackages</a></td>
+<td>Public method to reinstall all packages with given options.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.reinstallPackage">reinstallPackage</a></td>
+<td>Public method to reinstall the given package with given options.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.runPipxProcess">runPipxProcess</a></td>
+<td>Public method to execute pipx with the given arguments.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.uninstallAllPackages">uninstallAllPackages</a></td>
+<td>Public method to uninstall all pipx managed packages.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.uninstallPackage">uninstallPackage</a></td>
+<td>Public method to uninstall the given package.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.upgradeAllPackages">upgradeAllPackages</a></td>
+<td>Public method to upgrade all package.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.upgradeInterpreters">upgradeInterpreters</a></td>
+<td>Public method to upgrade the installed interpreters to the latest available micro/patch version.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.upgradePackage">upgradePackage</a></td>
+<td>Public method to upgrade the given package.</td>
+</tr>
+<tr>
+<td><a href="#Pipx.upgradeSharedLibraries">upgradeSharedLibraries</a></td>
+<td>Public method to upgrade shared libraries.</td>
+</tr>
+</table>
+
+<h3>Static Methods</h3>
+<table>
+<tr><td>None</td></tr>
+</table>
+
+
+<a NAME="Pipx.__init__" ID="Pipx.__init__"></a>
+<h4>Pipx (Constructor)</h4>
+<b>Pipx</b>(<i>parent=None</i>)
+<p>
+        Constructor
+</p>
+
+<dl>
+
+<dt><i>parent</i> (QObject)</dt>
+<dd>
+reference to the user interface object
+</dd>
+</dl>
+<a NAME="Pipx.__getPipxExecutable" ID="Pipx.__getPipxExecutable"></a>
+<h4>Pipx.__getPipxExecutable</h4>
+<b>__getPipxExecutable</b>(<i></i>)
+<p>
+        Private method to get the path name of the pipx executable.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+path name of the pipx executable
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<a NAME="Pipx.__metadataDecoderHook" ID="Pipx.__metadataDecoderHook"></a>
+<h4>Pipx.__metadataDecoderHook</h4>
+<b>__metadataDecoderHook</b>(<i>jsonDict</i>)
+<p>
+        Private method to allow the JSON decoding of Path objects of a spec metadata
+        file as created by 'pipx list --json'.
+</p>
+
+<dl>
+
+<dt><i>jsonDict</i> (dict)</dt>
+<dd>
+JSON dictionary to be decoded
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+decoded Path object or the dictionary unaltered
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict or pathlib.Path
+</dd>
+</dl>
+<a NAME="Pipx.checkPackageOutdated" ID="Pipx.checkPackageOutdated"></a>
+<h4>Pipx.checkPackageOutdated</h4>
+<b>checkPackageOutdated</b>(<i>package</i>)
+<p>
+        Public method to check, if a given package is outdated.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+name of the package
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+latest version in case the package is outdated and None otherwise
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str or None
+</dd>
+</dl>
+<a NAME="Pipx.createSpecMetadataFile" ID="Pipx.createSpecMetadataFile"></a>
+<h4>Pipx.createSpecMetadataFile</h4>
+<b>createSpecMetadataFile</b>(<i>specFile</i>)
+<p>
+        Public method to create a spec metadata file.
+</p>
+
+<dl>
+
+<dt><i>specFile</i> (str)</dt>
+<dd>
+path of the spec metadata file
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing a flag indicating success and an error message in case
+            of failure
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bool, str)
+</dd>
+</dl>
+<a NAME="Pipx.getInstalledPackages" ID="Pipx.getInstalledPackages"></a>
+<h4>Pipx.getInstalledPackages</h4>
+<b>getInstalledPackages</b>(<i></i>)
+<p>
+        Public method to get the installed packages.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+list of dictionaries containing the installed packages and apps
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+list of dict[str, str | list]
+</dd>
+</dl>
+<a NAME="Pipx.getPipxInterpretersList" ID="Pipx.getPipxInterpretersList"></a>
+<h4>Pipx.getPipxInterpretersList</h4>
+<b>getPipxInterpretersList</b>(<i></i>)
+<p>
+        Public method returning a list all standalone interpreters.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+dictionary containing data of standalone interpreters
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict
+</dd>
+</dl>
+<a NAME="Pipx.getPipxPaths" ID="Pipx.getPipxPaths"></a>
+<h4>Pipx.getPipxPaths</h4>
+<b>getPipxPaths</b>(<i></i>)
+<p>
+        Public method to get the paths used by pipx.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+dictionary containing the various pipx paths. The keys are
+            'venvsPath', 'appsPath' and 'manPath'.
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict[str, Path]
+</dd>
+</dl>
+<a NAME="Pipx.getPipxStrPaths" ID="Pipx.getPipxStrPaths"></a>
+<h4>Pipx.getPipxStrPaths</h4>
+<b>getPipxStrPaths</b>(<i></i>)
+<p>
+        Public method to get the paths used by pipx.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+dictionary containing the various pipx paths. The keys are
+            'venvsPath', 'appsPath' and 'manPath'.
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+dict[str, str]
+</dd>
+</dl>
+<a NAME="Pipx.getPipxVersion" ID="Pipx.getPipxVersion"></a>
+<h4>Pipx.getPipxVersion</h4>
+<b>getPipxVersion</b>(<i></i>)
+<p>
+        Public method to get the version of the installed pipx package.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+string containing the pipx version number
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+str
+</dd>
+</dl>
+<a NAME="Pipx.getPipxVersionTuple" ID="Pipx.getPipxVersionTuple"></a>
+<h4>Pipx.getPipxVersionTuple</h4>
+<b>getPipxVersionTuple</b>(<i></i>)
+<p>
+        Public method to get the version tuple of the installed pipx package.
+</p>
+
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing the elements of the pipx version number
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (int, int, int)
+</dd>
+</dl>
+<a NAME="Pipx.installAllPackages" ID="Pipx.installAllPackages"></a>
+<h4>Pipx.installAllPackages</h4>
+<b>installAllPackages</b>(<i>specFile, interpreterVersion="", fetchMissingInterpreter=False, forceVenvModification=False, systemSitePackages=False, </i>)
+<p>
+        Public method to install all packages define by a given spec metadata file
+        with given options.
+</p>
+
+<dl>
+
+<dt><i>specFile</i> (str)</dt>
+<dd>
+path of the spec metadata file
+</dd>
+<dt><i>interpreterVersion</i> (str (optional))</dt>
+<dd>
+version of the Python interpreter (defaults to "")
+</dd>
+<dt><i>fetchMissingInterpreter</i> (bool (optional))</dt>
+<dd>
+flag indicating to fetch a standalone Python
+            build from GitHub if the specified Python version is not found locally
+            on the system (defaults to False)
+</dd>
+<dt><i>forceVenvModification</i> (bool (optional))</dt>
+<dd>
+flag indicating to allow modification of already
+            existing virtual environments (defaults to False)
+</dd>
+<dt><i>systemSitePackages</i> (bool (optional))</dt>
+<dd>
+flag indicating to give access to the system
+            site-packages directory (defaults to False)
+</dd>
+</dl>
+<a NAME="Pipx.installPackages" ID="Pipx.installPackages"></a>
+<h4>Pipx.installPackages</h4>
+<b>installPackages</b>(<i>packages, interpreterVersion="", fetchMissingInterpreter=False, forceVenvModification=False, systemSitePackages=False, </i>)
+<p>
+        Public method to install a list of packages with the given options.
+</p>
+
+<dl>
+
+<dt><i>packages</i> (list of str)</dt>
+<dd>
+list of packages to install
+</dd>
+<dt><i>interpreterVersion</i> (str (optional))</dt>
+<dd>
+version of the Python interpreter (defaults to "")
+</dd>
+<dt><i>fetchMissingInterpreter</i> (bool (optional))</dt>
+<dd>
+flag indicating to fetch a standalone Python
+            build from GitHub if the specified Python version is not found locally
+            on the system (defaults to False)
+</dd>
+<dt><i>forceVenvModification</i> (bool (optional))</dt>
+<dd>
+flag indicating to allow modification of already
+            existing virtual environments (defaults to False)
+</dd>
+<dt><i>systemSitePackages</i> (bool (optional))</dt>
+<dd>
+flag indicating to give access to the system
+            site-packages directory (defaults to False)
+</dd>
+</dl>
+<a NAME="Pipx.pruneInterpreters" ID="Pipx.pruneInterpreters"></a>
+<h4>Pipx.pruneInterpreters</h4>
+<b>pruneInterpreters</b>(<i>dialogParent=None</i>)
+<p>
+        Public method to prune unused interpreters.
+</p>
+
+<dl>
+
+<dt><i>dialogParent</i> (QWidget)</dt>
+<dd>
+parent widget of the execution dialog
+</dd>
+</dl>
+<a NAME="Pipx.reinstallAllPackages" ID="Pipx.reinstallAllPackages"></a>
+<h4>Pipx.reinstallAllPackages</h4>
+<b>reinstallAllPackages</b>(<i>interpreterVersion="", fetchMissingInterpreter=False, skipPackages=None, </i>)
+<p>
+        Public method to reinstall all packages with given options.
+</p>
+
+<dl>
+
+<dt><i>interpreterVersion</i> (str (optional))</dt>
+<dd>
+version of the Python interpreter (defaults to "")
+</dd>
+<dt><i>fetchMissingInterpreter</i> (bool (optional))</dt>
+<dd>
+flag indicating to fetch a standalone Python
+            build from GitHub if the specified Python version is not found locally
+            on the system (defaults to False)
+</dd>
+<dt><i>skipPackages</i> (list of str (optional))</dt>
+<dd>
+list of packages to be skipped by the 'reinstall-all'
+            command (defaults to None)
+</dd>
+</dl>
+<a NAME="Pipx.reinstallPackage" ID="Pipx.reinstallPackage"></a>
+<h4>Pipx.reinstallPackage</h4>
+<b>reinstallPackage</b>(<i>package, interpreterVersion="", fetchMissingInterpreter=False, </i>)
+<p>
+        Public method to reinstall the given package with given options.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+name of the package to reinstall
+</dd>
+<dt><i>interpreterVersion</i> (str (optional))</dt>
+<dd>
+version of the Python interpreter (defaults to "")
+</dd>
+<dt><i>fetchMissingInterpreter</i> (bool (optional))</dt>
+<dd>
+flag indicating to fetch a standalone Python
+            build from GitHub if the specified Python version is not found locally
+            on the system (defaults to False)
+</dd>
+</dl>
+<a NAME="Pipx.runPipxProcess" ID="Pipx.runPipxProcess"></a>
+<h4>Pipx.runPipxProcess</h4>
+<b>runPipxProcess</b>(<i>args</i>)
+<p>
+        Public method to execute pipx with the given arguments.
+</p>
+
+<dl>
+
+<dt><i>args</i> (list of str)</dt>
+<dd>
+list of command line arguments for pipx
+</dd>
+</dl>
+<dl>
+<dt>Return:</dt>
+<dd>
+tuple containing a flag indicating success and the output
+            of the process
+</dd>
+</dl>
+<dl>
+<dt>Return Type:</dt>
+<dd>
+tuple of (bool, str)
+</dd>
+</dl>
+<a NAME="Pipx.uninstallAllPackages" ID="Pipx.uninstallAllPackages"></a>
+<h4>Pipx.uninstallAllPackages</h4>
+<b>uninstallAllPackages</b>(<i></i>)
+<p>
+        Public method to uninstall all pipx managed packages.
+</p>
+
+<a NAME="Pipx.uninstallPackage" ID="Pipx.uninstallPackage"></a>
+<h4>Pipx.uninstallPackage</h4>
+<b>uninstallPackage</b>(<i>package</i>)
+<p>
+        Public method to uninstall the given package.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+name of the package to be uninstalled
+</dd>
+</dl>
+<a NAME="Pipx.upgradeAllPackages" ID="Pipx.upgradeAllPackages"></a>
+<h4>Pipx.upgradeAllPackages</h4>
+<b>upgradeAllPackages</b>(<i></i>)
+<p>
+        Public method to upgrade all package.
+</p>
+
+<a NAME="Pipx.upgradeInterpreters" ID="Pipx.upgradeInterpreters"></a>
+<h4>Pipx.upgradeInterpreters</h4>
+<b>upgradeInterpreters</b>(<i>dialogParent=None</i>)
+<p>
+        Public method to upgrade the installed interpreters to the latest available
+        micro/patch version.
+</p>
+
+<dl>
+
+<dt><i>dialogParent</i> (QWidget)</dt>
+<dd>
+parent widget of the execution dialog
+</dd>
+</dl>
+<a NAME="Pipx.upgradePackage" ID="Pipx.upgradePackage"></a>
+<h4>Pipx.upgradePackage</h4>
+<b>upgradePackage</b>(<i>package</i>)
+<p>
+        Public method to upgrade the given package.
+</p>
+
+<dl>
+
+<dt><i>package</i> (str)</dt>
+<dd>
+name of the package
+</dd>
+</dl>
+<a NAME="Pipx.upgradeSharedLibraries" ID="Pipx.upgradeSharedLibraries"></a>
+<h4>Pipx.upgradeSharedLibraries</h4>
+<b>upgradeSharedLibraries</b>(<i></i>)
+<p>
+        Public method to upgrade shared libraries.
+</p>
+
+<div align="right"><a href="#top">Up</a></div>
+<hr />
+</body></html>

eric ide

mercurial