universions’ documentation¶
Installation guide¶
With pip¶
pip install universions
With conda¶
conda install -c conda-forge universions
Supported tools¶
This page references all the supported tools and languages
Git¶
Documentation¶
-
universions.git.
get_git_version
(git_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the Git versions.
Parameters: git_path – The path to the Git binary to check. If not defined, it uses “node” Returns: The Git version.
Python example¶
>>> from universions.git import get_git_version
>>> get_git_version()
Version(major=2, minor=20, patch=1, prerelease=None, build=None)
CLI example¶
>>> universions git
2.20
Java¶
Documentation¶
-
universions.java.
get_java_version
(java_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the Java versions.
Parameters: java_path – The path to the Java to check. If not defined, it uses JAVA_HOME from the enviroment variables to try $JAVA_HOME/bin/java. If JAVA_HOME is not defined either it tries only “java”. Returns: The Java version.
Python example¶
>>> from universions.java import get_java_version
>>> get_java_version()
Version(major=11, minor=0, patch=2, prerelease=None, build=None)
CLI example¶
>>> universions java
11.0
Node¶
Documentation¶
-
universions.node.
get_node_version
(node_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the Node version.
Parameters: node_path – The path to the node to check. If not defined, it uses “node” Returns: The Node version.
Python example¶
>>> from universions.node import get_node_version
>>> get_node_version()
Version(major=12, minor=6, patch=0, prerelease=None, build=None)
CLI example¶
>>> universions node
12.6
Npm¶
Documentation¶
-
universions.npm.
get_npm_version
(npm_path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the NPM version.
Parameters: npm_path – The path to npm to check. If not defined, it uses “npm” Returns: The NPM version.
Python example¶
>>> from universions.npm import get_npm_version
>>> get_npm_version()
Version(major=6, minor=4, patch=1, prerelease=None, build=None)
CLI example¶
>>> universions npm
6.4
Pip¶
Documentation¶
-
universions.pip.
get_pip_version
(path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the Pip version.
Parameters: path – The path to the Pip to check. If not defined, it uses “pip” Returns: The Pip version.
Python example¶
>>> from universions.pip import get_pip_version
>>> get_pip_version()
Version(major=19, minor=3, patch=1, prerelease=None, build=None)
CLI example¶
>>> universions pip
19.3
Python¶
Documentation¶
-
universions.python.
get_python_version
(path: Union[pathlib.Path, str, None] = None) → Optional[universions.version.Version]¶ Get the Python version.
Parameters: path – The path to the Python to check. If not defined, it uses “python” Returns: The Python version.
Python example¶
>>> from universions.python import get_python_version
>>> get_python_version()
Version(major=3, minor=7, patch=5, prerelease='rc1', build=None)
CLI example¶
>>> universions python
3.7
universions is a python library to get the version of other tools and languages.