AlbertUnruhUtils.utils.version module
- AlbertUnruhUtils.utils.version.get_version(module_o_name: module | str, /, *, sep: str = '.', keep_dev_version: bool = True, semver: bool = False) tuple[int, ...]
- Parameters:
module_o_name (types.ModuleType, str) – The module of which you want the version.
sep (str) – The separator for e.g. major and minor.
keep_dev_version (bool) – Whether to keep developer-versions or not.
semver (bool) – Whether the return should be structured like a semantic version (https://semver.org)
- Return type:
tuple[int, …]
Notes
If
keep_dev_versionis set toTruethe return may also containstr.
- AlbertUnruhUtils.utils.version.is_version(module_o_version: module | str | tuple[int, ...], version: tuple[int, ...] | str, /, *, sep: str = '.', keep_dev_version: bool = True, semver: bool = False) bool
MODULE_o_VERSION == VERSION
- Parameters:
module_o_version (types.ModuleType, str, tuple[int, ...]) – The module or version of which you want to check the version.
version (tuple[int, ...], str) – The version to check against.
sep (str) – The separator for e.g. major and minor.
keep_dev_version (bool) – Whether to keep developer-versions or not.
semver (bool) – Whether the return should be structured like a semantic version (https://semver.org)
- Return type:
bool
- AlbertUnruhUtils.utils.version.is_lower_version(module_o_version: module | str | tuple[int, ...], version: tuple[int, ...] | str, /, *, sep: str = '.', keep_dev_version: bool = True, semver: bool = False) bool
MODULE_o_VERSION < VERSION
- Parameters:
module_o_version (types.ModuleType, str, tuple[int, ...]) – The module or version of which you want to check the version.
version (tuple[int, ...], str) – The version to check against.
sep (str) – The separator for e.g. major and minor.
keep_dev_version (bool) – Whether to keep developer-versions or not.
semver (bool) – Whether the return should be structured like a semantic version (https://semver.org)
- Return type:
bool
- AlbertUnruhUtils.utils.version.is_higher_version(module_o_version: module | str | tuple[int, ...], version: tuple[int, ...] | str, /, *, sep: str = '.', keep_dev_version: bool = True, semver: bool = False) bool
MODULE_o_VERSION > VERSION
- Parameters:
module_o_version (types.ModuleType, str, tuple[int, ...]) – The module or version of which you want to check the version.
version (tuple[int, ...], str) – The version to check against.
sep (str) – The separator for e.g. major and minor.
keep_dev_version (bool) – Whether to keep developer-versions or not.
semver (bool) – Whether the return should be structured like a semantic version (https://semver.org)
- Return type:
bool