hbutils.system.python¶
python_version¶
is_cpython¶
is_ironpython¶
is_jython¶
is_pypy¶
package_version¶
-
hbutils.system.python.
package_version
(name: str) → Optional[packaging.version.Version][source]¶ - Overview:
Get version of package with given
name
.
- Parameters:
name – Name of the package, case is not sensitive.
- Returns:
A
packing.version.Version
object. If the package is not installed, returnNone
.
- Examples::
>>> from hbutils.system import package_version >>> >>> package_version('pip') <Version('21.3.1')> >>> package_version('setuptools') <Version('59.6.0')> >>> package_version('not_a_package') None